diff --git a/buildscripts/build_gdb_windows.sh b/buildscripts/build_gdb_windows.sh index fc8a1ed22..cca5774c3 100755 --- a/buildscripts/build_gdb_windows.sh +++ b/buildscripts/build_gdb_windows.sh @@ -14,19 +14,19 @@ set -euo pipefail while (( $# > 0 )); do case $1 in - --arch) SCRIPT_ARCH=$2; shift 2 ;; + --arch) ARCH=$2; shift 2 ;; -h|--help) usage; exit 1 ;; *) echo "Unexpected argument $1"; usage; exit 1;; esac done -if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then +if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then echo "Unexpected arch $ARCH" usage exit 1 fi -if [ "${SCRIPT_ARCH}" == "win64" ]; then +if [ "${ARCH}" == "win64" ]; then HOST="x86_64-w64-mingw32" else HOST="i686-w64-mingw32" diff --git a/buildscripts/build_gmp_windows.sh b/buildscripts/build_gmp_windows.sh index 8259e9dd9..e14500e99 100755 --- a/buildscripts/build_gmp_windows.sh +++ b/buildscripts/build_gmp_windows.sh @@ -14,19 +14,19 @@ set -euo pipefail while (( $# > 0 )); do case $1 in - --arch) SCRIPT_ARCH=$2; shift 2 ;; + --arch) ARCH=$2; shift 2 ;; -h|--help) usage; exit 1 ;; *) echo "Unexpected argument $1"; usage; exit 1;; esac done -if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then - echo "Unexpected arch $SCRIPT_ARCH" +if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then + echo "Unexpected arch $ARCH" usage exit 1 fi -if [ "${SCRIPT_ARCH}" == "win64" ]; then +if [ "${ARCH}" == "win64" ]; then HOST="x86_64-w64-mingw32" else HOST="i686-w64-mingw32" diff --git a/buildscripts/build_libexpat_windows.sh b/buildscripts/build_libexpat_windows.sh index 4be4b552c..d940f0414 100755 --- a/buildscripts/build_libexpat_windows.sh +++ b/buildscripts/build_libexpat_windows.sh @@ -14,21 +14,21 @@ set -euo pipefail while (( $# > 0 )); do case $1 in - --arch) SCRIPT_ARCH=$2; shift 2 ;; + --arch) ARCH=$2; shift 2 ;; -h|--help) usage; exit 1 ;; *) echo "Unexpected argument $1"; usage; exit 1;; esac done -if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then - echo "Unexpected arch $SCRIPT_ARCH" +if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then + echo "Unexpected arch $ARCH" usage exit 1 fi "$(dirname $0)"/download/download_libexpat.sh -if [ "${SCRIPT_ARCH}" == "win64" ]; then +if [ "${ARCH}" == "win64" ]; then HOST="x86_64-w64-mingw32" else HOST="i686-w64-mingw32" diff --git a/buildscripts/docker/Dockerfile.windows_builder b/buildscripts/docker/Dockerfile.windows_builder index 0bae8168a..6bcf08fac 100644 --- a/buildscripts/docker/Dockerfile.windows_builder +++ b/buildscripts/docker/Dockerfile.windows_builder @@ -224,21 +224,21 @@ COPY download/download_gmp.sh /build/download/download_gmp.sh COPY build_gmp_windows.sh /build/build_gmp_windows.sh RUN mkdir -p /src/gmp && \ cd /src/gmp && \ - /build/build_gmp_windows.sh && \ + /build/build_gmp_windows.sh --arch ${SCRIPT_ARCH} && \ rm -fr /src/gmp COPY download/download_libexpat.sh /build/download/download_libexpat.sh COPY build_libexpat_windows.sh /build/build_libexpat_windows.sh RUN mkdir -p /src/libexpat && \ cd /src/libexpat && \ - /build/build_libexpat_windows.sh && \ + /build/build_libexpat_windows.sh --arch ${SCRIPT_ARCH} && \ rm -fr /src/libexpat COPY download/download_gdb.sh /build/download/download_gdb.sh COPY build_gdb_windows.sh /build/build_gdb_windows.sh RUN mkdir -p /src/gdb && \ cd /src/gdb && \ - /build/build_gdb_windows.sh && \ + /build/build_gdb_windows.sh --arch ${SCRIPT_ARCH} && \ rm -fr /src/gdb && \ cp /windows/bin/gdb.exe /debug_export/gdb.exe