summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-02-18 10:28:55 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-02-24 12:01:34 -0500
commite5fe4f966bfdc4766c2cacc2f73756487a77f1b8 (patch)
treeb80748337a15e063d4892d65b081b04e4717f9ff
parent4219149ad2b783abfa61e80e9e9f6910db0c76c9 (diff)
downloadqemu-seabios-e5fe4f966bfdc4766c2cacc2f73756487a77f1b8.tar.gz
Verify CC is valid during build tests.
Update test-build.sh to report if it can't run the c compiler at all. Without this test, a totally non-working build environment will yield an "invalid LD" message which can be confusing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rwxr-xr-xtools/test-build.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/test-build.sh b/tools/test-build.sh
index ce0aca9..081f9fd 100755
--- a/tools/test-build.sh
+++ b/tools/test-build.sh
@@ -41,9 +41,16 @@ SECTIONS
}
EOF
$CC -O -g -c $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo "Unable to execute the C compiler ($CC)." >&2
+ echo "" >&2
+ echo "Please install a working compiler and retry." >&2
+ echo -1
+ exit 0
+fi
$LD -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null 2>&1
if [ $? -ne 0 ]; then
- echo "The version of LD on this system does not properly handle" >&2
+ echo "The version of LD on this system ($LD) does not properly handle" >&2
echo "alignments. As a result, this project can not be built." >&2
echo "" >&2
echo "The problem may be the result of this LD bug report:" >&2