|
From: | david.chappaz |
Subject: | Static pthread library in shared toolchain |
Date: | Mon, 23 Aug 2021 10:31:18 -0700 |
Hi, I wish I had discovered MXE earlier ! For some time I’ve been using a fairly manual process to build my Cross-Compiler toolchains, largely based on scripts (like this one: https://sourceforge.net/p/mingw-w64/discussion/723797/thread/ea9a5b00fb/#a77a/8f8e/df3a/fd2e/daae/98f0/1491) Yesterday, for the first time I built a toolchain using MXE and it was a breeze ! I have a few questions and need a few clarifications though. I built my toolchains as follows: make MXE_TARGETS=’x86_64-w64-mingw32.shared x86_64-w64-mingw32.static’ MXE_PLUGIN_DIRS=plugins/gcc6 pthreads At this point, my lack of detailed understanding will probably show…. My understanding is that the ’static’ toolchain is a *** subset *** of the ’shared’ one. In other words, while the ’static’ toolchain only supports static link (which is a guarantee produce completely standalone executables), the ’shared’ toolchain supports both dynamic link *** and *** static link. Is that correct ? As a matter of fact, this expectation is consistent with what I see:
The same comment applies to plenty other libraries, for example libquadmath, libatomic, etc… So far so good. Now looking a bit more in depth, I also see that
The above is what surprises me a bit.
$ x86_64-w64-mingw32.shared-g++ -static main.cpp -o main.exe x86_64-w64-mingw32.shared-ld: cannot find -lpthread
Thanks a lot for any feedback and clarifications ! David |
[Prev in Thread] | Current Thread | [Next in Thread] |