/scripts/gcc-x86_32-has-stack-protector.sh
Shell | 8 lines | 6 code | 1 blank | 1 comment | 1 complexity | c41c70d0a390e67fe978160ed83b68f4 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
1#!/bin/sh
2
3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then
5 echo y
6else
7 echo n
8fi