From: Jan Heylen <heyleke@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 3/4] toolchain: add TARGET_LDFLAGS to toolchain-wrapper
Date: Tue, 5 Apr 2016 21:45:20 +0200 [thread overview]
Message-ID: <1459885521-25434-3-git-send-email-heyleke@gmail.com> (raw)
In-Reply-To: <1459885521-25434-1-git-send-email-heyleke@gmail.com>
only done for ld-wrapper, LDFLAGS is still set as before for gcc
---
toolchain/toolchain-wrapper.c | 3 +++
toolchain/toolchain-wrapper.mk | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 8d1739c..d6ecf84 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -94,6 +94,9 @@ static char *ld_predef_args[] = {
#if defined(BR_MIPS_TARGET_BIG_ENDIAN) || defined(BR_ARC_TARGET_BIG_ENDIAN)
"-EB",
#endif
+#ifdef BR_ADDITIONAL_LDFLAGS
+ BR_ADDITIONAL_LDFLAGS
+#endif
};
static void check_unsafe_path(const char *path, int paranoid)
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index f868fad..c7cc38e 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -14,9 +14,13 @@ TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"'
# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each flag is a
# separate argument when used in execv() by the toolchain wrapper.
-TOOLCHAIN_WRAPPER_OPTS = \
+TOOLCHAIN_WRAPPER_CFLAGS_OPTS = \
$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)"$(comma))
-TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(TOOLCHAIN_WRAPPER_OPTS)'
+TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(TOOLCHAIN_WRAPPER_CFLAGS_OPTS)'
+
+TOOLCHAIN_WRAPPER_LDFLAGS_OPTS = \
+ $(foreach f,$(subst -Wl$(comma),$(empty),$(call qstrip,$(BR2_TARGET_LDFLAGS))),"$(f)"$(comma))
+TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_LDFLAGS='$(TOOLCHAIN_WRAPPER_LDFLAGS_OPTS)'
ifeq ($(BR2_CCACHE),y)
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
--
2.5.0
next prev parent reply other threads:[~2016-04-05 19:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 19:45 [Buildroot] [PATCH v2 1/4] toolchain: wrap 'ld' with toolchain-wrapper Jan Heylen
2016-04-05 19:45 ` [Buildroot] [PATCH v2 2/4] toolchain: add option to specify ld emulation Jan Heylen
2016-04-05 19:45 ` Jan Heylen [this message]
2016-04-05 19:45 ` [Buildroot] [PATCH v2 4/4] arch: define appropriate ld emulation values for the MIPS architecture Jan Heylen
2016-10-16 10:05 ` [Buildroot] [PATCH v2 1/4] toolchain: wrap 'ld' with toolchain-wrapper Thomas Petazzoni
2016-10-16 11:36 ` Jan Heylen
2016-10-16 12:28 ` Thomas Petazzoni
2016-10-16 12:38 ` Vicente Olivert Riera
2016-10-16 15:00 ` Jan Heylen
2016-10-16 15:15 ` Vicente Olivert Riera
2016-10-16 15:19 ` Jan Heylen
2016-10-16 15:33 ` Vicente Olivert Riera
2016-10-16 17:27 ` Jan Heylen
2016-10-24 6:00 ` Jan Heylen
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=1459885521-25434-3-git-send-email-heyleke@gmail.com \
--to=heyleke@gmail.com \
--cc=buildroot@busybox.net \
/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