[Bug libstdc++/54513] "undefined reference to `___tls_get_addr'" when linking .so with libstdc++.a

2012-09-07 Thread d.v.a at ngs dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54513

--- Comment #3 from __vic  2012-09-07 08:58:39 UTC ---
$ g++ -shared -static-libstdc++ -static-libgcc -Wl,-s -Wl,--no-undefined 1.cpp
/lib/ld-linux.so.2

works fine. Thanks


[Bug libstdc++/54513] "undefined reference to `___tls_get_addr'" when linking .so with libstdc++.a

2012-09-07 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54513

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution||INVALID

--- Comment #2 from Jakub Jelinek  2012-09-07 
07:33:46 UTC ---
Don't use -Wl,--no-undefined on CentOS 4, it is too old for that.
In particular, AS_NEEDED ( /lib/ld-linux.so.2 ) is missing in /usr/lib/libc.so,
so for TLS using programs which use ___tls_get_addr or other symbols provided
by ld.so you need to specify ld.so on the command line explicitly when using
-Wl,-z,defs.  On newer OSes that is not needed.


[Bug libstdc++/54513] "undefined reference to `___tls_get_addr'" when linking .so with libstdc++.a

2012-09-07 Thread d.v.a at ngs dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54513

--- Comment #1 from __vic  2012-09-07 07:19:43 UTC ---
Note: compiler with stdlib was built manually from sources