On Wed, 06 Aug 2014 21:19:55 +0200, Manuel Bilderbeek <manuel.bilderb...@gmail.com> wrote: > On 06-08-14 21:05, Stephen Kitt wrote: > > gcc-mingw-w64 now supports both POSIX and Win32-based threading models, > > with the latter by default (to avoid introducing dependencies on the > > pthreads > > Two questions: > 1) Why do the supported *language* features depend on the internal > threading model?
In this case, because there's a std::thread implementation using pthreads, but none using Win32 threads. The latter is being worked on as far as I know, but it's not ready yet... > 2) Why is the default not compatible with what it was? (OK, I understand > that having the pthread dll is also not very interesting, but this can > also be fixed by statically linking to that library.) As I understand it, statically linking to the pthreads library can cause issues, which is why it isn't easily enabled (in a fashion similar to -static-libgcc). My reasoning behind switching the default in Debian is as follows: * the default in Debian 7 is Win32 threads, so from one stable release to another it isn't a change; * for the time being, all other distributions with MinGW-w64 support use Win32 threads by default; * introducing a dependency on the pthreads DLL surprised quite a few people (see for example #748353, #750741, and LP#1338043). Basically I want the default to be as non-intrusive as possible, which means avoiding dependencies on the pthreads DLL by default. In addition, once Win32 threads gain full C++11 support, there won't be any advantage either way purely from a language standpoint, and then the pthreads DLL becomes all the more annoying (unless the code being built uses pthreads itself, or perhaps libgomp). > > update-alternatives --config i686-w64-mingw32-gcc > > > > and/or > > > > update-alternatives --config x86_64-w64-mingw32-gcc > > > > and the various other compilers as appropriate. You can also explicitly > > use i686-w64-mingw32-gcc-posix (and likewise for the other compilers). > > > > This is all supposed to be documented in README.Debian but I notice now > > that that file is not installed... > > It should definitely show some compatibility note then, indeed. (To fix > question 2...) Yes, I'll leave this bug open until I fix that. > > Please let me know if switching to the POSIX variant fixes your problem! > > I updated the C++ compilers to use POSIX and now it works indeed. Thanks for the info! Regards, Stephen
signature.asc
Description: PGP signature