1From 0e8c3c4851ce64268a8ae1810ef72594251d917d Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Sun, 10 Nov 2019 21:57:12 +0100 4Subject: [PATCH] Makefile: unconditionally disable PIE 5 6Though -nostdlib is passed in $(CFLAGS), -fno-pie must also be passed to 7avoid linking errors related to overlapping sections if toolchain 8enforces PIE. 9 10Fixes: 11 - http://autobuild.buildroot.org/results/418a40b995e91bc66e692dfbc4b0521db3fa5fbb 12 13Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 14--- 15 Makefile | 2 +- 16 1 file changed, 1 insertion(+), 1 deletion(-) 17 18diff --git a/Makefile b/Makefile 19index 5226006..fe3d844 100644 20--- a/Makefile 21+++ b/Makefile 22@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \ 23 -Werror-implicit-function-declaration -Wstrict-prototypes \ 24 -Wdeclaration-after-statement -fno-delete-null-pointer-checks \ 25 -Wempty-body -fno-strict-overflow -fno-stack-protector \ 26- -g -I$(INCLUDES) -O2 27+ -fno-pie -g -I$(INCLUDES) -O2 28 LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld 29 30 EXECUTABLE=am335x-pm-firmware.elf 31-- 322.23.0 33 34