swh:1:snp:173f8deb0c56c557784b4fd217e7608ac6197844
Raw File
Tip revision: 4be3bd7849165e7efa6b0b35a23d6a3598d97465 authored by Linus Torvalds on 23 July 2009, 02:32:59 UTC
Linux 2.6.31-rc4
Tip revision: 4be3bd7
gcc-x86_64-has-stack-protector.sh
#!/bin/sh

echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -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