swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: 39a8804455fb23f09157341d3ba7db6d7ae6ee76 authored by Linus Torvalds on 12 April 2015, 22:12:50 UTC
Linux 4.0
Tip revision: 39a8804
gcc-x86_64-has-stack-protector.sh
#!/bin/sh

echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
if [ "$?" -eq "0" ] ; then
	echo y
else
	echo n
fi
back to top