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: [v3] versioned-namespaces spelling/soname change


> I'm going to let this chill a bit on mainline and then check in to
> 4.6.x.

Seems fine so I dropped this into the 4_6-branch

tested x86/linux

-benjamin
2011-10-05  Benjamin Kosnik  <bkoz@redhat.com
            Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/48698
        * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Set libtool_VERSION here.
        * configure.ac: Move AC_SUBST of libtool_VERSION past call to
        GLIBCXX_ENABLE_SYMVERS.
        * configure: Regenerate.
        * include/bits/c++config: Use __7 as versioned namespace name.
        * config/abi/pre/gnu-versioned-namespace.ver: Change mangling as
        per above.
        * include/c_global/cwchar: Adjust nested namespaces.
        * testsuite/20_util/bind/48698.cc: Add test case.
        * testsuite/ext/profile/mutex_extensions_neg.cc: Change line number.


Index: configure.ac
===================================================================
--- configure.ac	(revision 179579)
+++ configure.ac	(working copy)
@@ -11,10 +11,6 @@
 # exported.  Only used at the end of this file.
 ### am handles this now?  ORIGINAL_LD_FOR_MULTILIBS=$LD
 
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:16:0
-AC_SUBST(libtool_VERSION)
-
 # Find the rest of the source tree framework.
 AM_ENABLE_MULTILIB(, ..)
 
@@ -303,6 +299,8 @@
 
 # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
 GLIBCXX_ENABLE_SYMVERS([yes])
+AC_SUBST(libtool_VERSION)
+
 GLIBCXX_ENABLE_VISIBILITY([yes])
 
 ac_ldbl_compat=no
Index: include/bits/locale_facets.tcc
===================================================================
--- include/bits/locale_facets.tcc	(revision 179579)
+++ include/bits/locale_facets.tcc	(working copy)
@@ -635,15 +635,11 @@
 
 	      const char_type __c = *__beg;
 
-	      if (!__donef)
-		__testf = __c == __lc->_M_falsename[__n];
-
+	      __testf = __c == __lc->_M_falsename[__n];
 	      if (!__testf && __donet)
 		break;
 
-	      if (!__donet)
-		__testt = __c == __lc->_M_truename[__n];
-
+	      __testt = __c == __lc->_M_truename[__n];
 	      if (!__testt && __donef)
 		break;
 
Index: include/bits/c++config
===================================================================
--- include/bits/c++config	(revision 179579)
+++ include/bits/c++config	(working copy)
@@ -162,41 +162,42 @@
 
 
 // Defined if inline namespaces are used for versioning.
-#define _GLIBCXX_INLINE_VERSION
+#define _GLIBCXX_INLINE_VERSION 
 
 // Inline namespace for symbol versioning.
 #if _GLIBCXX_INLINE_VERSION
+
 namespace std
 {
-  inline namespace _6 { }
+  inline namespace __7 { }
 
-  namespace rel_ops { inline namespace _6 { } }
+  namespace rel_ops { inline namespace __7 { } }
 
   namespace tr1
   {
-    inline namespace _6 { }
-    namespace placeholders { inline namespace _6 { } }
-    namespace regex_constants { inline namespace _6 { } }
-    namespace __detail { inline namespace _6 { } }
+    inline namespace __7 { }
+    namespace placeholders { inline namespace __7 { } }
+    namespace regex_constants { inline namespace __7 { } }
+    namespace __detail { inline namespace __7 { } }
   }
 
-  namespace decimal { inline namespace _6 { } }
+  namespace decimal { inline namespace __7 { } }
 
-  namespace chrono { inline namespace _6 { } }
-  namespace placeholders { inline namespace _6 { } }
-  namespace regex_constants { inline namespace _6 { } }
-  namespace this_thread { inline namespace _6 { } }
+  namespace chrono { inline namespace __7 { } }
+  namespace placeholders { inline namespace __7 { } }
+  namespace regex_constants { inline namespace __7 { } }
+  namespace this_thread { inline namespace __7 { } }
 
-  namespace __detail { inline namespace _6 { } }
-  namespace __regex { inline namespace _6 { } }
+  namespace __detail { inline namespace __7 { } }
+  namespace __regex { inline namespace __7 { } }
 }
 
 namespace __gnu_cxx
 {
-  inline namespace _6 { }
-  namespace __detail { inline namespace _6 { } }
+  inline namespace __7 { }
+  namespace __detail { inline namespace __7 { } }
 }
-# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace _6 {
+# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 {
 # define _GLIBCXX_END_NAMESPACE_VERSION }
 #else
 # define _GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -213,7 +214,7 @@
   namespace __cxx1998
   {
 #if _GLIBCXX_INLINE_VERSION
- inline namespace _6 { }
+ inline namespace __7 { }
 #endif
   }
 
Index: include/c_global/cwchar
===================================================================
--- include/c_global/cwchar	(revision 179579)
+++ include/c_global/cwchar	(working copy)
@@ -136,6 +136,8 @@
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
   using ::wint_t;
 
   using ::btowc;
@@ -207,8 +209,6 @@
   using ::wcsstr;
   using ::wmemchr;
 
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
 #ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO
   inline wchar_t*
   wcschr(wchar_t* __p, wchar_t __c)
Index: testsuite/ext/profile/mutex_extensions_neg.cc
===================================================================
--- testsuite/ext/profile/mutex_extensions_neg.cc	(revision 179579)
+++ testsuite/ext/profile/mutex_extensions_neg.cc	(working copy)
@@ -25,4 +25,4 @@
 
 #include <vector>
 
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 241 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 242 }
Index: config/abi/pre/gnu-versioned-namespace.ver
===================================================================
--- config/abi/pre/gnu-versioned-namespace.ver	(revision 179579)
+++ config/abi/pre/gnu-versioned-namespace.ver	(working copy)
@@ -20,23 +20,23 @@
 ## with this library; see the file COPYING3.  If not see
 ## <http://www.gnu.org/licenses/>.
 
-GLIBCXX_5.0 {
+GLIBCXX_7.0 {
 
   global:
 
     # Names inside the 'extern' block are demangled names.
     extern "C++"
     {
-      std::_6::*;
+      std::__7::*;
       std::*
     };
 
     # locale
-    _ZNSt2_69has_facetINS_*;
+    _ZNSt3__79has_facetINS_*;
 
     # hash 
-    _ZNSt8__detail2_612__prime_listE;
-    _ZNSt3tr18__detail2_612__prime_listE;
+    _ZNSt8__detail3__712__prime_listE;
+    _ZNSt3tr18__detail3__712__prime_listE;
 
     # thread/mutex/condition_variable/future
     __once_proxy;
@@ -73,41 +73,41 @@
     _ZTv0_n*;
 
     # std::__detail::_List_node_base
-    _ZNSt8__detail2_615_List_node_base7_M_hook*;
-    _ZNSt8__detail2_615_List_node_base9_M_unhookEv;
-    _ZNSt8__detail2_615_List_node_base10_M_reverseEv;
-    _ZNSt8__detail2_615_List_node_base11_M_transfer*;
-    _ZNSt8__detail2_615_List_node_base4swapER*;
+    _ZNSt8__detail3__715_List_node_base7_M_hook*;
+    _ZNSt8__detail3__715_List_node_base9_M_unhookEv;
+    _ZNSt8__detail3__715_List_node_base10_M_reverseEv;
+    _ZNSt8__detail3__715_List_node_base11_M_transfer*;
+    _ZNSt8__detail3__715_List_node_base4swapER*;
 
     # std::__convert_to_v
-    _ZNSt2_614__convert_to_v*;
+    _ZNSt3__714__convert_to_v*;
 
     # std::__copy_streambufs
-    _ZNSt2_617__copy_streambufsI*;
-    _ZNSt2_621__copy_streambufs_eofI*;
+    _ZNSt3__717__copy_streambufsI*;
+    _ZNSt3__721__copy_streambufs_eofI*;
 
     # __gnu_cxx::__atomic_add
     # __gnu_cxx::__exchange_and_add
-    _ZN9__gnu_cxx2_612__atomic_addEPV[il][il];
-    _ZN9__gnu_cxx2_618__exchange_and_addEPV[li][il];
+    _ZN9__gnu_cxx3__712__atomic_addEPV[il][il];
+    _ZN9__gnu_cxx3__718__exchange_and_addEPV[li][il];
 
     # __gnu_cxx::__pool
-    _ZN9__gnu_cxx2_66__poolILb[01]EE13_M_initializeEv;
-    _ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reserve_blockE[jm][jm];
-    _ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reclaim_blockEPc[jm];
-    _ZN9__gnu_cxx2_66__poolILb[01]EE10_M_destroyEv;
-    _ZN9__gnu_cxx2_66__poolILb1EE16_M_get_thread_idEv;
+    _ZN9__gnu_cxx3__76__poolILb[01]EE13_M_initializeEv;
+    _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reserve_blockE[jm][jm];
+    _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reclaim_blockEPc[jm];
+    _ZN9__gnu_cxx3__76__poolILb[01]EE10_M_destroyEv;
+    _ZN9__gnu_cxx3__76__poolILb1EE16_M_get_thread_idEv;
 
-    _ZN9__gnu_cxx2_617__pool_alloc_base9_M_refillE[jm];    
-    _ZN9__gnu_cxx2_617__pool_alloc_base16_M_get_free_listE[jm];
-    _ZN9__gnu_cxx2_617__pool_alloc_base12_M_get_mutexEv;
+    _ZN9__gnu_cxx3__717__pool_alloc_base9_M_refillE[jm];    
+    _ZN9__gnu_cxx3__717__pool_alloc_base16_M_get_free_listE[jm];
+    _ZN9__gnu_cxx3__717__pool_alloc_base12_M_get_mutexEv;
 
-    _ZN9__gnu_cxx2_69free_list6_M_getE[jm];
-    _ZN9__gnu_cxx2_69free_list8_M_clearEv;
+    _ZN9__gnu_cxx3__79free_list6_M_getE[jm];
+    _ZN9__gnu_cxx3__79free_list8_M_clearEv;
 
     # __gnu_cxx::stdio_sync_filebuf
-    _ZTVN9__gnu_cxx2_618stdio_sync_filebufI[cw]St2_611char_traitsI[cw]EEE;
-    _ZN9__gnu_cxx2_618stdio_sync_filebufI[cw]NSt2_611char_traitsI[cw]EEE[5-9]*;
+    _ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]St3__711char_traitsI[cw]EEE;
+    _ZN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]EEE[5-9]*;
 
     # debug mode
     _ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv;
