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: unassig...@gcc.gnu.org
        ReportedBy: r...@gcc.gnu.org
                CC: bonz...@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

Reply via email to