mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] Makefile: Speed up evaluation of ld options
Date: Wed, 24 May 2017 09:08:51 +0200	[thread overview]
Message-ID: <20170524070851.9647-1-s.hauer@pengutronix.de> (raw)

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>
---
 Makefile        | 1 +
 images/Makefile | 5 +----
 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 3f48267bca..705c8ad03e 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
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2017-05-24  7:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170524070851.9647-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox