This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [patch] Implement move semantics for iostreams


On 23/09/14 15:58 +0200, Rainer Orth wrote:
This patch broke Solaris bootstrap with Sun ld: when linking
libstdc++.so, ld complains

ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std::basic_ios<char, std::char_traits<char> >::move(std::basic_ios<char, std::char_traits<char> >&&)': symbol version conflict

and many more.  In that case, I find that this symbols is matched by
both the GLIBCXX_3.4 and GLIBCXX_3.4.21 patterns:

   GLIBCXX_3.4
   ##std::basic_i[g-r]* (cxx)
   _ZNSt9basic_iosIcSt11char_traitsIcEE4moveEOS2_;

   GLIBCXX_3.4.21
   ##_ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE4moveE[OR]S2_ (glob)
   _ZNSt9basic_iosIcSt11char_traitsIcEE4moveEOS2_;

Rainer, I think this patch should fix it, could you test it please?

(I tried installing Solaris in a VM but couldn't get it to work, maybe
I should use the VirtualBox image instead of trying qemu/kvm.)


commit 61937e94b69fb848efd7925364fbb965ade8a444
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 24 14:24:38 2014 +0100

    	* config/abi/pre/gnu.ver: Make GLIBCXX_3.4 patterns stricter so the
    	new GLIBCXX_3.4.21 symbols don't match them.

diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 58c90d6..f736240 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -39,10 +39,11 @@ GLIBCXX_3.4 {
       std::basic_[g-h]*;
       std::basic_i[a-e]*;
 #     std::basic_ifstream;
-      std::basic_i[g-r]*;
+#     std::basic_ios;
+#     std::basic_iostream;
       std::basic_istr[a-d]*;
 #     std::basic_istream;
-      std::basic_istr[f-z]*;
+#     std::basic_istringstream;
       std::basic_i[t-z]*;
       std::basic_[j-n]*;
       std::basic_o[a-e]*;
@@ -50,12 +51,12 @@ GLIBCXX_3.4 {
 #     std::basic_o[g-z]*;
       std::basic_o[g-r]*;
       std::basic_ostr[a-d]*;
-      std::basic_ostr[f-z]*;
+#     std::basic_ostringstream;
       std::basic_[p-r]*;
 #     std::basic_streambuf
 #     std::basic_string
 #     std::basic_stringbuf
-      std::basic_stringstream*;
+#     std::basic_stringstream;
       std::basic_[t-z]*;
       std::ba[t-z]*;
       std::b[b-z]*;
@@ -94,7 +95,7 @@ GLIBCXX_3.4 {
       std::i[p-r]*;
 #     std::istream
 #     std::istreambuf_iterator
-      std::istringstream*;
+#     std::istringstream*;
       std::istrstream*;
       std::i[t-z]*;
       std::[A-Zj-k]*;
@@ -306,12 +307,14 @@ GLIBCXX_3.4 {
     # std::basic_streambuf
     _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[CD]*;
     _ZNKSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9]*;
-    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9][a-z][^t]*;
+    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE4set[gp]*;
+    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE4sync*;
+    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[5-9][a-z][^t]*;
     _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9][0-9][a-z][^t]*;
     _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EEaSERKS2_;
 
     # std::basic_stringbuf
-    _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EEC*;
+    _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EEC[12]E[RS]*;
     _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EED[^2]*;
     _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][a-r]*;
     _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]seek*;
@@ -325,12 +328,46 @@ GLIBCXX_3.4 {
     _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]_M_[q-z]*;
     _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][0-9]_M_[a-z]*;
 
