summaryrefslogtreecommitdiffstats
path: root/arch/arm/pbl
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2015-03-01 14:12:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-02 07:11:15 +0100
commit5adb65518eae2ed93381f05dc83d2502d660133f (patch)
tree1396ea47514d3d3c386c84a211f01b91e1d6f33c /arch/arm/pbl
parent8f455cd24bac834de66da1715546379b30f97b0f (diff)
downloadbarebox-5adb65518eae2ed93381f05dc83d2502d660133f.tar.gz
barebox-5adb65518eae2ed93381f05dc83d2502d660133f.tar.xz
ARM: do not specify -static and -pie at the same time
PIE is a form of dynamic linking and thus inherently incompatible with -static. It worked ok as the current behavior of ld.bfd is to not respect -static if -pie has been specified. ld.gold and future versions of ld.bfd will fail to link if both of those incompatible switches are specified at the same time. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/pbl')
-rw-r--r--arch/arm/pbl/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 1b90b377a6..4c1788dd9d 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -31,10 +31,11 @@ $(obj)/zbarebox.S: $(obj)/zbarebox FORCE
$(call if_changed,disasm)
PBL_CPPFLAGS += -fdata-sections -ffunction-sections
-LDFLAGS_zbarebox := -Map $(obj)/zbarebox.map
-LDFLAGS_zbarebox += -static --gc-sections
+LDFLAGS_zbarebox := -Map $(obj)/zbarebox.map --gc-sections
ifdef CONFIG_PBL_RELOCATABLE
LDFLAGS_zbarebox += -pie
+else
+LDFLAGS_zbarebox += -static
endif
zbarebox-common := $(barebox-pbl-common) $(obj)/$(piggy_o)
zbarebox-lds := $(obj)/zbarebox.lds