Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: improve stack protector check
Testing a toolchain for proper -fstack-protector must go beyond ensuring the compiler and linker accept the option. If the test C program does nothing with the stack then guards aren't inserted and/or are optimized away giving the false impression that it works when in fact the libc might not support it. Update the check to a program that uses the stack, hence making a link fail if proper support isn't available, for example in non-ssp enabled uclibc toolchains like this: test.c:(.text.startup+0x64): undefined reference to `__stack_chk_fail' Signed-off-by: Gustavo Zacarias <[email protected]> Reviewed-by: Jeremy Allison <[email protected]> Reviewed-by: Ralph Böhme <[email protected]> Autobuild-User(master): Jeremy Allison <[email protected]> Autobuild-Date(master): Mon Sep 21 23:29:13 CEST 2015 on sn-devel-104
- Loading branch information