This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bring back the platforms that do not support -fstack-protector
authorH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 1 Jan 2008 20:12:03 +0000 (20:12 +0000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Tue, 1 Jan 2008 20:12:03 +0000 (20:12 +0000)
p4raw-id: //depot/metaconfig@32794

U/compline/ccflags.U

index b52b539..b2480f5 100644 (file)
@@ -156,16 +156,21 @@ checkccflag='check=$1; flag=$2; callback=$3;
 echo " ";
 echo "Checking if your compiler accepts $flag" 2>&1;
 echo "int main(void) { return 0; }" > gcctest.c;
-if $cc -O2 $flag -o gcctest gcctest.c && ./gcctest; then
+if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
     echo "Yes, it does." 2>&1;
-    case "$ccflags" in
-    *$check*)
-       echo "Leaving current flags $ccflags alone." 2>&1
-       ;;
-    *) dflt="$dflt $flag";
-       eval $callback
-       ;;
-    esac
+    if -s gcctest.out ; then
+        echo "But your platform does not like it:";
+        cat gcctest.out;
+    else
+       case "$ccflags" in
+       *$check*)
+           echo "Leaving current flags $ccflags alone." 2>&1
+           ;;
+       *) dflt="$dflt $flag";
+           eval $callback
+           ;;
+       esac
+    fi
 else
     echo "Nope, it does not, but that is ok." 2>&1;
 fi
@@ -530,5 +535,5 @@ y)
        ;;
 n) echo "OK, that should do.";;
 esac
-$rm_try
+$rm_try gcctest.out