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 compile.
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? --target=x86_64-w64-mingw32-win32? 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: https://github.com/bitcoin/bitcoin/blob/1985c4efda56b48f6f9c04f39d69268ee8f0b40a/contrib/guix/manifest.scm#L52 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. Cheers, Carl Dong accou...@carldong.me "I fight for the users"