aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-04-19 21:30:48 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-04-19 21:30:48 -0400
commitff82b24f0096b022e1071670ed5c886fc223b588 (patch)
tree96b10f69748c1b435db9f941451c202b564a6259 /tools
parent5d7b3f628b00710fa8e2b56ef80127e350e49806 (diff)
downloadseabios-ff82b24f0096b022e1071670ed5c886fc223b588.tar.gz
Enhance test-gcc.sh.
Don't use "exit -1" as that is an error on some platforms. Use "-nostdlib" when linking - that is faster and works even when full development environment isn't available.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test-gcc.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/test-gcc.sh b/tools/test-gcc.sh
index f3b8b58d..c354ec3d 100755
--- a/tools/test-gcc.sh
+++ b/tools/test-gcc.sh
@@ -14,7 +14,7 @@ if [ $? -ne 0 ]; then
echo "This version of gcc does not support -fwhole-program." > /dev/fd/2
echo "Please upgrade to gcc v4.1 or later" > /dev/fd/2
echo -1
- exit -1
+ exit 1
fi
# Test if "visible" variables are marked global.
@@ -27,13 +27,13 @@ extern unsigned char t1;
int __attribute__((externally_visible)) main() { return t1; }
EOF
$CC -Os -c -fwhole-program $TMPFILE2 -o $TMPFILE2o > /dev/null 2>&1
-$CC -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1
+$CC -nostdlib -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "This version of gcc does not properly handle" > /dev/fd/2
echo " global variables in -fwhole-program mode." > /dev/fd/2
echo "Please upgrade to a newer gcc (eg, v4.3 or later)" > /dev/fd/2
echo -1
- exit -1
+ exit 1
fi
# Test if "visible" functions are marked global.
@@ -46,7 +46,7 @@ void t1();
void __attribute__((externally_visible)) main() { t1(); }
EOF
$CC -Os -c -fwhole-program $TMPFILE2 -o $TMPFILE2o > /dev/null 2>&1
-$CC -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1
+$CC -nostdlib -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " Working around non-global functions in -fwhole-program" > /dev/fd/2
fi