diff mbox

Template instantiation results in a link failure

Message ID 4DDD9587.1020000@oracle.com
State New
Headers show

Commit Message

Paolo Carlini May 25, 2011, 11:49 p.m. UTC
On 05/26/2011 01:04 AM, Paolo Carlini wrote:
> On 05/26/2011 12:57 AM, Sam Varshavchik wrote:
>> #include <algorithm>
>> #include <iterator>
>> #include <iostream>
>>
>> int main()
>> {
>>     std::find(std::istreambuf_iterator<char>(std::cin),
>>           std::istreambuf_iterator<char>(), '\n');
>>     return 0;
>> }
> The symbols are in the .so but unexported. Likely my fault, sorry. 
> I'll fix that momentarily for 4.6.1.
Like this. Tested x86_64-linux -m32 and -m64.

Thanks,
Paolo.

PS: of course the problem was visible only at -O0, when no inlining 
takes place.

///////////////////
2011-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* config/abi/pre/gnu.ver: Export recently added  basic_streambuf
	and basic_stringbuf symbols @3.4.17.
	* configure.ac: Update.
	* testsuite/util/testsuite_abi.cc: Likewise.
	* configure: Regenerate.
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 174239)
+++ configure.ac	(working copy)
@@ -12,7 +12,7 @@ 
 ### am handles this now?  ORIGINAL_LD_FOR_MULTILIBS=$LD
 
 # For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:16:0
+libtool_VERSION=6:17:0
 AC_SUBST(libtool_VERSION)
 
 # Find the rest of the source tree framework.
Index: testsuite/util/testsuite_abi.cc
===================================================================
--- testsuite/util/testsuite_abi.cc	(revision 174239)
+++ testsuite/util/testsuite_abi.cc	(working copy)
@@ -194,6 +194,7 @@ 
       known_versions.push_back("GLIBCXX_3.4.14");
       known_versions.push_back("GLIBCXX_3.4.15");
       known_versions.push_back("GLIBCXX_3.4.16");
+      known_versions.push_back("GLIBCXX_3.4.17");
       known_versions.push_back("GLIBCXX_LDBL_3.4");
       known_versions.push_back("GLIBCXX_LDBL_3.4.7");
       known_versions.push_back("GLIBCXX_LDBL_3.4.10");
Index: config/abi/pre/gnu.ver
===================================================================
--- config/abi/pre/gnu.ver	(revision 174239)
+++ config/abi/pre/gnu.ver	(working copy)
@@ -1272,6 +1272,17 @@ 
 
 } GLIBCXX_3.4.15;
 
+GLIBCXX_3.4.17 {
+
+    # basic_streambuf<>::__safe_gbump, __safe_pbump
+    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE12__safe_gbumpE*;
+    _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE12__safe_pbumpE*;
+
+    # basic_stringbuf<>::_M_pbump
+    _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE8_M_pbumpE*;
+
+} GLIBCXX_3.4.16;
+
 # Symbols in the support library (libsupc++) have their own tag.
 CXXABI_1.3 {