summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-05-24 09:05:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-05-24 09:16:30 +0200
commit626edf58df45b87eb590627b71436aafaa3624b5 (patch)
treed35ecc04a289ae0d077c8b5e03533ad768eec78e
parent4a64060e90f69f146edd095016548f3235410f0b (diff)
downloadbarebox-626edf58df45b87eb590627b71436aafaa3624b5.tar.gz
barebox-626edf58df45b87eb590627b71436aafaa3624b5.tar.xz
Makefile: Speed up evaluation of ld optionsv2017.05.1
Since "333ff7b1e4 Fix linking with new ld, based on u-boot" the build with multiple images became unreasonable slow. This is because the ld-option macro was evaluated once for each image. Fix this by exporting and using LDFLAGS_barebox from the main Makefile. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--Makefile1
-rw-r--r--images/Makefile5
2 files changed, 2 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3b8d73dab8..da65a1ab40 100644
--- a/Makefile
+++ b/Makefile
@@ -321,6 +321,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL
export AFLAGS AFLAGS_KERNEL
+export LDFLAGS_barebox
# Files to ignore in find ... statements
diff --git a/images/Makefile b/images/Makefile
index 8c5dac4bff..8818c221a3 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -53,11 +53,8 @@ extra-y += $(pbl-lds)
$(pbl-lds): $(obj)/../arch/$(ARCH)/lib/pbl.lds.S FORCE
$(call if_changed_dep,cpp_lds_S)
-# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
-LDFLAGS += $(call ld-option, --no-dynamic-linker)
-
quiet_cmd_elf__ ?= LD $@
- cmd_elf__ ?= $(LD) $(LDFLAGS) --gc-sections -pie \
+ cmd_elf__ ?= $(LD) $(LDFLAGS_barebox) --gc-sections -pie \
-e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \
-T $(pbl-lds) \
--start-group $(barebox-pbl-common) --end-group