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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- 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:
/* gcc-3.4.4
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
 */

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  template
    istreambuf_iterator<char>&
    istreambuf_iterator<char>::operator++();

#ifdef _GLIBCXX_USE_WCHAR_T
  template
    istreambuf_iterator<wchar_t>&
    istreambuf_iterator<wchar_t>::operator++();
#endif

_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

but not on Solaris, because it either doesn't support GNU symver, or doesn't
have corresponding runtime support.
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
above hunk (sans the following stuff), to make sure it doesn't go again when
the optimizers change.

Reply via email to