@@ -212,7 +212,7 @@
     _ZSt15_Fnv_hash_bytesPKv*;
 
     # __gnu_cxx::_verbose_terminate_handler()
-    _ZN9__gnu_cxx2_627__verbose_terminate_handlerEv;
+    _ZN9__gnu_cxx3__727__verbose_terminate_handlerEv;
 
     # *_type_info classes, ctor and dtor
     _ZN10__cxxabiv117__array_type_info*;
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 179579)
+++ acinclude.m4	(working copy)
@@ -2861,10 +2861,15 @@
 dnl Add version tags to symbols in shared library (or not), additionally
 dnl marking other symbols as private/local (or not).
 dnl
+dnl Sets libtool_VERSION, and determines shared library SONAME.
+dnl
+dnl  This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
+dnl
 dnl --enable-symvers=style adds a version script to the linker call when
 dnl       creating the shared library.  The choice of version script is
 dnl       controlled by 'style'.
 dnl --disable-symvers does not.
+dnl
 dnl  +  Usage:  GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
 dnl       Where DEFAULT is either 'yes' or 'no'.  Passing `yes' tries to
 dnl       choose a default style based on linker characteristics.  Passing
@@ -3001,7 +3006,10 @@
   fi
 fi
 
-# Everything parsed; figure out what file to use.
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=6:16:0
+
+# Everything parsed; figure out what files and settings to use.
 case $enable_symvers in
   no)
     SYMVER_FILE=config/abi/pre/none.ver
@@ -3012,6 +3020,7 @@
 	      [Define to use GNU versioning in the shared library.])
     ;;
   gnu-versioned-namespace)
+    libtool_VERSION=7:0:0
     SYMVER_FILE=config/abi/pre/gnu-versioned-namespace.ver
     AC_DEFINE(_GLIBCXX_SYMVER_GNU_NAMESPACE, 1,
 	      [Define to use GNU namespace versioning in the shared library.])

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