This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58909] C++11's condition variables fail with static linking
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Oct 2013 09:53:01 +0000
- Subject: [Bug libstdc++/58909] C++11's condition variables fail with static linking
- Auto-submitted: auto-generated
- References: <bug-58909-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If this is NPTL, then the fix is to either avoid using -static (lots of reasons
not to do it), or -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
instead of -lpthread (in some distributions like Fedora the latter is
unnecessary, as -lpthread contains a single large *.o file for these reasons).