From 9275ad321f3e838e14ddbe8098782f4f6dc337c6 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 13 Mar 2012 19:22:26 +0000 Subject: [PATCH] config: compensate for bug in Solaris cc drivers, which can remove /dev/null [from HEAD,1.0.1] --- config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index cf64ec563e..2cb4613a40 100755 --- a/config +++ b/config @@ -825,9 +825,11 @@ esac # options="$options -DATALLA" #fi -($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ - grep \\--noexecstack) 2>&1 > /dev/null && \ +if expr "$options" : '.*no\-asm' > /dev/null; then :; else + sh -c "$CROSS_COMPILE${CC:-gcc} -Wa,--help -c -o /tmp/null.$$.o -x assembler /dev/null && rm /tmp/null.$$.o" 2>&1 | \ + grep \\--noexecstack >/dev/null && \ options="$options -Wa,--noexecstack" +fi # gcc < 2.8 does not support -march=ultrasparc if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] -- 2.25.1