From 041aaa290ab953073fdaed371d47ec742791003b Mon Sep 17 00:00:00 2001 From: Zeckmathederg Date: Sat, 26 Oct 2024 10:07:47 -0600 Subject: [PATCH] MinGW-w64*: Enabled winpthreads. Winpthreads has to be built after the main bulk of MinGW-w64, but can still be built before GCC. This means after the bulk build, the winpthread build can be done, which is great. --- introduction/welcome/changelog.xml | 3 ++ wine/deps/tc/mingw-w64-gcc.xml | 12 +++---- wine/deps/tc/mingw-w64.xml | 52 +++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/introduction/welcome/changelog.xml b/introduction/welcome/changelog.xml index c05d5887fa..59f1ded062 100644 --- a/introduction/welcome/changelog.xml +++ b/introduction/welcome/changelog.xml @@ -42,6 +42,9 @@ October 25th, 2024 + + [Zeckmathederg] - MinGW-w64*: Enabled winpthreads. + [Zeckmathederg] - icu: Remove Clang note in 32-bit. diff --git a/wine/deps/tc/mingw-w64-gcc.xml b/wine/deps/tc/mingw-w64-gcc.xml index 15fcb74412..adee10e525 100644 --- a/wine/deps/tc/mingw-w64-gcc.xml +++ b/wine/deps/tc/mingw-w64-gcc.xml @@ -88,6 +88,7 @@ cd build-x86_64-mingw-w64 && ../configure \ --prefix=/usr \ --target=x86_64-w64-mingw32 \ + --enable-threads=posix \ --enable-shared \ --disable-multilib \ --enable-languages=c,c++ && @@ -144,6 +145,7 @@ cd build-i686-mingw-w64 && --prefix=/usr \ --target=i686-w64-mingw32 \ --enable-shared \ + --enable-threads=posix \ --disable-multilib \ --enable-languages=c,c++ && @@ -303,15 +305,13 @@ rm -v a.exe main.{c,cpp} - --disable-multilib: This option ensures - that files are created for the specific architecture of your computer. + --enable-threads=posix: This option enables + support for POSIX threads via the winpthreads library. - --enable-threads=posix: This option enables - support for POSIX threads via the winpthreads library. Invoke it if - you have built with - --with-libraries=winpthreads. + --disable-multilib: This option ensures + that files are created for the specific architecture of your computer. diff --git a/wine/deps/tc/mingw-w64.xml b/wine/deps/tc/mingw-w64.xml index ab84d61e63..4a55013f3a 100644 --- a/wine/deps/tc/mingw-w64.xml +++ b/wine/deps/tc/mingw-w64.xml @@ -80,6 +80,28 @@ make make install + + Now build the winpthreads library after installing the bulk of MinGW-w64 + to prevent the build from linking against libraries that weren't + installed but now are (this library enables POSIX thread support): + + +cd .. && +mkdir -v build-x86_64-winpthreads && +cd build-x86_64-winpthreads && + +../mingw-w64-libraries/winpthreads/configure \ + --prefix=/usr/x86_64-w64-mingw32 \ + --host=x86_64-w64-mingw32 && + +make + + + Now install the winpthreads library as the &root; user: + + + make install + @@ -105,6 +127,28 @@ make make install + + Now build the winpthreads library after installing the bulk of MinGW-w64 + to prevent the build from linking against libraries that weren't + installed but now are (this library enables POSIX thread support): + + +cd .. && +mkdir -v build-i686-winpthreads && +cd build-i686-winpthreads && + +../mingw-w64-libraries/winpthreads/configure \ + --prefix=/usr/i686-w64-mingw32 \ + --host=i686-w64-mingw32 && + +make + + + Now install the winpthreads library as the &root; user: + + + make install + @@ -123,14 +167,6 @@ make the architecture passed to it. - - --with-libraries=winpthreads: This option - builds the winpthreads library, which can enable posix threading. - Use it after you have built and - rebuild that package afterwards with - --enable-threads=posix. - - --enable-experimental: This option enables experimental features.