Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] toolchain-wrapper.mk: refactor additional flags into TARGET_FLAGS
@ 2016-10-18 18:51 Arnout Vandecappelle
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2016-10-18 18:51 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-25 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 18:51 [Buildroot] [PATCH 1/2] toolchain-wrapper.mk: refactor additional flags into TARGET_FLAGS Arnout Vandecappelle
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox