diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2021-03-08 12:24:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 20:24:41 +0000 |
commit | 10ddb10f9a5e20eff74d572d5bce7e7f4588a2f0 (patch) | |
tree | 9d1a0da94298eb823dde5d06ffdd6ccf5043b446 /contrib/get-gmp-dev | |
parent | 4e2afa2282965f3f54033d43cd990cc0b0a8b200 (diff) |
contrib: Do not use HOST env variable for cross-compilation host target. (#6078)
On some systems HOST is set by default to the host name. This commit adds a --host option for the get-antlr-3.4 and get-gmp-dev scripts. It further simplifies the machine type check in get-antlr-3.4 and updates the GMP version to 6.2.1.
Diffstat (limited to 'contrib/get-gmp-dev')
-rwxr-xr-x | contrib/get-gmp-dev | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/contrib/get-gmp-dev b/contrib/get-gmp-dev index d0ce045e4..4baebc265 100755 --- a/contrib/get-gmp-dev +++ b/contrib/get-gmp-dev @@ -11,9 +11,25 @@ source "$(dirname "$0")/get-script-header.sh" -[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="--enable-shared --enable-static" -[ -n "$HOST" ] && HOST="--host=$HOST" -[ -z "$GMPVERSION" ] && GMPVERSION=6.2.0 +CONFIG= +while :; do + case $1 in + --host=?*) + host=${1#*=} + CONFIG="--host=$host" + ;; + --host=) + echo "Error: empty --host=" + exit 1 + ;; + *) + break + esac + shift +done + +[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="--disable-shared --enable-static" +[ -z "$GMPVERSION" ] && GMPVERSION=6.2.1 GMP_DIR="$DEPS_DIR/gmp-$GMPVERSION" rm -rf "$GMP_DIR" @@ -35,7 +51,7 @@ echo "Setting up GMP $GMPVERSION..." echo setup_dep "https://gmplib.org/download/gmp/gmp-$GMPVERSION.tar.bz2" "$GMP_DIR" cd "$GMP_DIR" -./configure ${HOST} --prefix="$INSTALL_DIR" --enable-cxx ${BUILD_TYPE} +./configure ${CONFIG} --prefix="$INSTALL_DIR" --enable-cxx ${BUILD_TYPE} make \ CFLAGS="${MAKE_CFLAGS}" \ CXXFLAGS="${MAKE_CXXFLAGS}" \ |