News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Respect static

Started by Ters, April 20, 2018, 08:01:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ters

The Makefile appear to be wanting to link pthread statically, but it is not happening with msys2+mingw64. After looking at verbose output from ld and a bit of trial and error, I've managed to get it to link statically. The required change looks a bit silly on the surface, but I think the underlying cause is that libstdc++ pulls in pthread implicitly somehow. Since libstdc++ is not linked explicitly, it, and pthread, is linked implicitly outside of the -Wl,-static scope.

prissi

I used the normal makefile in the mingw64 from Debian (which is ancient) and it works there. Must be a recent change.

Ters

It has been that way for as long as the mingw64 in msys2 has supported whichever C++ standard included threading stuff. However, if I remember correctly, the mingw64 that is available on Gentoo Linux is configured to use the win32 threading model, not the posix model that msys2's mingw64 builds are configured with, so its libstdc++ does not depend on libpthread.