[lto, testsuite] Don't use visibility on targets that don't support it (PR lto/47334)

Jan Hubicka hubicka@ucw.cz
Thu Jun 9 10:00:00 GMT 2011


> On Thu, Jun 9, 2011 at 9:14 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> > Mike Stump <mikestump@comcast.net> writes:
> >
> >> On Apr 5, 2011, at 1:56 AM, Rainer Orth wrote:
> >>>  * lto.c (promote_var): Only set VISIBILITY_HIDDEN if
> >>>      HAVE_GAS_HIDDEN.
> >>
> >> This looks wrong, there are more things that have visibility than those things that use GAS and have .hidden.  Darwin I think is one of them.  ?  cygming.h seems to be another.
> >
> > Now that Darwin has been switched to define HAVE_GAS_HIDDEN, is the
> > lto.c part ok?
> 
> Honza?  I think if we are not marking the symbols hidden we "break"
> LTO in the way that we suddenly export local static symbols.  So no,

Yes, on targets that do have concept of hidden symbols we ought to use the flag.

> I don't think we want to do that - but then we need another way to
> make it possible to access previously local statics from a different
> LTO partition.

I guess if we want to support targets that has nothing similar to hidden, we
can go for the random seed based mangling and simply export the nonsentially
named symbols.

Honza
> 
> Richard.
> 
> > I've re-bootstrapped both patches together on i386-apple-darwin9.8.0,
> > powerpc-apple-darwin9.8.0, i386-pc-solaris2.8 and i386-pc-solaris2.11
> > without regressions; as expected the failure on Solaris 8/x86 is gone.
> >
> > Thanks.
> >        Rainer
> >
> > --
> > -----------------------------------------------------------------------------
> > Rainer Orth, Center for Biotechnology, Bielefeld University
> >



More information about the Gcc-patches mailing list