http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47762
--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-18 12:43:00 UTC --- does it help if you link to libpthread using --whole-archive ? g++ deallocate_global_thread-1.cc -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lrt