This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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*.

# 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_;
 
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]