config: config: detect if assembler supports --noexecstack and pass it down
authorAndy Polyakov <appro@openssl.org>
Wed, 13 Jul 2011 14:25:22 +0000 (14:25 +0000)
committerAndy Polyakov <appro@openssl.org>
Wed, 13 Jul 2011 14:25:22 +0000 (14:25 +0000)
[from HEAD].

config

diff --git a/config b/config
index 91eb514cf76c0182337609cc86481c7935739b39..d7347cd57f0a4b92e777c8a1dafceffdbf43fe0f 100755 (executable)
--- a/config
+++ b/config
@@ -822,6 +822,10 @@ esac
 #  options="$options -DATALLA"
 #fi
 
+($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \
+ grep \\--noexecstack) 2>&1 > /dev/null && \
+  options="$options -Wa,--noexecstack"
+
 # gcc < 2.8 does not support -march=ultrasparc
 if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
 then