aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-x86_32-has-stack-protector.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gcc-x86_32-has-stack-protector.sh')
-rw-r--r--scripts/gcc-x86_32-has-stack-protector.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/gcc-x86_32-has-stack-protector.sh b/scripts/gcc-x86_32-has-stack-protector.sh
new file mode 100644
index 00000000000..29493dc4528
--- /dev/null
+++ b/scripts/gcc-x86_32-has-stack-protector.sh
@@ -0,0 +1,8 @@
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