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.

Reply via email to