aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-x86_64-has-stack-protector.sh
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-02-09 08:17:39 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 18:41:54 -0500
commit5d707e9c8ef2a3596ed5c975c6ff05cec890c2b4 (patch)
treed0088b317ee562f6655d58f5d561e2bb6aa5332c /scripts/gcc-x86_64-has-stack-protector.sh
parent76397f72fb9f4c9a96dfe05462887811c81b0e17 (diff)
stackprotector: update make rules
Impact: no default -fno-stack-protector if stackp is enabled, cleanup Stackprotector make rules had the following problems. * cc support test and warning are scattered across makefile and kernel/panic.c. * -fno-stack-protector was always added regardless of configuration. Update such that cc support test and warning are contained in makefile and -fno-stack-protector is added iff stackp is turned off. While at it, prepare for 32bit support. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts/gcc-x86_64-has-stack-protector.sh')
-rw-r--r--scripts/gcc-x86_64-has-stack-protector.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 325c0a1b03b6..2d69fcdc5609 100644
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -2,5 +2,7 @@
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; }" | $1 -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