swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: 81f70ba233d5f660e1ea5fe23260ee323af5d53a authored by Linus Torvalds on 20 February 2016, 21:39:35 UTC
Linux 4.5-rc5
Tip revision: 81f70ba
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