[Buildroot] [PATCH 1/4] toolchain: set the ssp gcc option in kconfig

Arnout Vandecappelle arnout at mind.be
Tue Mar 12 00:02:18 UTC 2019



On 11/03/2019 07:48, yann.morin at orange.com wrote:
[snip]
> diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
> index 613f5f6c56..e48e765a8e 100644
> --- a/toolchain/toolchain-wrapper.mk
> +++ b/toolchain/toolchain-wrapper.mk
> @@ -51,12 +51,8 @@ else ifeq ($(BR2_RELRO_FULL),y)
>  TOOLCHAIN_WRAPPER_ARGS += -DBR2_RELRO_FULL
>  endif
>  
> -ifeq ($(BR2_SSP_REGULAR),y)
> -TOOLCHAIN_WRAPPER_ARGS += -DBR_SSP_REGULAR
> -else ifeq ($(BR2_SSP_STRONG),y)
> -TOOLCHAIN_WRAPPER_ARGS += -DBR_SSP_STRONG
> -else ifeq ($(BR2_SSP_ALL),y)
> -TOOLCHAIN_WRAPPER_ARGS += -DBR_SSP_ALL
> +ifneq ($(BR2_SSP_OPTION),)
> +TOOLCHAIN_WRAPPER_ARGS += -DBR_SSP_OPTION='$(BR2_SSP_OPTION)'
>  endif

 I try to mention this every time someone touches the toolchain wrapper:

 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))'

(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).

 Regards,
 Arnout


More information about the buildroot mailing list