https://github.com/torvalds/linux
Raw File
Tip revision: 7ce7d89f48834cefece7804d38fc5d85382edf77 authored by Linus Torvalds on 26 December 2016, 00:13:08 UTC
Linux 4.10-rc1
Tip revision: 7ce7d89
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