diff options
author | Mark Ferrell <major@homeonderanged.org> | 2012-04-25 16:27:06 -0500 |
---|---|---|
committer | Mark Ferrell <major@homeonderanged.org> | 2012-04-25 16:27:06 -0500 |
commit | 0e292695d93e4792df7faf82b7d67a71a889739e (patch) | |
tree | 0a37928c873d0d45b9bca798cafcaa7e772ae69a | |
parent | dbe009b97f8148dcb335746e42a274f18b5b6c07 (diff) |
Dumpmachine from gcc if available.
-rwxr-xr-x | scripts/build | 8 |
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 |