aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/build b/scripts/build
index b73bb29..45f7789 100755
--- a/scripts/build
+++ b/scripts/build
@@ -266,7 +266,13 @@ export PROJECT ARCHIVE_FORMAT
# If unspecified go ahead and ask gcc
# FIXME there has to be a more robust way to figure this out.
-CBUILD="${CBUILD:-$(build-dumpmachine)}"
+if [ -z "${CBUILD}" ]; then
+ if command -v gcc > /dev/null 2>&1; then
+ CBUILD="$(gcc -dumpmachine)"
+ else
+ CBUILD="$(build-dumpmachine)"
+ fi
+fi
export CBUILD
# FIXME this stuff needs to be detected in a more reliable fashion