swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: 72d31053f62c4bc464c2783974926969614a8649 authored by Linus Torvalds on 21 September 2008, 22:29:55 UTC
Linux 2.6.27-rc7
Tip revision: 72d3105
gcc-x86_64-has-stack-protector.sh
#!/bin/sh

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