diff options
author | Lucas Stach <dev@lynxeye.de> | 2015-03-01 14:12:37 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-02 07:11:15 +0100 |
commit | 5adb65518eae2ed93381f05dc83d2502d660133f (patch) | |
tree | 1396ea47514d3d3c386c84a211f01b91e1d6f33c /arch/arm/Makefile | |
parent | 8f455cd24bac834de66da1715546379b30f97b0f (diff) | |
download | barebox-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/Makefile')
-rw-r--r-- | arch/arm/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index f0133d4165..b3abcae465 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -105,10 +105,12 @@ CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) # Add cleanup flags CPPFLAGS += -fdata-sections -ffunction-sections -LDFLAGS_barebox += -static --gc-sections +LDFLAGS_barebox += --gc-sections ifdef CONFIG_RELOCATABLE LDFLAGS_barebox += -pie +else +LDFLAGS_barebox += -static endif ifdef CONFIG_IMAGE_COMPRESSION |