https://github.com/torvalds/linux
Raw File
Tip revision: a121103c922847ba5010819a3f250f1f7fc84ab8 authored by Linus Torvalds on 08 January 2017, 22:18:17 UTC
Linux 4.10-rc3
Tip revision: a121103
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 -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
if [ "$?" -eq "0" ] ; then
	echo y
else
	echo n
fi
back to top