summaryrefslogtreecommitdiffstats
path: root/kernel/scripts/gcc-x86_32-has-stack-protector.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/scripts/gcc-x86_32-has-stack-protector.sh')
-rwxr-xr-xkernel/scripts/gcc-x86_32-has-stack-protector.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/scripts/gcc-x86_32-has-stack-protector.sh b/kernel/scripts/gcc-x86_32-has-stack-protector.sh
new file mode 100755
index 000000000..12dbd0b11
--- /dev/null
+++ b/kernel/scripts/gcc-x86_32-has-stack-protector.sh
@@ -0,0 +1,8 @@
+#!/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