Skip to content

Commit

Permalink
scripts: Update to mingw-w64-build 9.3.0 (GCC 10.5 and friends).
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleysepos committed Sep 24, 2023
1 parent 9dc827b commit f196238
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions scripts/mingw-w64-build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# mingw-w64-build - download and build mingw-w64 toolchain
#
# Copyright 2020 Bradley Sepos
# Copyright 2023 Bradley Sepos
# Released under the MIT License. See LICENSE for details.
# https://github.com/bradleysepos/mingw-w64-build

Expand Down Expand Up @@ -117,14 +117,14 @@ function mingw-w64-build { # mingw-w64-build [args] $TARGET_PARAM $TARGET_DIR

# versions
local CONFIG_VER BINUTILS_VER MINGW_W64_VER GMP_VER MPFR_VER MPC_VER ISL_VER GCC_VER GDB_VER VERSIONS
CONFIG_VER="77632d9" # config.guess 2020-11-07
BINUTILS_VER="2.35.1"
MINGW_W64_VER="8.0.0"
GMP_VER="6.2.0"
MPFR_VER="4.1.0"
MPC_VER="1.2.1"
ISL_VER="0.22.1"
GCC_VER="10.2.0"
CONFIG_VER="e478644" # config.guess 2023-08-22
BINUTILS_VER="2.41"
MINGW_W64_VER="8.0.2"
GMP_VER="6.3.0"
MPFR_VER="4.2.1"
MPC_VER="1.3.1"
ISL_VER="0.26"
GCC_VER="10.5.0"
VERSIONS=("${CONFIG_VER}" "${BINUTILS_VER}" "${MINGW_W64_VER}" "${GMP_VER}" "${MPFR_VER}" "${MPC_VER}" "${ISL_VER}" "${GCC_VER}")

# filenames
Expand All @@ -148,26 +148,26 @@ function mingw-w64-build { # mingw-w64-build [args] $TARGET_PARAM $TARGET_DIR
GMP_URLS=("https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VER}.tar.bz2" "${ARCHIVE_URL}/${GMP_PKG}")
MPFR_URLS=("https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VER}.tar.gz" "${ARCHIVE_URL}/${MPFR_PKG}")
MPC_URLS=("https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VER}.tar.gz" "${ARCHIVE_URL}/${MPC_PKG}")
ISL_URLS=("http://isl.gforge.inria.fr/isl-${ISL_VER}.tar.bz2" "${ARCHIVE_URL}/${ISL_PKG}")
ISL_URLS=("https://libisl.sourceforge.io/isl-${ISL_VER}.tar.bz2" "${ARCHIVE_URL}/${ISL_PKG}")
GCC_URLS=("https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.gz" "${ARCHIVE_URL}/${GCC_PKG}")
URLS_VARNAMES=('CONFIG_URLS' 'BINUTILS_URLS' 'MINGW_W64_URLS' 'GMP_URLS' 'MPFR_URLS' 'MPC_URLS' 'ISL_URLS' 'GCC_URLS')

# checksums
local CONFIG_SHA256 BINUTILS_SHA256 MINGW_W64_SHA256 GMP_SHA256 MPFR_SHA256 MPC_SHA256 ISL_SHA256 GCC_SHA256 GDB_SHA256 CHECKSUMS
CONFIG_SHA256="74a9d78c80258ae18e275c272056d6a7f606230c029890c614fa805ea44bb0bf"
BINUTILS_SHA256="320e7a1d0f46fcd9f413f1046e216cbe23bb2bce6deb6c6a63304425e48b1942"
MINGW_W64_SHA256="44c740ea6ab3924bc3aa169bad11ad3c5766c5c8459e3126d44eabb8735a5762"
GMP_SHA256="f51c99cb114deb21a60075ffb494c1a210eb9d7cb729ed042ddb7de9534451ea"
MPFR_SHA256="3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6"
MPC_SHA256="17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"
ISL_SHA256="1a668ef92eb181a7c021e8531a3ca89fd71aa1b3744db56f68365ab0a224c5cd"
GCC_SHA256="27e879dccc639cd7b0cc08ed575c1669492579529b53c9ff27b0b96265fa867d"
CONFIG_SHA256="5ff5d77fe5900690c150aa9ed59c6a4461279edccb906edfb34427cde05949df"
BINUTILS_SHA256="a4c4bec052f7b8370024e60389e194377f3f48b56618418ea51067f67aaab30b"
MINGW_W64_SHA256="f00cf50951867a356d3dc0dcc7a9a9b422972302e23d54a33fc05ee7f73eee4d"
GMP_SHA256="ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb"
MPFR_SHA256="116715552bd966c85b417c424db1bbdf639f53836eb361549d1f8d6ded5cb4c6"
MPC_SHA256="ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"
ISL_SHA256="5eac8664e9d67be6bd0bee5085d6840b8baf738c06814df47eaf4166d9776436"
GCC_SHA256="eed4dd5fc3cd9f52cb3a51a4fde1728cb19ec76292f559518e83652e7437befe"
CHECKSUMS=("${CONFIG_SHA256}" "${BINUTILS_SHA256}" "${MINGW_W64_SHA256}" "${GMP_SHA256}" "${MPFR_SHA256}" "${MPC_SHA256}" "${ISL_SHA256}" "${GCC_SHA256}")

# internal vars
local NAME VERSION SELF SELF_NAME HELP
NAME="mingw-w64-build"
VERSION="9.2.0"
VERSION="9.3.0"
SELF="${BASH_SOURCE[0]}"
SELF_NAME=$(basename "${SELF}")
HELP="\
Expand Down Expand Up @@ -337,13 +337,13 @@ default install-dir: ${HOME}/toolchains/mingw-w64-${MINGW_W64_VER}-gcc-${GCC_VER
if [[ "${DISABLE_GDB}" == false ]] || [[ "${LIST}" == true ]]; then
GDB_NAME="gdb"
NAMES+=("${GDB_NAME}")
GDB_VER="10.1"
GDB_VER="10.2"
VERSIONS+=("${GDB_VER}")
GDB_PKG="gdb-${GDB_VER}.tar.gz"
PKGS+=("${GDB_PKG}")
GDB_URLS=("https://ftp.gnu.org/gnu/gdb/gdb-${GDB_VER}.tar.gz" "${ARCHIVE_URL}/${GDB_PKG}")
URLS_VARNAMES+=('GDB_URLS')
GDB_SHA256="f12f388b99e1408c01308c3f753313fafa45517740c81ab7ed0d511b13e2cf55"
GDB_SHA256="b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350"
CHECKSUMS+=("${GDB_SHA256}")
fi

Expand Down Expand Up @@ -715,15 +715,15 @@ default install-dir: ${HOME}/toolchains/mingw-w64-${MINGW_W64_VER}-gcc-${GCC_VER
# gdb
if [[ "${DISABLE_GDB}" == false ]]; then
echo ""
printf "Building [%02i/%02i] %s " "11" "${TOTAL}" "gdb"
printf "Building [%02i/%02i] %s " "11" "${TOTAL}" "gdb ${GDB_VER}"
touch "${LOG_DIR}/gdb.log"
mkdir -pv "${BUILD_DIR}/gdb" > "${LOG_DIR}/gdb.log" 2>&1 || return 1
cd "${BUILD_DIR}/gdb"
# https://sourceware.org/bugzilla/show_bug.cgi?id=18113
echo '#!/bin/sh' > makeinfo
echo 'echo "makeinfo (GNU texinfo) 5.2"' >> makeinfo
chmod a+x makeinfo
"${SOURCE_DIR}/gdb/gdb-${GDB_VER}/configure" --build="${SYS_TYPE}" --host="${TARGET}" --prefix="${MINGW_W64_DIR}" -disable-multilib --enable-checking=release --enable-languages=c,c++ --enable-lto --disable-shared --enable-static MAKEINFO="${BUILD_DIR}/gdb/makeinfo" >> "${LOG_DIR}/gdb.log" 2>&1 || return 1
"${SOURCE_DIR}/gdb/gdb-${GDB_VER}/configure" --build="${SYS_TYPE}" --host="${TARGET}" --prefix="${MINGW_W64_DIR}" --disable-multilib --enable-checking=release --enable-languages=c,c++ --enable-lto --disable-shared --enable-static MAKEINFO="${BUILD_DIR}/gdb/makeinfo" >> "${LOG_DIR}/gdb.log" 2>&1 || return 1
make -j "${JOBS}" >> "${LOG_DIR}/gdb.log" 2>&1 || return 1
make install >> "${LOG_DIR}/gdb.log" 2>&1 || return 1
"${TARGET}"-strip "${MINGW_W64_DIR}/bin/gdb.exe" >> "${LOG_DIR}/gdb.log" 2>&1 || return 1
Expand Down

0 comments on commit f196238

Please sign in to comment.