aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeranoe <zeranoe@gmail.com>2022-04-16 00:32:10 -0400
committerGitHub <noreply@github.com>2022-04-16 00:32:10 -0400
commit100887b4d90c8c7d79b95e5ec242613cb2ed0ed2 (patch)
treea4cf66d654e33c98378a911e6340a334fd152294
parent0f8bdd1eed990ca1e729dfceb4df63826f08de53 (diff)
parent226cf8740904089e8864fa41b47538cce2a7c2ad (diff)
Merge pull request #24 from AppliedIntuition/master
Add Option for Runtime Linking to Script
-rwxr-xr-xmingw-w64-build21
1 files changed, 20 insertions, 1 deletions
diff --git a/mingw-w64-build b/mingw-w64-build
index 88ce1b1..442a716 100755
--- a/mingw-w64-build
+++ b/mingw-w64-build
@@ -26,6 +26,8 @@ ENABLE_THREADS="--enable-threads=posix"
JOB_COUNT=$(($(getconf _NPROCESSORS_ONLN) + 2))
+LINKED_RUNTIME="msvcrt"
+
show_help()
{
cat <<EOF
@@ -47,6 +49,7 @@ Options:
--binutils-branch <branch> set Binutils branch (default: $BINUTILS_BRANCH)
--gcc-branch <branch> set GCC branch (default: $GCC_BRANCH)
--mingw-w64-branch <branch> set MinGW-w64 branch (default: $MINGW_W64_BRANCH)
+ --linked-runtime <runtime> set MinGW Linked Runtime (default: $LINKED_RUNTIME)
EOF
}
@@ -181,7 +184,8 @@ build()
execute "($arch): configuring MinGW-w64 headers" "" \
"$SRC_PATH/mingw-w64/mingw-w64-headers/configure" --build="$BUILD" \
- --host="$host" --prefix="$prefix/$host"
+ --host="$host" --prefix="$prefix/$host" \
+ --with-default-msvcrt=$LINKED_RUNTIME
execute "($arch): installing MinGW-w64 headers" "" \
make install
@@ -206,6 +210,7 @@ build()
execute "($arch): configuring MinGW-w64 CRT" "" \
"$SRC_PATH/mingw-w64/mingw-w64-crt/configure" --build="$BUILD" \
--host="$host" --prefix="$prefix/$host" \
+ --with-default-msvcrt=$LINKED_RUNTIME \
--with-sysroot="$prefix/$host" $crt_lib
execute "($arch): building MinGW-w64 CRT" "" \
@@ -316,6 +321,20 @@ while :; do
--gcc-branch=)
arg_error "'--gcc-branch' requires a non-empty option argument"
;;
+ --linked-runtime)
+ if [ "$2" ]; then
+ LINKED_RUNTIME="$2"
+ shift
+ else
+ arg_error "'--linked-runtime' requires a non-empty option argument"
+ fi
+ ;;
+ --linked-runtime=?*)
+ LINKED_RUNTIME=${1#*=}
+ ;;
+ --linked-runtime=)
+ arg_error "'--linked-runtime' requires a non-empty option argument"
+ ;;
--mingw-w64-branch)
if [ "$2" ]; then
MINGW_W64_BRANCH="$2"