[build, doc, v3] Support Sun symbol versioning in libstdc++-v3, rev. 2
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Fri Jul 2 12:44:00 GMT 2010
Paolo Carlini <paolo.carlini@oracle.com> writes:
> On 07/02/2010 02:29 PM, Rainer Orth wrote:
>>> bootstrap is running with 161706, do I need to apply the patch at:
>>> http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00131.html
>>>
> The patch is already in.
Ok, thanks.
>> Shouldn't be necessary since Darwin has no GNU-style symbol versioning,
>> AFAIK.
>>
> But note that lately Darwin has some sort of versioning, I don't know
> the details. I think we should be careful here, and make sure we really
> enable the new machinery on *solaris and solaris only* in a very direct
> and active way.
Indeed, though AFAICS only in libstdc++. I have been extra careful to
enable Sun symbol versioning only for Solaris in libstdc++:
@@ -2834,6 +2837,20 @@
case ${target_os} in
darwin*)
enable_symvers=darwin ;;
+ # Sun symbol versioning exists since Solaris 2.5.
+ solaris2.[[5-9]]* | solaris2.1[[0-9]]*)
+ # make_sunver.pl needs GNU c++filt to support extern "C++" in
+ # version scripts, so disable symbol versioning if none can be
+ # found.
+ if test -z "$ac_cv_path_CXXFILT"; then
+ AC_MSG_WARN([=== You have requested Sun symbol versioning, but])
+ AC_MSG_WARN([=== no GNU c++filt could be found.])
+ AC_MSG_WARN([=== Symbol versioning will be disabled.])
+ enable_symvers=no
+ else
+ enable_symvers=sun
+ fi
+ ;;
*)
enable_symvers=no ;;
esac
On the other hand, in libssp I simply check if
$ gcc -fPIC -shared -Wl,-M,./conftest.map
works. It seems that it appears to do so on Darwin, though either with
no or with a different effect than expected.
That's the current mess with the different symbol versioning checks in
libstdc++-v3, libgomp, libgfortran, libssp, and libjava.
I meant to fix this and posted about the problem back in February
http://gcc.gnu.org/ml/gcc/2010-02/msg00342.html
but that message met with deafening silence ;-( I still plan to unify
this somehow, at least for GCC, but wanted to get something in for 4.6.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list