[Buildroot] [PATCH 1/4] toolchain: set the ssp gcc option in kconfig
Arnout Vandecappelle
arnout at mind.be
Tue Mar 12 08:52:59 UTC 2019
On 12/03/2019 07:06, yann.morin at orange.com wrote:
> Arnout, All,
>
> On 2019-03-12 01:02 +0100, Arnout Vandecappelle spake thusly:
>> On 11/03/2019 07:48, yann.morin at orange.com wrote:
>> [snip]
> [--SNIP--]
>>> +ifneq ($(BR2_SSP_OPTION),)
>>> +TOOLCHAIN_WRAPPER_ARGS += -DBR_SSP_OPTION='$(BR2_SSP_OPTION)'
>>> endif
>> I'd really like to use the BR_ADDITIONAL_CFLAGS instead, by changing the
>> definition in the .mk file to something like:
>>
>> TOOLCHAIN_WRAPPER_OPTS = \
>> $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) \
>> $(call qstrip,$(BR2_SSP_OPTION))
>>
>> TOOLCHAIN_WRAPPER_ARGS += \
>> -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(TOOLCHAIN_WRAPPER_OPTS),"$(f)"$(comma))'
>
> OK, will do.
Note that we don't have a runtime test for BR2_TRGET_OPTIMIZATION so some
manual testing will be needed.
>> (note that I preferred the qstrip instead of the ifdef here, and adding quotes
>> explicitly in the foreach, but you may want to implement it differently).
>
> Yeah, I tried to avoid the qstriop-then-strip-anyway dance, but it is
> indeed nicer the way you wrote it.
I like the qstrip-then-quote dance, because it makes things consistent.
Note that this is a very special case because we want to quote each
space-separated option here; in general we actually want to make sure the spaces
are quoted when we do a qstrip-then-quote dance.
Regards,
Arnout
More information about the buildroot
mailing list