-    # std::basic_iostream constructors, destructors
-    _ZNSdC*;
+    # std::basic_istringstream
+    _ZNSt19basic_istringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EEC[12]E[RS]*;
+    _ZNSt19basic_istringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EED*;
+    _ZNSt19basic_istringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EE3str*;
+    _ZNKSt19basic_istringstream*;
+
+    # std::basic_ostringstream
+    _ZNSt19basic_ostringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EEC[12]E[RS]*;
+    _ZNSt19basic_ostringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EED*;
+    _ZNSt19basic_ostringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EE3str*;
+    _ZNKSt19basic_ostringstream*;
+
+    # std::basic_stringstream
+    _ZNSt18basic_stringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EEC[12]E[RS]*;
+    _ZNSt18basic_stringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EED*;
+    _ZNSt18basic_stringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EE3str*;
+    _ZNKSt18basic_stringstream*;
+
+    # std::basic_iostream constructors (except move), destructors
+    _ZNSdC[12]Ev;
+    _ZNSdC[12]EP*;
     _ZNSdD*;
+    _ZNSt14basic_iostreamIwSt11char_traitsIwEEC[12]Ev;
+    _ZNSt14basic_iostreamIwSt11char_traitsIwEEC[12]EP*;
+    _ZNSt14basic_iostreamIwSt11char_traitsIwEED*;
+
+    # std::basic_ios constructors, destructors
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EEC*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EED*;
+
+    # std::basic_ios members (except move, swap, set_rdbuf)
+    _ZNKSt9basic_iosI[cw]St11char_traitsI[cw]EE*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE1[015]*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE3tie*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE4fill*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE4init*;
+    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE[578][a-z]*;
 
     # std::basic_filebuf
-    _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EEC*;
+    _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EEC[12]Ev;
     _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EED*;
     _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE0*;
     _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE13*;
@@ -372,23 +409,34 @@ GLIBCXX_3.4 {
     _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
 
     # std::basic_istream<char>
-    _ZNSiC*;
+    _ZNSiC[12]Ev;
+    _ZNSiC[12]EP*;
     _ZNSiD*;
-    _ZNKSi[0-9][a-z]*;
-    _ZNSi[0-9][a-h]*;
-    _ZNSi[0-9][j-z]*;
+    _ZNKSi6sentry*;
+    _ZNKSi6gcount*;
+    _ZNSi3get*;
+    _ZNSi4peek*;
+    _ZNSi4read*;
+    _ZNSi4sync*;
+    _ZNSi7getline*;
+    _ZNSi[5-9][j-z]*;
     # 'x' here and below matches 'long long' where it
     # is used for signed sizetypes on LLP64 platforms.
     _ZNSi6ignoreE[ilx][ilx];
     _ZNSirsE*[^g];
 
     # std::basic_istream<wchar_t>
-    _ZNSt13basic_istreamIwSt11char_traitsIwEEC*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEEC[12]Ev;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEEC[12]EP*;
     _ZNSt13basic_istreamIwSt11char_traitsIwEED*;
     _ZNKSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-z]*;
-    _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-h]*;
-    _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][j-z]*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE3get*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE4peek*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE4read*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE4sync*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE[5-9][j-z]*;
     _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilx][ijlmx];
+    _ZNSt13basic_istreamIwSt11char_traitsIwEE7getline*;
     _ZNSt13basic_istreamIwSt11char_traitsIwEErsE*[^g];
 
     # std::istream operators and extractors
@@ -402,15 +450,17 @@ GLIBCXX_3.4 {
     _ZStrsIf[cw]St11char_traitsI[cw]EERSt13basic_istream*;
 
     # std::basic_ostream<char>
-    _ZNSoC*;
+    _ZNSoC[12]Ev;
+    _ZNSoC[12]EP*;
     _ZNSoD*;
     _ZNKSo6sentrycvbEv;
     _ZNSo8_M_writeEPKc[ilx];
-    _ZNSo[0-9][a-z]*;
+    _ZNSo[0-35-9][a-z]*;
     _ZNSolsE*[^g];
 
     # std::basic_ostream<wchar_t>
-    _ZNSt13basic_ostreamIwSt11char_traitsIwEEC*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEEC[12]Ev;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEEC[12]E[RP]*;
     _ZNSt13basic_ostreamIwSt11char_traitsIwEED*;
     _ZNKSt13basic_ostreamIwSt11char_traitsIwEE[0-9][a-z]*;
     _ZNSt13basic_ostreamIwSt11char_traitsIwEE3putEw;

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