summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDavid Dgien <dgienda125@gmail.com>2020-06-29 20:38:36 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-01 07:21:25 +0200
commite53a886dffac2c84586d4f2c47888603bd382641 (patch)
tree368e1a4d93b7dcd72bc6d82b7eb0cf38665bf21e /arch/arm
parenta53cd2e3ed01c84250350ec1c67c6545da46a3ab (diff)
downloadbarebox-e53a886dffac2c84586d4f2c47888603bd382641.tar.gz
barebox-e53a886dffac2c84586d4f2c47888603bd382641.tar.xz
arm: makefile: Fix compiler flag variable
In order for ARM modules to compile with the correct relocation types, they must be built without -fPIE. Move -fPIE from KBUILD_CPPFLAGS to KBUILD_CFLAGS_KERNEL so that the flag is only included when compiling files being built into the barebox image. Signed-off-by: David Dgien <dgienda125@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6c7373c206..c18a1d8029 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -139,7 +139,7 @@ LDFLAGS_barebox += --gc-sections
LDFLAGS_pbl += --gc-sections
# early code often runs at addresses we are not linked at
-KBUILD_CPPFLAGS += -fPIE
+KBUILD_CFLAGS_KERNEL += -fPIE
ifdef CONFIG_RELOCATABLE
LDFLAGS_barebox += -pie