[Bug libstdc++/52104] go1 fails to link on Solaris 8/9 x86 with native TLS
ro at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 3 13:09:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52104
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
Target Milestone|--- |4.7.0
--- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> 2012-02-03 13:09:00 UTC ---
(In reply to comment #7)
> So fixing that configure test should make the problem go away?
I'd hope so. Actually, the problem is in toplevel config/tls.m4
(GCC_CHECK_TLS):
on Solaris 8 and 9, the very first AC_RUN_IFELSE can only work if linked with
-pthread. I'm uncertain wether to hardcode that as was done in the testsuite
(gcc/testsuite/lib/target-supports.exp (add_options_for_tls)). Probably
Paolo has a suggestion/preference?
> There's still a problem on non-TLS targets though. I have no idea how to
> explicitly instantiate the std::function template constructor for a lambda
> type, I don't think it's possible, so it might be necessary to move the
> ~_Async_state_base destructor into the header file for non-TLS targets. That
> would result in larger object files because the vtable and typeinfo would be
> emitted in every object using futures.
The strange thing is that onSolaris 8 with Sun as/ld, i.e. emutls, everything
seems to work.
> And there's still a Solaris 10 problem:
>
> (In reply to comment #4)
> > As of 20120202, I get this instead:
> >
> > libstdc++.a[mutex.o]: [29] | 0| 4|TLS |GLOB |0 |8
> > |_ZSt15__once_callable
> > libstdc++.a[future.o]: [144] | 0| 0|TLS |GLOB |0 |UNDEF
> > |_ZSt15__once_callable
>
> That symbol is the one used when TLS *is* available. __once_callable is just a
Right: on Solaris 10 and 11, native TLS is available irrespective of toolchain
used.
> __thread void* so doesn't need instantiating.
> Why isn't the definition in mutex.o used?
I've no idea: this all works with Sun ld, both with Sun as and gas. Seems like
a pure gld issue to me (still only occured within the last week).
Rainer
More information about the Gcc-bugs
mailing list