Bug 731151 - Avoid creating (and leaving around) an a.out during configure. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 28 Feb 2012 10:48:16 +0100
changeset 91248 91ece9783d2d13d913fc3c580a7bcb76900daa8b
parent 91247 00b9b543a781c525bcd1170127e59ad35c38716f
child 91249 4bc3e20ff0e004ea7ca7c9c3d420ba3e1edc9e50
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs731151
milestone13.0a1
Bug 731151 - Avoid creating (and leaving around) an a.out during configure. r=khuey
configure.in
js/src/configure.in
--- a/configure.in
+++ b/configure.in
@@ -623,19 +623,20 @@ CXX_VERSION='N/A'
 if test "$GCC" = "yes"; then
     GNU_CC=1
     CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
 fi
 if test "$GXX" = "yes"; then
     GNU_CXX=1
     CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'`
 fi
-if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
+if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
     GNU_AS=1
 fi
+rm -f conftest.out
 if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
     GNU_LD=1
 fi
 if test "$GNU_CC"; then
     if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
         GCC_USE_GNU_LD=1
     fi
 fi
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -611,19 +611,20 @@ CXX_VERSION='N/A'
 if test "$GCC" = "yes"; then
     GNU_CC=1
     CC_VERSION=`$CC -v 2>&1 | grep 'gcc version'`
 fi
 if test "$GXX" = "yes"; then
     GNU_CXX=1
     CXX_VERSION=`$CXX -v 2>&1 | grep 'gcc version'`
 fi
-if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
+if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
     GNU_AS=1
 fi
+rm -f conftest.out
 if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
     GNU_LD=1
 fi
 if test "$GNU_CC"; then
     if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
         GCC_USE_GNU_LD=1
     fi
 fi