aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-x86_64-has-stack-protector.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gcc-x86_64-has-stack-protector.sh')
-rw-r--r--scripts/gcc-x86_64-has-stack-protector.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 325c0a1b03b6..afaec618b395 100644
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,6 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "int foo(void) { char X[200]; return 3; }" | $1 -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" 3echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
4if [ "$?" -eq "0" ] ; then 4if [ "$?" -eq "0" ] ; then
5 echo $2 5 echo y
6else
7 echo n
6fi 8fi