https://github.com/torvalds/linux
Raw File
Tip revision: 959f58544b7f20c92d5eb43d1232c96c15c01bfb authored by Linus Torvalds on 27 October 2013, 23:12:03 UTC
Linux 3.12-rc7
Tip revision: 959f585
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