summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2020-01-27 14:30:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-10 09:42:43 +0100
commit07c4c069475fec43bd99e021afb3839d7b27fd5a (patch)
tree79c485537d7d537bbc567dce75fef9dc26081779 /Makefile
parent9fcd7fcd5c6028a77b6339c48a0d90f7f2dd3955 (diff)
downloadbarebox-07c4c069475fec43bd99e021afb3839d7b27fd5a.tar.gz
barebox-07c4c069475fec43bd99e021afb3839d7b27fd5a.tar.xz
images: Use separate LDFLAGS for PBL
When setting CONFIG_PBL_RELOCATABLE=y (selected by PBL_MULTI_IMAGES) and CONFIG_RELOCATABLE=n (trying to reduce image size), the PBL is also linked with "-static" instead of "-pie". The result is a non-working PBL. As a side effect, also get rid of erroneous "-Map barebox.map" when linking the PBL. Only changed for ARM, are any other platforms affected? Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e088497189..49861508a8 100644
--- a/Makefile
+++ b/Makefile
@@ -313,6 +313,7 @@ LDFLAGS_barebox := -Map barebox.map
# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
LDFLAGS_barebox += $(call ld-option, --no-dynamic-linker)
+LDFLAGS_pbl += $(call ld-option, --no-dynamic-linker)
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@@ -328,6 +329,7 @@ export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL
export AFLAGS AFLAGS_KERNEL
export LDFLAGS_barebox
+export LDFLAGS_pbl
export CFLAGS_UBSAN