Add descriptions to the gcc tests in tools/test-gcc.sh.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 1 Jul 2009 01:13:44 +0000 (21:13 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 1 Jul 2009 01:13:44 +0000 (21:13 -0400)
tools/test-gcc.sh

index 738cf64051ac1b7f055b06144513b5f8f9c99c2d..e189f25d5d1ebc816af86590324ac78850decc5f 100755 (executable)
@@ -8,7 +8,8 @@ TMPFILE2=out/tmp_testcompile2.c
 TMPFILE2o=out/tmp_testcompile2.o
 TMPFILE3o=out/tmp_testcompile3.o
 
-# Test for "-fwhole-program"
+# Test for "-fwhole-program".  Older versions of gcc (pre v4.1) don't
+# support the whole-program optimization - detect that.
 $CC -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1
 if [ $? -ne 0 ]; then
     echo "  Working around no -fwhole-program" > /dev/fd/2
@@ -16,7 +17,11 @@ if [ $? -ne 0 ]; then
     exit 0
 fi
 
-# Test if "visible" variables and functions are marked global.
+# Test if "visible" variables and functions are marked global.  On
+# OpenSuse 10.3 "visible" variables declared with "extern" first
+# aren't marked as global in the resulting assembler.  On Ubuntu 7.10
+# "visible" functions aren't marked as global in the resulting
+# assembler.
 cat - > $TMPFILE1 <<EOF
 void __attribute__((externally_visible)) t1() { }
 extern unsigned char v1;
@@ -36,7 +41,9 @@ if [ $? -ne 0 ]; then
     exit 0
 fi
 
-# Test if "-combine" works
+# Test if "-combine" works.  On Ubuntu 8.04 the compiler doesn't work
+# correctly with combine and the "struct bregs" register due to the
+# anonymous unions and structs.
 mkdir -p out
 cat - > $TMPFILE1 <<EOF
 struct ts { union { int u1; struct { int u2; }; }; };
@@ -50,4 +57,8 @@ else
     echo 1
 fi
 
+# Also, the Ubuntu 8.04 compiler has a bug causing corruption when the
+# "ebp" register is clobberred in an "asm" statement.  The code has
+# been modified to not clobber "ebp" - no test is available yet.
+
 rm -f $TMPFILE1 $TMPFILE1o $TMPFILE2 $TMPFILE2o $TMPFILE3o