gcc-x86_32-has-stack-protector.sh 184 B

12345678
  1. #!/bin/sh
  2. echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
  3. if [ "$?" -eq "0" ] ; then
  4. echo y
  5. else
  6. echo n
  7. fi