Skip to content

Commit

Permalink
mingw-build: Build winpthreads library
Browse files Browse the repository at this point in the history
Build MinGW-w64 winpthreads library, which enables pthread support on
MinGW-w64 toolchain.

pthread support is required when compiling libgcc with posix thread
model.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
  • Loading branch information
stephanosio committed Oct 24, 2024
1 parent f97c9c7 commit df7b045
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mingw-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ build_mingw_toolchain() {
make install -j$(nproc)
popd

# Build MinGW winpthreads
mkdir mingw-winpthreads
pushd mingw-winpthreads
../../src/mingw-w64-v${MINGW_VERSION}/mingw-w64-libraries/winpthreads/configure \
--prefix=${prefix}/x86_64-w64-mingw32 \
--host=x86_64-w64-mingw32
make -j$(nproc)
make install
popd

# Build final GCC
pushd gcc
make -j$(nproc)
Expand Down

0 comments on commit df7b045

Please sign in to comment.