mirror of
https://github.com/apache/nuttx.git
synced 2025-01-12 20:58:44 +08:00
risc-v/Toolchain.defs: guard -r in LDELFFLAGS
This guards use of `-r` in LDELFFLAGS in risc-v common/Toolchain.defs so that it is only used when BINFMT_ELF_RELOCATABLE is selected. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
63c8de5f03
commit
71a4e86718
1 changed files with 6 additions and 1 deletions
|
@ -433,7 +433,12 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/modlib/gnu-elf.ld)
|
||||||
CELFFLAGS = $(CFLAGS) -fvisibility=hidden
|
CELFFLAGS = $(CFLAGS) -fvisibility=hidden
|
||||||
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden
|
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden
|
||||||
|
|
||||||
LDELFFLAGS = -r -e main
|
LDELFFLAGS = -e main
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_BINFMT_ELF_RELOCATABLE),y)
|
||||||
|
LDELFFLAGS += -r
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_RV32),y)
|
ifeq ($(CONFIG_ARCH_RV32),y)
|
||||||
LDELFFLAGS += --oformat elf32-littleriscv
|
LDELFFLAGS += --oformat elf32-littleriscv
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue