Patchwork [v3] Fix Solaris symbol versioning (PR libstdc++/54872)

login
register
mail settings
Submitter Rainer Orth
Date Oct. 10, 2012, 2:05 p.m.
Message ID <ydd1uh6bex5.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/190647/
State New
Headers show

Comments

Rainer Orth - Oct. 10, 2012, 2:05 p.m.
As reported in the PR, abi_check fails on Solaris 10 and 11 since about
20120817.  On Solaris 10, I get

1 incompatible symbols 
0
_ZNSt12system_errorC1ESt10error_codeRKSs
std::system_error::system_error(std::error_code, std::string const&)
version status: incompatible
GLIBCXX_3.4.11
type: function
status: added

On Solaris 11, there's also

0
_ZNSt12system_errorC2ESt10error_codeRKSs
std::system_error::system_error(std::error_code, std::string const&)
version status: incompatible
GLIBCXX_3.4.11
type: function
status: added

This is in

libstdc++.a[thread.o]: [59]     |         0|       418|FUNC |WEAK |0    |12     |_ZNSt12system_errorC1ESt10error_codeRKSs
libstdc++convenience.a[thread.o]: [59]  |         0|       418|FUNC |WEAK |0    |12     |_ZNSt12system_errorC1ESt10error_codeRKSs

A reghunt revealed that this was introduced by

2012-08-12  Jonathan Wakely  <jwakely.gcc@gmail.com>

       PR libstdc++/52681
       * src/c++11/thread.cc (thread::_M_start_thread): Improve error text
       when threads are not enabled.

The issue seems to be the same as in PR libstdc++/52188, so I'm applying
the same solution.

Bootstrapped without regressions on i386-pc-solaris2.10 and
x86_64-unknown-linux-gnu, ok for mainline?

	Rainer


2012-10-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR libstdc++/54872
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.11) [!__sun__ && !__svr4__]:
	Don't export _ZNSt12system_errorC*.
Jonathan Wakely - Oct. 10, 2012, 7:53 p.m.
On Oct 10, 2012 3:05 PM, "Rainer Orth" wrote:
>
> As reported in the PR, abi_check fails on Solaris 10 and 11 since about
> 20120817.  On Solaris 10, I get
>
> 1 incompatible symbols
> 0
> _ZNSt12system_errorC1ESt10error_codeRKSs
> std::system_error::system_error(std::error_code, std::string const&)
> version status: incompatible
> GLIBCXX_3.4.11
> type: function
> status: added
>
> On Solaris 11, there's also
>
> 0
> _ZNSt12system_errorC2ESt10error_codeRKSs
> std::system_error::system_error(std::error_code, std::string const&)
> version status: incompatible
> GLIBCXX_3.4.11
> type: function
> status: added
>
> This is in
>
> libstdc++.a[thread.o]: [59]     |         0|       418|FUNC |WEAK |0    |12     |_ZNSt12system_errorC1ESt10error_codeRKSs
> libstdc++convenience.a[thread.o]: [59]  |         0|       418|FUNC |WEAK |0    |12     |_ZNSt12system_errorC1ESt10error_codeRKSs
>
> A reghunt revealed that this was introduced by
>
> 2012-08-12  Jonathan Wakely  <jwakely.gcc@gmail.com>
>
>        PR libstdc++/52681
>        * src/c++11/thread.cc (thread::_M_start_thread): Improve error text
>        when threads are not enabled.
>
> The issue seems to be the same as in PR libstdc++/52188, so I'm applying
> the same solution.
>
> Bootstrapped without regressions on i386-pc-solaris2.10 and
> x86_64-unknown-linux-gnu, ok for mainline?
>
>         Rainer
>
>
> 2012-10-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         PR libstdc++/54872
>         * config/abi/pre/gnu.ver (GLIBCXX_3.4.11) [!__sun__ && !__svr4__]:
>         Don't export _ZNSt12system_errorC*.

OK, thanks, and sorry for causing the problem!
Rainer Orth - Oct. 11, 2012, 8:39 a.m.
Jonathan Wakely <jwakely.gcc@gmail.com> writes:

>> 2012-10-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>
>>         PR libstdc++/54872
>>         * config/abi/pre/gnu.ver (GLIBCXX_3.4.11) [!__sun__ && !__svr4__]:
>>         Don't export _ZNSt12system_errorC*.
>
> OK, thanks, and sorry for causing the problem!

No worries, I just didn't get around to investigating earlier.

	Rainer

Patch

# HG changeset patch
# Parent 96f017dc93056ecab9e13f15598c2f607ca591ab
Fix Solaris symbol versioning (PR libstdc++/54872)

diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1057,7 +1057,12 @@  GLIBCXX_3.4.11 {
     _ZTISt12system_error;
     _ZTVSt12system_error;
     _ZNSt12system_errorD*Ev;
+    # Those template instantiations weren't exported on Solaris in GCC 4.6
+    # and aren't necessary for correct operation, so don't emit them now
+    # (PR libstdc++/54872).
+#if !defined(__sun__) && !defined(__svr4__)
     _ZNSt12system_errorC*;
+#endif
 
     _ZNKSt4hashISt10error_codeEclES0_;