sim/m64:Fix ld error with .rodata can not be used when making a PIE object.
/usr/bin/ld: nuttx.rel: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
71ee767fe2
commit
4253001656
|
@ -313,4 +313,10 @@ ifeq ($(CONFIG_SIM_M32),y)
|
||||||
LDMODULEFLAGS += -melf_i386
|
LDMODULEFLAGS += -melf_i386
|
||||||
SHMODULEFLAGS += -melf_i386
|
SHMODULEFLAGS += -melf_i386
|
||||||
LDELFFLAGS += -melf_i386
|
LDELFFLAGS += -melf_i386
|
||||||
|
else ifeq ($(CONFIG_HOST_MACOS),)
|
||||||
|
# To compile 64-bit Sim, adding no-pie is necessary to prevent linking errors
|
||||||
|
# but this may cause other issues on Ubuntu 20.
|
||||||
|
ARCHCFLAGS += -no-pie
|
||||||
|
ARCHPICFLAGS += -no-pie
|
||||||
|
LDFLAGS += -Wl,-no-pie
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue