Message ID | 20141128165532.GR5191@redhat.com |
---|---|
State | New |
Headers | show |
The powerpc64 ICE is fixed, so I'm committing the std::string ABI transition patch. This replaces our venerable Copy-on-Write std::string with a C++11-conforming* Small-String Optimized std::__cxx11::string. (* It's not quite 100% conforming, as it's missing some allocator features. Of course. Always with the allocators. But that's only a small fix to make next week.) Since the last version of this patch Jason has added support for attribute((abi_tag)) on namespaces, so the new types can be defined in an inline namespace that has the tag, rather than co-existing in namespace std with the un-tagged types. This makes overloading and exporting symbols a bit more straightforward as the different linkage names can be expressed with a fully-qualified name without needing the attribute. I've also added regex templates to the new __cxx11 namespace, as they depend on std::string. There are now two new configure options, --disable-libstdcxx-dual-abi and --with-default-libstdcxx-abi. The former disables all support for the new __cxx11 ABI pieces. The latter is only relevant when the dual ABI is enabled and can be used to make the old definitions the default ones you get without defining the _GLIBCXX_USE_CXX11_ABI macro. As described previously, the locale facets that depend on the std::string ABI exist twice as "twinned facets" and if users replace a twinned facet the library generates a shim to replace its twin. Also as described previously, the types in <stdexcept> continue to use the COW string, to ensure nothrow copying and ABI stability. The Python pretty printer problems I was seeing with the new string turned out to be a GDB bug (17728). Target maintainers will see a *lot* of new exports at the latest symbol version if they generate a new baseline-symbols.txt file. I suggest waiting and doing that nearer the end of stage 3 in case there are any fixes needed after this change. Bootstrapped and tested in various configurations on x86_64-linux and powerpc64-linux. Committed to trunk! Phew.
Jonathan Wakely <jwakely@redhat.com> writes: > The powerpc64 ICE is fixed, so I'm committing the std::string ABI > transition patch. > > This replaces our venerable Copy-on-Write std::string with a > C++11-conforming* Small-String Optimized std::__cxx11::string. > > (* It's not quite 100% conforming, as it's missing some allocator > features. Of course. Always with the allocators. But that's only a > small fix to make next week.) [...] > Target maintainers will see a *lot* of new exports at the latest > symbol version if they generate a new baseline-symbols.txt file. I > suggest waiting and doing that nearer the end of stage 3 in case there > are any fixes needed after this change. > > Bootstrapped and tested in various configurations on x86_64-linux and > powerpc64-linux. Unfortunately, this patch broke Solaris bootstrap with /bin/ld: libstdc++.so fails to link with ld: fatal: libstdc++-symbols.ver-sun: 5383: symbol 'std::locale::name[abi:cxx11]() const': symbol version conflict l.5383 has ##_ZNKSt6locale4nameB5cxx11Ev (glob) _ZNKSt6locale4nameB5cxx11Ev; i.e. # std::locale::name() returning new std::string in GLIBCXX_3.4.21 vs. ##std::locale::[A-Zn-z]* (cxx) _ZNKSt6locale4nameB5cxx11Ev; in GLIBCXX_3.4. Rainer
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index d4864ae..dd8142e 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1617,8 +1617,12 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id) /* Clear flags that need revisiting. */ if (gcall *call_stmt = dyn_cast <gcall *> (copy)) - if (gimple_call_tail_p (call_stmt)) - gimple_call_set_tail (call_stmt, false); + { + if (gimple_call_tail_p (call_stmt)) + gimple_call_set_tail (call_stmt, false); + if (gimple_call_from_thunk_p (call_stmt)) + gimple_call_set_from_thunk (call_stmt, false); + } /* Remap the region numbers for __builtin_eh_{pointer,filter}, RESX and EH_DISPATCH. */ diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index e8f9e67..77838b0 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -2216,8 +2216,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL double&) const; // XXX GLIBCXX_ABI Deprecated -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ virtual iter_type __do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, double&) const; @@ -2231,8 +2230,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; // XXX GLIBCXX_ABI Deprecated -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long double&) const; @@ -2501,8 +2499,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL do_put(iter_type, ios_base&, char_type, double) const; // XXX GLIBCXX_ABI Deprecated -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ virtual iter_type __do_put(iter_type, ios_base&, char_type, double) const; #else @@ -2514,8 +2511,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL do_put(iter_type, ios_base&, char_type, const void*) const; // XXX GLIBCXX_ABI Deprecated -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ virtual iter_type do_put(iter_type, ios_base&, char_type, long double) const; #endif diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 23e87d0..306d3a6 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -712,8 +712,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL return __beg; } -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: @@ -1156,8 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } -#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ \ - && _GLIBCXX_USE_CXX11_ABI == 0 +#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>::