This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/52590] std::thread Segmentation fault static linking


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52590

--- Comment #2 from Jason Toffaletti <jason at cornsyrup dot org> 2012-03-14 21:29:18 UTC ---
(In reply to comment #1)
> > -static 
> 
> You need to make sure all of libpthread.a is included, right it does not get
> linked that way.
> 
> This is not a GCC or glibc bug.

Your comment seems to suggest there is a way, but I can't find it.

g++ -Wl,--whole-archive -static -pthread -std=c++0x -o thread thread.cc

Gives pages of linker errors.
http://sourceware.org/bugzilla/show_bug.cgi?id=10652 suggests glibc and
pthreads just don't work with static linking.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]