This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/52192] New: GCC_CHECK_TLS doesn't detect native TLS on Solaris 8/9
- From: "ro at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2012 19:06:09 +0000
- Subject: [Bug other/52192] New: GCC_CHECK_TLS doesn't detect native TLS on Solaris 8/9
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52192
Bug #: 52192
Summary: GCC_CHECK_TLS doesn't detect native TLS on Solaris 8/9
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: bonzini@gnu.org
Host: *-*-solaris2.[89]
Target: *-*-solaris2.[89]
Build: *-*-solaris2.[89]
As discovered while investigating PR libstdc++/52104, config/tls.m4
(GCC_CHECK_TLS)
tails to detect native TLS support on Solaris 8 and 9 since that platform
needs to link with -lthread for __tls_get_addr. -pthread knows about this
and the necessary contortions, and I do have a patch to try the test with
-pthread if it fails without, and adds it to LDFLAGS if that works.
Unfortunately, when trying a bootstrap, I found two issues that most likely
require the patch to be postponed for 4.8:
* libstdc++.so still had an unresolved reference to __tls_get_addr; I suspect
that we need -Wc,-pthread to get it through libtool.
* Same when linking go1, which uses -static-libstdc++, so a fix for the last
won't help. Most likely, the knowledge will have to be added to gcc/go
directly.
Rainer