aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin@orange.com>2019-03-12 13:09:32 +0100
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-03-13 00:00:59 +0100
commit15892d5656c6da7f8f58066df013a6ff428897bf (patch)
tree2affaa569e964b00d995596037dad22bf611106d /toolchain
parent031a033eb267d1db98c88c87177ebb743e57f839 (diff)
downloadbuildroot-15892d5656c6da7f8f58066df013a6ff428897bf.tar.gz
buildroot-15892d5656c6da7f8f58066df013a6ff428897bf.tar.bz2
toolchain: prepare to pass more additional CFLAGS via the wrapper
Currently, we pass the user-supplied so-called target optimisation flags to the wrapper. We're going to have additional such CFLAGS to pass, so push-back the formatting loop to quote the options at the last moment. Reported-by: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: "Yann E. MORIN" <yann.morin@orange.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/toolchain-wrapper.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 613f5f6c56..c9e6fd3f3d 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -16,11 +16,13 @@ endif
TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS)
TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"'
+TOOLCHAIN_WRAPPER_OPTS = \
+ $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
+
# 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,$(TOOLCHAIN_WRAPPER_OPTS),"$(f)"$(comma))'
ifeq ($(BR2_CCACHE),y)
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE