[Buildroot] [PATCH v4] toolchain: improve SSP logic

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon May 23 19:16:44 UTC 2016


Hello,

On Tue, 15 Mar 2016 16:40:38 +0000, Vicente Olivert Riera wrote:
> Don't enable SSP support on external toolchains just because they use
> glibc or musl. Instead of that, make the external toolchains explictily
> declare if they support SSP or not. And also add a check to detect SSP
> support when using custom external toolchains.
> 
> For internal toolchains we always enable SSP support for glibc and musl.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>

A reference to some autobuilder failures was missing here, to justify
applying this on master rather than next, so I've added one.

> +check_toolchain_ssp = \
> +	__CROSS_CC=$(strip $1) ; \
> +	__HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp && echo y` ; \

I've redirected stdout/stderr from gcc to /dev/null in order to avoid
causing confusion for the user, who would have seen some weird gcc
errors when the ssp test fails.

And also, I've removed the existing SSP test which was done
specifically for uClibc external toolchains, since there is now a more
generic check for SSP, which works for all C libraries.

Applied to master with those changes.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list