[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help regarding specifics: mingw-w64 cross compilation with posix thread

From: Carl Dong
Subject: Help regarding specifics: mingw-w64 cross compilation with posix thread model
Date: Tue, 10 Sep 2019 16:20:00 +0000

Hi all,

I've been working on our windows cross-compilation support, and realized that
the version of mingw-w64 we compile does not have posix threading enabled. This
means that any package using C++11 threading support will not be able to

Thankfully mingw-w64 provides a pthreads library called winpthreads. A
technicality to be aware of here is that winpthreads requires mingw-w64 itself
to compile. I've hacked this together but have some concerns w/re specifics.

One of my concerns is what the default should be. Should we stick with win32
being the default thread model? Or go with posix? Another is how we expose this
to the user/developer. Do we define a non-standard triple?

Side note: I wish we could come up with a more generic (cross)toolchain
specification of sorts at least for gnu builds. My current hack that
accomplishes this can be found here:

For some context, in debian, installing gcc-mingw-w64-x86-64 installs
x86_64-w64-mingw32-gcc which has the win32 thread model. Also installed are
x86_64-w64-mingw32-gcc-posix and x86_64-w64-mingw32-gcc-win32, with their
suffixes matching their thread model.

Carl Dong
"I fight for the users"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]