From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: afa@pengutronix.de
Subject: [PATCH 1/2] Kbuild: create LDFLAGS_common
Date: Tue, 8 Nov 2022 11:49:26 +0100 [thread overview]
Message-ID: <20221108104927.1922424-1-s.hauer@pengutronix.de> (raw)
The same linker flags are passed to both LDFLAGS_barebox and LDFLAGS_pbl.
Instead of duplicating it create a LDFLAGS_common variable for these
common flags.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index d7f1e3779a..12882ef4cf 100644
--- a/Makefile
+++ b/Makefile
@@ -453,8 +453,10 @@ KBUILD_CFLAGS_MODULE := -DMODULE
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)
+LDFLAGS_common += $(call ld-option, --no-dynamic-linker)
+
+LDFLAGS_barebox += $(LDFLAGS_common)
+LDFLAGS_pbl += $(LDFLAGS_common)
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL PYTHON3 UTS_MACHINE
--
2.30.2
next reply other threads:[~2022-11-08 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 10:49 Sascha Hauer [this message]
2022-11-08 10:49 ` [PATCH 2/2] Kbuild: link with -z noexecstack and --no-warn-rwx-segments Sascha Hauer
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=20221108104927.1922424-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=afa@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