From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] toolchain-wrapper.mk: refactor additional flags into TARGET_FLAGS
Date: Tue, 18 Oct 2016 20:51:27 +0200 [thread overview]
Message-ID: <20161018185128.6404-1-arnout@mind.be> (raw)
Currently, the additional flags encoded in the toolchain wrapper are
limited to BR2_TARGET_OPTIMIZATION. However, we are going to add more
flags to it, so it is convenient to have a TARGET_FLAGS variable
that collects all of them and do the list-to-array conversion on all
of them together.
The variable is called TARGET_FLAGS because later it will be modified
to include all the flags that we pass to the toolchain wrapper, and
it will also be used as the base for TARGET_CFLAGS etc.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
toolchain/toolchain-wrapper.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index af39071..8939650 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -9,14 +9,15 @@ else
TOOLCHAIN_WRAPPER_HASH_STYLE = both
endif
+TARGET_FLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
+
TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS)
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 = \
- $(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)"$(comma))
-TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(TOOLCHAIN_WRAPPER_OPTS)'
+TOOLCHAIN_WRAPPER_ARGS += \
+ -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(TARGET_FLAGS),"$(f)"$(comma))'
ifeq ($(BR2_CCACHE),y)
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
--
2.9.3
next reply other threads:[~2016-10-18 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 18:51 Arnout Vandecappelle [this message]
2016-10-18 18:51 ` [Buildroot] [PATCH 2/2] MIPS: add support for MSA Arnout Vandecappelle
2016-10-18 18:57 ` [Buildroot] [PATCH 1/2] toolchain-wrapper.mk: refactor additional flags into TARGET_FLAGS Arnout Vandecappelle
2016-10-25 21:41 ` Thomas Petazzoni
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=20161018185128.6404-1-arnout@mind.be \
--to=arnout@mind.be \
--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