[Bug libstdc++/52188] [4.7 regression] IPA-CP change broke libstdc++ symbol versioning on Solaris

ro at CeBiTec dot Uni-Bielefeld.DE gcc-bugzilla@gcc.gnu.org
Thu Feb 16 20:20:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52188

--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-02-16 19:58:27 UTC ---
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-10 12:30:39 UTC ---
> The bug was that the gnu.ver wildcards were too generic and thus matched even
> something that wasn't intended to be exported and just happened to be exported
> as an implementation detail.
> This caused a problem on Linux several years ago (I think in 2005), and since
> then these are forcefully exported from compatibility.cc:
[...]
> but not on Solaris, because it either doesn't support GNU symver, or doesn't
> have corresponding runtime support.

ld.so.1 lacks the runtime support, and likely won't get it any time soon.

> I think the bug is not on the optimization side, it is fine if the
> optimizations change stuff that are implementation details, C++ isn't a very
> good language for ABI stability and just requires lots of work on the libstdc++
> side to preserve at least some.
>
> So, I'd say it is time to preprocess the *.ver files and tweak them based on
> target OS or its version, and additionally you'll want (for Solaris) enable the
That's what my proposed patch does.  What do you think about it?

> above hunk (sans the following stuff), to make sure it doesn't go again when
> the optimizers change.

Given that they weren't present in 4.6, the first release with versioned
libstdc++.so on Solaris, I think it's easier to simply keep them
unexported, as Richard suggested.

    Rainer



More information about the Gcc-bugs mailing list