Note that the third case worked because the use of `-Wl,--whole-archive -lpthread -Wl,--no-whole-archive' is a workaround that evidently results in the TLS (Thread-Local Storage) being initialised properly.
The root cause of this bug is currently uncertain, but https://gcc.gnu.org/ml/gcc-help/2010-05/msg00029.html could be relevant. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1450355 Title: statically linking libpthread is problematic To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1450355/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
