From a78689874a15f26d23b09bd5e8c7b29879ea7081 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 11 Mar 2021 20:56:00 +0100 Subject: [PATCH] cpu/native: add `-no-pie` to LINKFLAGS This fixes the following warning on newer gcc/ld: ``` /usr/bin/ld: examples/hello-world/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE ``` --- boards/native/Makefile.include | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 48474fb055..3ba0c19aae 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -70,6 +70,13 @@ endif # XFA (cross file array) support LINKFLAGS += -T$(RIOTBASE)/cpu/native/ldscripts/xfa.ld +# fix this warning: +# ``` +# /usr/bin/ld: examples/hello-world/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text' +# /usr/bin/ld: warning: creating DT_TEXTREL in a PIE +# ``` +LINKFLAGS += -no-pie + # clean up unused functions CFLAGS += -ffunction-sections -fdata-sections ifeq ($(OS),Darwin)