diff options
-rwxr-xr-x | build | 9 | ||||
-rwxr-xr-x | libexec/build-dumpmachine | 4 |
2 files changed, 5 insertions, 8 deletions
@@ -219,14 +219,7 @@ ARCHIVE_FORMAT="${ARCHIVE_FORMAT:-tar.bz2}" export PROJECT ARCHIVE_FORMAT # If unspecified go ahead and ask gcc -# FIXME there has to be a more robust way to figure this out. -if [ -z "${CBUILD}" ]; then - if command -v gcc > /dev/null 2>&1; then - CBUILD="$(gcc -dumpmachine)" - else - CBUILD="$(build-dumpmachine)" - fi -fi +CBUILD="${CBUILD:-$(build-dumpmachine)}" export CBUILD # FIXME this stuff needs to be detected in a more reliable fashion diff --git a/libexec/build-dumpmachine b/libexec/build-dumpmachine index b02565c..28e7787 100755 --- a/libexec/build-dumpmachine +++ b/libexec/build-dumpmachine @@ -129,6 +129,10 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' +if gcc -dumpmachine > /dev/null 2>&1; then + exec gcc -dumpmachine +fi + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |