[v3] Update libstdc++ baseline on Solaris 2

Benjamin Kosnik bkoz@redhat.com
Tue Nov 30 21:38:00 GMT 2010


> 2010-11-01  Benjamin Kosnik  <bkoz@redhat.com>
> [...]
> 	* include/bits/allocator.h: Add constexpr as per N3126 draft.
> 	* include/bits/ios_base.h: Same.
> 	* include/bits/shared_ptr.h: Same.
> 	* include/bits/unique_ptr.h: Same.
> 	* include/bits/stl_iterator.h: Same.
> 	* include/bits/stl_pair.h: Same.
> 	* include/std/tuple: Same.
> 	* include/tr1_impl/type_traits: Same.
> 	* include/std/chrono: Same.
> 	* include/std/ratio: Same.
> 	* include/std/mutex: Same.
> 	* src/mutex.cc: Same.
> 
> On Linux, this is hidden by this code in src/mutex.cc:
> 
> // XXX GLIBCXX_ABI Deprecated
> // gcc-4.6.0
> // <mutex> export changes
> #if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
>     && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \
>     && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT)
> [...]
> #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
>    asm (".symver " #cur "," #old "@@" #version);
> 
> _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx10adopt_lockE, _ZSt10adopt_lock,
> GLIBCXX_3.4.11)
> 
> This does not work on Solaris, so strictly speaking we'd have to
> increment the libstdc++.so major version due to the symbol removal.
> Given that symbol versioning is only introduced in 4.6, I'm not too
> worried about this, but we should have some solution for this kind of
> problem on non-Linux platforms to avoid breaking compatiblity.


Hey. 

What part of the above doesn't work on Solaris? (Ie. what macros are
defined above?) IMHO for solaris versioning to work we need to figure
out a solution here that isn't just adding symbols. It could be adding
in the old symbols for Solaris, but not renaming them.

Yeah, this can be done ATM due to 4.6's pre-release state, but this
maneuver is quite common and unless some rename or duplication strategy
is found SONAME on solaris will diverge quickly.

-benjamin



More information about the Libstdc++ mailing list