Replace hard-coded defaults for HOST and BUILD with config.guess

This commit is contained in:
Jack Grigg 2017-10-30 01:22:55 +13:00
parent 7fa05b29b6
commit e4cd341260
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 3 additions and 3 deletions

View File

@ -16,6 +16,7 @@ function gprefix() {
} }
gprefix READLINK readlink gprefix READLINK readlink
cd "$(dirname "$("$READLINK" -f "$0")")/.."
# Allow user overrides to $MAKE. Typical usage for users who need it: # Allow user overrides to $MAKE. Typical usage for users who need it:
# MAKE=gmake ./zcutil/build.sh -j$(nproc) # MAKE=gmake ./zcutil/build.sh -j$(nproc)
@ -26,10 +27,10 @@ fi
# Allow overrides to $BUILD and $HOST for porters. Most users will not need it. # Allow overrides to $BUILD and $HOST for porters. Most users will not need it.
# BUILD=i686-pc-linux-gnu ./zcutil/build.sh # BUILD=i686-pc-linux-gnu ./zcutil/build.sh
if [[ -z "${BUILD-}" ]]; then if [[ -z "${BUILD-}" ]]; then
BUILD=x86_64-unknown-linux-gnu BUILD="$(./depends/config.guess)"
fi fi
if [[ -z "${HOST-}" ]]; then if [[ -z "${HOST-}" ]]; then
HOST=x86_64-unknown-linux-gnu HOST="$BUILD"
fi fi
# Allow override to $CC and $CXX for porters. Most users will not need it. # Allow override to $CC and $CXX for porters. Most users will not need it.
@ -73,7 +74,6 @@ EOF
fi fi
set -x set -x
cd "$(dirname "$("$READLINK" -f "$0")")/.."
# If --enable-lcov is the first argument, enable lcov coverage support: # If --enable-lcov is the first argument, enable lcov coverage support:
LCOV_ARG='' LCOV_ARG=''