swh:1:snp:173f8deb0c56c557784b4fd217e7608ac6197844
Raw File
Tip revision: 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 authored by Linus Torvalds on 16 August 2014, 16:40:26 UTC
Linux 3.17-rc1
Tip revision: 7d1311b
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