https://github.com/torvalds/linux
Raw File
Tip revision: d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 authored by Linus Torvalds on 05 July 2015, 18:01:52 UTC
Linux 4.2-rc1
Tip revision: d770e55
gcc-x86_32-has-stack-protector.sh
#!/bin/sh

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