oleavr-rgl-a500-mini-linux-.../scripts/gcc-x86_32-has-stack-protector.sh
Ole André Vadla Ravnås 169c65d57e Initial commit
2022-05-07 01:01:45 +02:00

8 lines
184 B
Bash

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