Add flags for building shared objects for architectures supporting dynamic loading

* arch/arm/src/common/Toolchain.defs
  arch/risc-v/src/common/Toolchain.defs
  boards/sim/sim/sim/scripts/Make.defs
  - Add SHCCFLAGS and SSHLDFLAGS
This commit is contained in:
Neale Ferguson 2023-10-09 16:36:02 -04:00 committed by Alan Carvalho de Assis
parent 0cd401e6c4
commit 5033966d8c
3 changed files with 24 additions and 3 deletions

View File

@ -408,4 +408,13 @@ include $(TOPDIR)/tools/Rust.defs
# LDC (LLVM D Compiler) toolchain
include $(TOPDIR)/tools/D.defs
include $(TOPDIR)/tools/D.defs
# Shared library build flags
SHCCFLAGS = -fPIC -fPIE -fvisibility=default
SHLDFLAGS = -shared -Bsymbolic -Bdynamic -G
ifeq ($(CONFIG_SIM_M32),y)
SHLDFLAGS += -melf_i386
endif

View File

@ -402,4 +402,13 @@ include $(TOPDIR)/tools/Rust.defs
# LDC (LLVM D Compiler) toolchain
include $(TOPDIR)/tools/D.defs
include $(TOPDIR)/tools/D.defs
# Shared library build flags
SHCCFLAGS = -fPIC -fPIE -fvisibility=default
SHLDFLAGS = -shared -Bsymbolic -Bdynamic -G
ifeq ($(CONFIG_SIM_M32),y)
SHLDFLAGS += -melf_i386
endif

View File

@ -289,10 +289,13 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
endif
endif
SHCCFLAGS = -fPIC -fPIE -fvisibility=default
SHLDFLAGS = -shared -Bsymbolic -Bdynamic -G
ifeq ($(CONFIG_SIM_M32),y)
LDLINKFLAGS += -melf_i386
LDFLAGS += -m32
LDMODULEFLAGS += -melf_i386
SHMODULEFLAGS += -melf_i386
SHLDFLAGS += -melf_i386
LDELFFLAGS += -melf_i386
endif