From 34a2b7558b37707a17e1f2ba5298f94a88807492 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Fri, 19 Dec 2014 18:16:39 +0000
Subject: [PATCH] New std::string implementation.
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove.
(GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add.
* configure.ac: Use new macros.
* configure: Regenerate.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI.
* include/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Export symbols related to new std::string.
Tighten old patterns to not match new symbols.
* config/locale/generic/monetary_members.cc: Guard some definitions
to not compile with new ABI.
* config/locale/gnu/monetary_members.cc: Likewise.
* config/locale/gnu/numeric_members.cc: Prevent double-free.
* config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128
exports. Tighten old patterns.
* doc/xml/manual/configure.xml: Document new configure options.
* doc/html/*: Regenerate.
* include/bits/basic_string.h (__cxx11::basic_string): Define new
non-reference-counted implementation in inline namespace __cxx11.
(stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use
inline namespace.
(literals::string_literals::operator"): Conditionally use abi-tag.
* include/bits/basic_string.tcc (__cxx11::basic_string): Define.
* include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and
LDBL_CXX11_ABI namespace macros.
* include/bits/locale_classes.h (locale::name()): Use abi_tag when
new ABI is in use.
(locale::_S_twinned_facets): New static member.
(locale::facet::__shim): Declare new type.
(locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New
functions for creating shims.
(locale::_Impl::_M_facet_unchecked): New member function for use
during construction.
(locale::_Impl::_M_init_extra): New member functions to create second
version of some facets.
(collate, collate_byname): Use abi_tag when new ABI is in use.
* include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro.
(numpunct, numpunct_byname): Use __cxx11 namespace.
(num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag
when new ABI is in use.
(num_get::__do_get, num_put::__do_put): Do not declare long double
compat functions for new ABI.
* include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on
definitions.
(numpunct, numpunct_byname): Qualify explicit instantiations.
* include/bits/locale_facets_nonio.h (time_get, time_get_byname,
moneypunct, moneypunct_byname, money_get, money_put, messages,
messages_byname): Use new inline namespace macros.
(money_get::__do_get, money_put::__do_put): Do not declare long
double compat functions for new ABI.
* include/bits/locale_facets_nonio.tcc (money_get, money_put): Use
new namespace macros.
(money_get::__do_get, money_put::__do_put): Do not define for new ABI.
* include/bits/localefwd.h (numpunct, numpunct_byname, collate,
collate_byname, time_get, time_get_byname, moneypunct,
moneypunct_byname, money_get, money_put, messages, messages_byname):
Use new namespace macros.
* include/bits/regex.h: Use inline namespace macros.
* include/bits/stl_list.h (_List_base, list): Use inline namespace
instead of abi-tag.
* include/bits/stringfwd.h (basic_string): Use namespace macros.
* include/std/iosfwd (basic_stringbuf, basic_istringstream,
basic_ostringstream, basic_stringstream): Likewise.
* include/std/sstream: Likewise.
(basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move.
* include/std/stdexcept (__cow_string, __sso_string): New types for
indirectly using std::string with either ABI.
(logic_error, runtime_error): Replace std::string member with
__cow_string when new ABI is in use. Declare non-inline copy
constructor and assignment operator. Declare const char* constructors.
(domain_error, invalid_argument, length_error, out_of_range,
range_error, overflow_error, underflow_error): Declare const char*
constructors.
* include/std/system_error (error_category): Replace with new
definition in inline namespace _V2.
(error_code::message, error_condition::message): Use abi_tag on
functions returning std::string.
* python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI.
* src/c++11/Makefile.am: Add new files.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI.
Define old error_category symbols.
* src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members
using old std::string ABI.
* src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define.
* src/c++11/cow-shim_facets.cc: Define shim facets using old ABI.
* src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old
std::string ABI.
* src/c++11/cow-stdexcept.cc: Define new constructors and assignment
operators.
(__cow_string, error_category::_M_message): Define.
* src/c++11/cow-string-inst.cc: Explicit instantiations using old
std::string. Include src/c++98/istream-string.cc.
* src/c++11/cow-wstring-inst.cc: Explicit instantiations using old
std::wstring.
* src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new
string.
* src/c++11/cxx11-ios_failure.cc: Add sanity check.
* src/c++11/cxx11-locale-inst.cc: Instantiate facets using new
std::string.
* src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI.
* src/c++11/cxx11-stdexcept.cc: Define constructors taking new
std::string.
* src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using
new std::wstring.
* src/c++11/fstream-inst.cc: Compile with new ABI.
* src/c++11/functexcept.cc: Compile with old ABI.
* src/c++11/random.cc: Compile with new ABI.
* src/c++11/sstream-inst.cc: Compile with new ABI.
* src/c++11/string-inst.cc: Explicit instantiations for new string.
* src/c++11/system_error.cc (__sso_string, error_category::_M_message):
Define.
* src/c++11/wstring-inst.cc: Compile with new ABI.
* src/c++98/Makefile.am: Compile some host files twice for old and
new std::string. Add new files.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/compatibility-ldbl.cc: Compile with old ABI.
* src/c++98/compatibility.cc: Likewise.
* src/c++98/concept-inst.cc: Likewise.
* src/c++98/hash_tr1.cc: Likewise.
* src/c++98/istream-string.cc: New file defining functions that
work with istream and std::string moved from ...
* src/c++98/istream.cc: ... here.
* src/c++98/cow-istream-string.cc: Recompile istream-string.cc with
old ABI.
* src/c++98/locale-inst.cc: Adjust facet instantiations to work for
either ABI.
* src/c++98/locale.cc (locale::_M_install_facet,
locale::_M_install_cache): Handle twinned facets.
* src/c++98/locale-facets.cc: Compile with old std::string ABI.
(__verify_grouping): Define new overload and old std::string version.
* src/c++98/locale_init.cc: Initialize twinned facets.
* src/c++98/localename.cc: Likewise.
* src/c++98/misc-inst.cc: Instantiate C++98-only std::string members.
(__verify_grouping): Define new std::string version.
* src/c++98/stdexcept.cc: Compile with old std::string ABI.
* src/c++98/wlocale-inst.cc: Likewise.
* testsuite/18_support/50594.cc: Adjust to work with SSO strings.
* testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
Likewise.
* testsuite/21_strings/headers/string/synopsis.cc: Use inline
namespace macros.
* testsuite/23_containers/headers/list/synopsis.cc: Likewise.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so
correct exception type can be caught.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.
* testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI.
* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
* testsuite/util/exception/safety.h: Adjust member function types
for new std::string.
* testsuite/util/testsuite_abi.cc: Add new version and ignore
__float128 symbols in __cxx11 namespace.
From-SVN: r218964
---
libstdc++-v3/ChangeLog | 184 ++
libstdc++-v3/Makefile.in | 1 +
libstdc++-v3/acinclude.m4 | 55 +-
libstdc++-v3/config/abi/pre/gnu.ver | 308 ++-
.../config/locale/generic/monetary_members.cc | 5 +
.../config/locale/gnu/monetary_members.cc | 5 +
.../config/locale/gnu/numeric_members.cc | 2 +
.../config/os/gnu-linux/ldbl-extra.ver | 17 +-
libstdc++-v3/configure | 97 +-
libstdc++-v3/configure.ac | 3 +-
libstdc++-v3/doc/Makefile.in | 1 +
libstdc++-v3/doc/html/manual/configure.html | 9 +
.../doc/html/manual/using_exceptions.html | 2 +-
libstdc++-v3/doc/xml/manual/configure.xml | 19 +
libstdc++-v3/include/Makefile.am | 11 +
libstdc++-v3/include/Makefile.in | 9 +
libstdc++-v3/include/bits/basic_string.h | 2404 ++++++++++++++++-
libstdc++-v3/include/bits/basic_string.tcc | 473 +++-
libstdc++-v3/include/bits/c++config | 27 +-
libstdc++-v3/include/bits/locale_classes.h | 25 +-
libstdc++-v3/include/bits/locale_facets.h | 8 +
libstdc++-v3/include/bits/locale_facets.tcc | 10 +-
.../include/bits/locale_facets_nonio.h | 28 +-
.../include/bits/locale_facets_nonio.tcc | 18 +-
libstdc++-v3/include/bits/localefwd.h | 18 +-
libstdc++-v3/include/bits/regex.h | 9 +
libstdc++-v3/include/bits/stl_list.h | 7 +-
libstdc++-v3/include/bits/stringfwd.h | 26 +-
libstdc++-v3/include/std/iosfwd | 5 +
libstdc++-v3/include/std/sstream | 70 +-
libstdc++-v3/include/std/stdexcept | 103 +-
libstdc++-v3/include/std/system_error | 31 +-
libstdc++-v3/libsupc++/Makefile.in | 1 +
libstdc++-v3/po/Makefile.in | 1 +
libstdc++-v3/python/Makefile.in | 1 +
libstdc++-v3/python/libstdcxx/v6/printers.py | 19 +-
libstdc++-v3/src/Makefile.in | 1 +
libstdc++-v3/src/c++11/Makefile.am | 23 +-
libstdc++-v3/src/c++11/Makefile.in | 57 +-
libstdc++-v3/src/c++11/compatibility-c++0x.cc | 128 +-
libstdc++-v3/src/c++11/cow-fstream-inst.cc | 78 +
libstdc++-v3/src/c++11/cow-locale_init.cc | 194 ++
libstdc++-v3/src/c++11/cow-shim_facets.cc | 35 +
libstdc++-v3/src/c++11/cow-sstream-inst.cc | 34 +
libstdc++-v3/src/c++11/cow-stdexcept.cc | 153 ++
libstdc++-v3/src/c++11/cow-string-inst.cc | 120 +
libstdc++-v3/src/c++11/cow-wstring-inst.cc | 64 +
libstdc++-v3/src/c++11/cxx11-hash_tr1.cc | 59 +
libstdc++-v3/src/c++11/cxx11-ios_failure.cc | 5 +
libstdc++-v3/src/c++11/cxx11-locale-inst.cc | 39 +
libstdc++-v3/src/c++11/cxx11-shim_facets.cc | 813 ++++++
libstdc++-v3/src/c++11/cxx11-stdexcept.cc | 78 +
libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc | 32 +
libstdc++-v3/src/c++11/fstream-inst.cc | 1 +
libstdc++-v3/src/c++11/functexcept.cc | 3 +
libstdc++-v3/src/c++11/random.cc | 1 +
libstdc++-v3/src/c++11/sstream-inst.cc | 5 +
libstdc++-v3/src/c++11/string-inst.cc | 29 +-
libstdc++-v3/src/c++11/system_error.cc | 82 +-
libstdc++-v3/src/c++11/wstring-inst.cc | 1 +
libstdc++-v3/src/c++98/Makefile.am | 52 +
libstdc++-v3/src/c++98/Makefile.in | 72 +-
libstdc++-v3/src/c++98/compatibility-ldbl.cc | 1 +
libstdc++-v3/src/c++98/compatibility.cc | 1 +
libstdc++-v3/src/c++98/concept-inst.cc | 1 +
libstdc++-v3/src/c++98/cow-istream-string.cc | 30 +
libstdc++-v3/src/c++98/hash_tr1.cc | 1 +
libstdc++-v3/src/c++98/istream-string.cc | 291 ++
libstdc++-v3/src/c++98/istream.cc | 248 +-
libstdc++-v3/src/c++98/locale-inst.cc | 62 +-
libstdc++-v3/src/c++98/locale.cc | 60 +
libstdc++-v3/src/c++98/locale_facets.cc | 20 +-
libstdc++-v3/src/c++98/locale_init.cc | 94 +-
libstdc++-v3/src/c++98/localename.cc | 11 +-
libstdc++-v3/src/c++98/misc-inst.cc | 41 +
libstdc++-v3/src/c++98/stdexcept.cc | 2 +
libstdc++-v3/src/c++98/wlocale-inst.cc | 2 +
libstdc++-v3/testsuite/18_support/50594.cc | 2 +-
.../21_strings/basic_string/capacity/1.cc | 4 +
.../basic_string/capacity/char/1.cc | 4 +
.../basic_string/capacity/char/18654.cc | 9 +-
.../basic_string/capacity/char/2.cc | 2 +-
.../basic_string/capacity/wchar_t/1.cc | 4 +
.../basic_string/capacity/wchar_t/18654.cc | 9 +-
.../21_strings/headers/string/synopsis.cc | 2 +
.../23_containers/headers/list/synopsis.cc | 2 +
.../27_io/basic_ios/copyfmt/char/1.cc | 2 +
.../27_io/basic_ios/exceptions/char/1.cc | 2 +
.../char/exceptions_failbit.cc | 2 +
.../wchar_t/exceptions_failbit.cc | 2 +
.../extractors_other/char/exceptions_null.cc | 2 +
.../wchar_t/exceptions_null.cc | 2 +
.../27_io/basic_istream/sentry/char/12297.cc | 3 +
.../basic_istream/sentry/wchar_t/12297.cc | 2 +
.../inserters_other/char/exceptions_null.cc | 2 +
.../wchar_t/exceptions_null.cc | 2 +
.../27_io/headers/sstream/synopsis.cc | 2 +
.../testsuite/27_io/ios_base/failure/cxx11.cc | 4 +
.../testsuite/27_io/ios_base/storage/2.cc | 3 +
libstdc++-v3/testsuite/Makefile.in | 1 +
.../ext/profile/mutex_extensions_neg.cc | 2 +-
.../libstdc++-prettyprinters/libfundts.cc | 3 +
.../libstdc++-prettyprinters/simple.cc | 3 +
.../libstdc++-prettyprinters/simple11.cc | 3 +
.../libstdc++-prettyprinters/whatis.cc | 3 +
.../testsuite/util/exception/safety.h | 8 +
libstdc++-v3/testsuite/util/testsuite_abi.cc | 4 +-
107 files changed, 6685 insertions(+), 446 deletions(-)
create mode 100644 libstdc++-v3/src/c++11/cow-fstream-inst.cc
create mode 100644 libstdc++-v3/src/c++11/cow-locale_init.cc
create mode 100644 libstdc++-v3/src/c++11/cow-shim_facets.cc
create mode 100644 libstdc++-v3/src/c++11/cow-sstream-inst.cc
create mode 100644 libstdc++-v3/src/c++11/cow-stdexcept.cc
create mode 100644 libstdc++-v3/src/c++11/cow-string-inst.cc
create mode 100644 libstdc++-v3/src/c++11/cow-wstring-inst.cc
create mode 100644 libstdc++-v3/src/c++11/cxx11-hash_tr1.cc
create mode 100644 libstdc++-v3/src/c++11/cxx11-locale-inst.cc
create mode 100644 libstdc++-v3/src/c++11/cxx11-shim_facets.cc
create mode 100644 libstdc++-v3/src/c++11/cxx11-stdexcept.cc
create mode 100644 libstdc++-v3/src/c++11/cxx11-wlocale-inst.cc
create mode 100644 libstdc++-v3/src/c++98/cow-istream-string.cc
create mode 100644 libstdc++-v3/src/c++98/istream-string.cc
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2405bb55908..a46a2b6d0d3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,187 @@
+2014-12-19 Jonathan Wakely
+
+ * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove.
+ (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add.
+ * configure.ac: Use new macros.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * libsupc++/Makefile.in: Regenerate.
+ * po/Makefile.in: Regenerate.
+ * src/Makefile.in: Regenerate.
+ * testsuite/Makefile.in: Regenerate.
+ * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI.
+ * include/Makefile.in: Regenerate.
+ * config/abi/pre/gnu.ver: Export symbols related to new std::string.
+ Tighten old patterns to not match new symbols.
+ * config/locale/generic/monetary_members.cc: Guard some definitions
+ to not compile with new ABI.
+ * config/locale/gnu/monetary_members.cc: Likewise.
+ * config/locale/gnu/numeric_members.cc: Prevent double-free.
+ * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128
+ exports. Tighten old patterns.
+ * doc/xml/manual/configure.xml: Document new configure options.
+ * doc/html/*: Regenerate.
+ * include/bits/basic_string.h (__cxx11::basic_string): Define new
+ non-reference-counted implementation in inline namespace __cxx11.
+ (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use
+ inline namespace.
+ (literals::string_literals::operator"): Conditionally use abi-tag.
+ * include/bits/basic_string.tcc (__cxx11::basic_string): Define.
+ * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and
+ LDBL_CXX11_ABI namespace macros.
+ * include/bits/locale_classes.h (locale::name()): Use abi_tag when
+ new ABI is in use.
+ (locale::_S_twinned_facets): New static member.
+ (locale::facet::__shim): Declare new type.
+ (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New
+ functions for creating shims.
+ (locale::_Impl::_M_facet_unchecked): New member function for use
+ during construction.
+ (locale::_Impl::_M_init_extra): New member functions to create second
+ version of some facets.
+ (collate, collate_byname): Use abi_tag when new ABI is in use.
+ * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro.
+ (numpunct, numpunct_byname): Use __cxx11 namespace.
+ (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag
+ when new ABI is in use.
+ (num_get::__do_get, num_put::__do_put): Do not declare long double
+ compat functions for new ABI.
+ * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on
+ definitions.
+ (numpunct, numpunct_byname): Qualify explicit instantiations.
+ * include/bits/locale_facets_nonio.h (time_get, time_get_byname,
+ moneypunct, moneypunct_byname, money_get, money_put, messages,
+ messages_byname): Use new inline namespace macros.
+ (money_get::__do_get, money_put::__do_put): Do not declare long
+ double compat functions for new ABI.
+ * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use
+ new namespace macros.
+ (money_get::__do_get, money_put::__do_put): Do not define for new ABI.
+ * include/bits/localefwd.h (numpunct, numpunct_byname, collate,
+ collate_byname, time_get, time_get_byname, moneypunct,
+ moneypunct_byname, money_get, money_put, messages, messages_byname):
+ Use new namespace macros.
+ * include/bits/regex.h: Use inline namespace macros.
+ * include/bits/stl_list.h (_List_base, list): Use inline namespace
+ instead of abi-tag.
+ * include/bits/stringfwd.h (basic_string): Use namespace macros.
+ * include/std/iosfwd (basic_stringbuf, basic_istringstream,
+ basic_ostringstream, basic_stringstream): Likewise.
+ * include/std/sstream: Likewise.
+ (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move.
+ * include/std/stdexcept (__cow_string, __sso_string): New types for
+ indirectly using std::string with either ABI.
+ (logic_error, runtime_error): Replace std::string member with
+ __cow_string when new ABI is in use. Declare non-inline copy
+ constructor and assignment operator. Declare const char* constructors.
+ (domain_error, invalid_argument, length_error, out_of_range,
+ range_error, overflow_error, underflow_error): Declare const char*
+ constructors.
+ * include/std/system_error (error_category): Replace with new
+ definition in inline namespace _V2.
+ (error_code::message, error_condition::message): Use abi_tag on
+ functions returning std::string.
+ * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI.
+ * src/c++11/Makefile.am: Add new files.
+ * src/c++11/Makefile.in: Regenerate.
+ * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI.
+ Define old error_category symbols.
+ * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members
+ using old std::string ABI.
+ * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define.
+ * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI.
+ * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old
+ std::string ABI.
+ * src/c++11/cow-stdexcept.cc: Define new constructors and assignment
+ operators.
+ (__cow_string, error_category::_M_message): Define.
+ * src/c++11/cow-string-inst.cc: Explicit instantiations using old
+ std::string. Include src/c++98/istream-string.cc.
+ * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old
+ std::wstring.
+ * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new
+ string.
+ * src/c++11/cxx11-ios_failure.cc: Add sanity check.
+ * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new
+ std::string.
+ * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI.
+ * src/c++11/cxx11-stdexcept.cc: Define constructors taking new
+ std::string.
+ * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using
+ new std::wstring.
+ * src/c++11/fstream-inst.cc: Compile with new ABI.
+ * src/c++11/functexcept.cc: Compile with old ABI.
+ * src/c++11/random.cc: Compile with new ABI.
+ * src/c++11/sstream-inst.cc: Compile with new ABI.
+ * src/c++11/string-inst.cc: Explicit instantiations for new string.
+ * src/c++11/system_error.cc (__sso_string, error_category::_M_message):
+ Define.
+ * src/c++11/wstring-inst.cc: Compile with new ABI.
+ * src/c++98/Makefile.am: Compile some host files twice for old and
+ new std::string. Add new files.
+ * src/c++98/Makefile.in: Regenerate.
+ * src/c++98/compatibility-ldbl.cc: Compile with old ABI.
+ * src/c++98/compatibility.cc: Likewise.
+ * src/c++98/concept-inst.cc: Likewise.
+ * src/c++98/hash_tr1.cc: Likewise.
+ * src/c++98/istream-string.cc: New file defining functions that
+ work with istream and std::string moved from ...
+ * src/c++98/istream.cc: ... here.
+ * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with
+ old ABI.
+ * src/c++98/locale-inst.cc: Adjust facet instantiations to work for
+ either ABI.
+ * src/c++98/locale.cc (locale::_M_install_facet,
+ locale::_M_install_cache): Handle twinned facets.
+ * src/c++98/locale-facets.cc: Compile with old std::string ABI.
+ (__verify_grouping): Define new overload and old std::string version.
+ * src/c++98/locale_init.cc: Initialize twinned facets.
+ * src/c++98/localename.cc: Likewise.
+ * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members.
+ (__verify_grouping): Define new std::string version.
+ * src/c++98/stdexcept.cc: Compile with old std::string ABI.
+ * src/c++98/wlocale-inst.cc: Likewise.
+ * testsuite/18_support/50594.cc: Adjust to work with SSO strings.
+ * testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
+ Likewise.
+ * testsuite/21_strings/headers/string/synopsis.cc: Use inline
+ namespace macros.
+ * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
+ * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so
+ correct exception type can be caught.
+ * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/
+ exceptions_failbit.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
+ exceptions_failbit.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_other/char/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_other/wchar_t/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/char/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
+ exceptions_null.cc: Likewise.
+ * testsuite/27_io/ios_base/storage/2.cc: Likewise.
+ * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI.
+ * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error.
+ * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI.
+ * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
+ * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
+ * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
+ * testsuite/util/exception/safety.h: Adjust member function types
+ for new std::string.
+ * testsuite/util/testsuite_abi.cc: Add new version and ignore
+ __float128 symbols in __cxx11 namespace.
+
2014-12-17 Tim Shen
PR libstdc++/64302
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index bede542535d..961d840f45f 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -244,6 +244,7 @@ glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
+glibcxx_cxx98_abi = @glibcxx_cxx98_abi@
glibcxx_localedir = @glibcxx_localedir@
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 0229609df2c..db357d6d731 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3832,24 +3832,57 @@ AC_DEFUN([GLIBCXX_CHECK_SDT_H], [
])
dnl
-dnl Check if the user wants the new C++11-conforming ABI.
+dnl Control whether the library should define symbols for old and new ABIs.
+dnl This affects definitions of strings, stringstreams and locale facets.
dnl
-dnl --disable-libstdcxx-cxx11-abi will use old ABI for all types.
+dnl --disable-libstdcxx-dual-abi will use old ABI for all types.
dnl
dnl Defines:
-dnl _GLIBCXX_USE_ABI_TAG (always defined, either to 1 or 0)
+dnl _GLIBCXX_USE_DUAL_ABI (always defined, either to 1 or 0)
dnl
-AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI], [
- AC_ARG_ENABLE([libstdcxx-cxx11-abi],
- AC_HELP_STRING([--disable-libstdcxx-cxx11-abi],
- [disable the C++11-conforming ABI]),,
- [enable_libstdcxx_cxx11_abi=yes])
- if test x"$enable_libstdcxx_cxx11_abi" != xyes; then
- AC_MSG_NOTICE([C++11-conforming ABI is disabled])
+AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI], [
+ GLIBCXX_ENABLE(libstdcxx-dual-abi,$1,,[support two versions of std::string])
+ if test x"$enable_libstdcxx_dual_abi" != xyes; then
+ AC_MSG_NOTICE([dual ABI is disabled])
+ default_libstdcxx_abi="c++98"
fi
- GLIBCXX_CONDITIONAL(ENABLE_CXX11_ABI, test $enable_libstdcxx_cxx11_abi = yes)
+ GLIBCXX_CONDITIONAL(ENABLE_DUAL_ABI, test $enable_libstdcxx_dual_abi = yes)
])
+dnl
+dnl Check to see which ABI should be enabled by default.
+dnl
+dnl --with-default-libstdcxx-abi={c++98,c++11}
+dnl
+dnl Defines:
+dnl _GLIBCXX_USE_CXX11_ABI (always defined, either to 1 or 0)
+dnl
+AC_DEFUN([GLIBCXX_DEFAULT_ABI], [
+ if test x$enable_libstdcxx_dual_abi = xyes; then
+ AC_MSG_CHECKING([for default std::string ABI to use])
+ AC_ARG_WITH([default-libstdcxx-abi],
+ AS_HELP_STRING([--with-default-libstdcxx-abi],
+ [set the std::string ABI to use by default]),
+ [case "$withval" in
+ c++98|gnu++98|c++03|gnu++03) default_libstdcxx_abi="c++98" ;;
+ c++1?|gnu++1?) default_libstdcxx_abi="c++11" ;;
+ *) AC_MSG_ERROR([Invalid argument for --with-default-libstdcxx-abi]) ;;
+ esac],
+ [default_libstdcxx_abi="c++11"])
+ AC_MSG_RESULT(${default_libstdcxx_abi})
+ fi
+ if test $default_libstdcxx_abi = "c++11"; then
+ glibcxx_cxx11_abi=1
+ glibcxx_cxx98_abi=0
+ else
+ glibcxx_cxx11_abi=0
+ glibcxx_cxx98_abi=1
+ fi
+ AC_SUBST(glibcxx_cxx98_abi)
+ GLIBCXX_CONDITIONAL(ENABLE_CXX11_ABI, test $glibcxx_cxx11_abi = 1)
+])
+
+
# Macros from the top-level gcc directory.
m4_include([../config/gc++filt.m4])
m4_include([../config/tls.m4])
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 5893f1b28cf..8ba8ed4dba9 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -73,7 +73,7 @@ GLIBCXX_3.4 {
# std::[d-g]*;
std::d[a-d]*;
std::d[f-n]*;
- std::domain_error::d*;
+# std::domain_error::d*;
# std::domain_error::~d*;
std::d[p-z]*;
std::e[a-q]*;
@@ -82,7 +82,7 @@ GLIBCXX_3.4 {
std::gslice*;
std::h[^a]*;
std::i[a-m]*;
- std::invalid_argument::i*;
+# std::invalid_argument::i*;
# std::invalid_argument::~i*;
# std::ios_base::[A-Ha-z]*;
std::ios_base::[A-Ha-e]*;
@@ -103,9 +103,8 @@ GLIBCXX_3.4 {
std::istrstream*;
std::i[t-z]*;
std::[A-Zj-k]*;
- std::length_error::l*;
+# std::length_error::l*;
# std::length_error::~l*;
- std::logic_error*;
std::locale::[A-Za-e]*;
std::locale::facet::[A-Za-z]*;
std::locale::facet::_S_get_c_locale*;
@@ -115,13 +114,20 @@ GLIBCXX_3.4 {
std::locale::[A-Zg-h]*;
std::locale::id::[A-Za-z]*;
std::locale::id::_M_id*;
- std::locale::[A-Zj-z]*;
+ std::locale::[A-Zj-m]*;
+# std::locale::name();
+ std::locale::none*;
+ std::locale::numeric*;
+ std::locale::[A-Zn-z]*;
std::locale::_[A-Ha-z]*;
std::locale::_Impl::[A-Za-z]*;
# std::locale::_Impl::_M_[A-Za-z]*;
std::locale::_[J-Ra-z]*;
std::locale::_S_normalize_category*;
std::locale::_[T-Za-z]*;
+# std::logic_error::l*;
+ std::logic_error::what*;
+# std::logic_error::~l*;
# std::[A-Zm-r]*;
# std::[A-Zm]*;
std::[A-Z]*;
@@ -133,16 +139,19 @@ GLIBCXX_3.4 {
std::nu[^m]*;
std::num[^e]*;
std::ostrstream*;
- std::out_of_range::o*;
+# std::out_of_range::o*;
# std::out_of_range::~o*;
- std::overflow_error::o*;
+# std::overflow_error::o*;
# std::overflow_error::~o*;
# std::[p-q]*;
- std::r[^ae]*;
- std::range_error::r*;
+ std::r[^aeu]*;
+# std::range_error::r*;
# std::range_error::~r*;
# std::re[^t]*;
# std::rethrow_exception
+# std::runtime_error::r*
+ std::runtime_error::what*;
+# std::runtime_error::~r*;
std::set_new_handler*;
std::set_terminate*;
std::set_unexpected*;
@@ -158,7 +167,7 @@ GLIBCXX_3.4 {
std::tr1::h[^a]*;
std::t[s-z]*;
# std::[A-Zu-z]*;
- std::underflow_error::u*;
+# std::underflow_error::u*;
# std::underflow_error::~u*;
std::uncaught_exception*;
std::unexpected*;
@@ -337,19 +346,19 @@ GLIBCXX_3.4 {
_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*;
+ _ZNKSt19basic_istringstreamI*;
# 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*;
+ _ZNKSt19basic_ostringstreamI*;
# 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*;
+ _ZNKSt18basic_stringstreamI*;
# std::basic_iostream constructors (except move), destructors
_ZNSdC[12]Ev;
@@ -447,10 +456,10 @@ GLIBCXX_3.4 {
_ZNSt13basic_istreamIwSt11char_traitsIwEErsE*[^g];
# std::istream operators and extractors
- _ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
+ _ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istreamIT_T0_ES7_RSbI*;
_ZSt2wsI[cw]St11char_traitsI[cw]EE*;
_ZStrsI[cw]St11char_traitsI[cw]EERSt13basic_istream*;
- _ZStrsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
+ _ZStrsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istreamIT_T0_ES7_RSbI*;
_ZStrsISt11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsId[cw]St11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsIe[cw]St11char_traitsI[cw]EERSt13basic_istream*;
@@ -484,7 +493,7 @@ GLIBCXX_3.4 {
_ZSt4end[ls]I[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZSt5flushI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
- _ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostream*;
+ _ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostreamIT_T0_ES7_RKSbI*;
_ZStlsISt11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsId[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsIe[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
@@ -493,6 +502,9 @@ GLIBCXX_3.4 {
# std::locale destructors
_ZNSt6localeD*;
+ # std::locale::name() returning old std::string
+ _ZNKSt6locale4nameEv;
+
# std::locale::facet destructors
_ZNSt6locale5facetD*;
@@ -529,16 +541,23 @@ GLIBCXX_3.4 {
_ZNSt12ctype_bynameI[cw]*;
# std::num_get
- _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+ _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE[2-9]*;
+ _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE14_M_extract_intI*;
+ _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE16_M_extract_floatI*;
# std::num_put
- _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+ _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE[2-9]*;
+ _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE1[234]*;
+ _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE15_M_insert_floatI*;
# std::money_get
- _ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+ _ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE[2-9]*;
+ _ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE10_M_extractILb[01]EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs;
# std::money_put
- _ZNKSt9money_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+ _ZNKSt9money_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE[1-8]*;
+ _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb[01]EEES3_S3_RSt8ios_basecRKSs;
+ _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb[01]EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE;
# std::time_get
_ZNSt8time_get*;
@@ -679,7 +698,13 @@ GLIBCXX_3.4 {
_ZTVSt[0-9][0-9]a*;
_ZTVSt10bad_typeid;
_ZTVSt13bad_exception;
- _ZTVSt[0-9][0-9]basic*;
+# _ZTVSt[0-9][0-9]basic*;
+ _ZTVSt1[34]basic*;
+ _ZTVSt15basic_streambufI*;
+ _ZTVSt15basic_stringbufI*;
+ _ZTVSt18basic_stringstreamI*;
+ _ZTVSt19basic_istringstreamI*;
+ _ZTVSt19basic_ostringstreamI*;
_ZTVSt[0-9][0-9][c-d]*;
_ZTVSt[0-9][0-9][g-k]*;
_ZTVSt11logic_error;
@@ -701,7 +726,17 @@ GLIBCXX_3.4 {
# VTT structure
_ZTTS[a-z];
_ZTTSt[0-9][A-Za-z]*;
- _ZTTSt[0-9][0-9][A-Za-z]*;
+# _ZTTSt[0-9][0-9][A-Za-z]*;
+ _ZTTSt1[0-4]*;
+ _ZTTSt15a*;
+ _ZTTSt15basic_streambufI*;
+ _ZTTSt15basic_stringbufI*;
+ _ZTTSt15[c-z]*;
+ _ZTTSt1[67]*;
+ _ZTTSt18basic_stringstreamI*;
+ _ZTTSt19basic_istringstreamI*;
+ _ZTTSt19basic_ostringstreamI*;
+ _ZTTSt[2-9]*;
# typeinfo structure
_ZTIS[a-z];
@@ -712,7 +747,13 @@ GLIBCXX_3.4 {
_ZTISt[0-9][0-9]a*;
_ZTISt10bad_typeid;
_ZTISt13bad_exception;
- _ZTISt[0-9][0-9]basic*;
+# _ZTISt[0-9][0-9]basic*;
+ _ZTISt1[34]basic*;
+ _ZTISt15basic_streambufI*;
+ _ZTISt15basic_stringbufI*;
+ _ZTISt18basic_stringstreamI*;
+ _ZTISt19basic_istringstreamI*;
+ _ZTISt19basic_ostringstreamI*;
_ZTISt[0-9][0-9][c-d]*;
_ZTISt[0-9][0-9][g-k]*;
_ZTISt11logic_error;
@@ -749,7 +790,13 @@ GLIBCXX_3.4 {
_ZTSSt[0-9][0-9]a*;
_ZTSSt10bad_typeid;
_ZTSSt13bad_exception;
- _ZTSSt[0-9][0-9]basic*;
+# _ZTSSt[0-9][0-9]basic*;
+ _ZTSSt1[34]basic*;
+ _ZTSSt15basic_stringbufI*;
+ _ZTSSt15basic_streambufI*;
+ _ZTSSt18basic_stringstreamI*;
+ _ZTSSt19basic_istringstreamI*;
+ _ZTSSt19basic_ostringstreamI*;
_ZTSSt[0-9][0-9][c-d]*;
_ZTSSt[0-9][0-9][g-k]*;
_ZTSSt11logic_error;
@@ -779,8 +826,33 @@ GLIBCXX_3.4 {
_ZNSt13bad_exceptionD*;
# function-scope static objects requires a guard variable.
- _ZGVNSt[^1]*;
- _ZGVNSt1[^7]*;
+ _ZGVNSt[2-6]*;
+ _ZGVNSt7collateI[cw]*;
+ _ZGVNSt7num_getI[cw]*;
+ _ZGVNSt7num_putI[cw]*;
+ _ZGVNSt8messagesI[cw]*;
+ _ZGVNSt8numpunctI[cw]*;
+ _ZGVNSt8time_getI[cw]*;
+ _ZGVNSt8time_putI[cw]*;
+ _ZGVNSt9money_getI[cw]*;
+ _ZGVNSt9money_putI[cw]*;
+ _ZGVNSt1[^07]*;
+ _ZGVNSt10moneypunctI[cw]Lb[01]*;
+
+ # exception constructors taking std::string
+ _ZNSt11logic_errorC[12]ERKSs;
+ _ZNSt13runtime_errorC[12]ERKSs;
+ _ZNSt11range_errorC[12]ERKSs;
+ _ZNSt12domain_errorC[12]ERKSs;
+ _ZNSt12length_errorC[12]ERKSs;
+ _ZNSt12out_of_rangeC[12]ERKSs;
+ _ZNSt14overflow_errorC[12]ERKSs;
+ _ZNSt15underflow_errorC[12]ERKSs;
+ _ZNSt16invalid_argumentC[12]ERKSs;
+
+ # complete, deleting and base destructors
+ _ZNSt11logic_errorD[012]Ev;
+ _ZNSt13runtime_errorD[012]Ev;
# complete and deleting destructors where base destructors should not
# be exported.
@@ -793,10 +865,42 @@ GLIBCXX_3.4 {
_ZNSt16invalid_argumentD[01]Ev;
# virtual function thunks
- _ZThn8_NS*;
- _ZThn16_NS*;
- _ZTv0_n12_NS*;
- _ZTv0_n24_NS*;
+# _ZThn8_NS*;
+ _ZThn8_NS[dio]*;
+ _ZThn8_NSt1[0-9]a*;
+ _ZThn8_NSt1[34]basic*;
+ _ZThn8_NSt18basic_stringstreamI*;
+ _ZThn8_NSt19basic_[io]stringstreamI*;
+ _ZThn8_NSt1[0-9][c-z]*;
+ _ZThn8_NSt[2-9][a-z0-9]*;
+# _ZThn16_NS*;
+ _ZThn16_NS[dio]*;
+ _ZThn16_NSt1[0-9]a*;
+ _ZThn16_NSt1[34]basic*;
+ _ZThn16_NSt18basic_stringstreamI*;
+ _ZThn16_NSt19basic_[io]stringstreamI*;
+ _ZThn16_NSt1[0-9][c-z]*;
+ _ZThn16_NSt[2-9][a-z0-9]*;
+# _ZTv0_n12_NS*;
+ _ZTv0_n12_NS[dio]*;
+ _ZTv0_n12_NSt1[0-9]a*;
+ _ZTv0_n12_NSt1[34]basic*;
+ _ZTv0_n12_NSt15basic_streambufI*;
+ _ZTv0_n12_NSt15basic_stringbufI*;
+ _ZTv0_n12_NSt18basic_stringstreamI*;
+ _ZTv0_n12_NSt19basic_[io]stringstreamI*;
+ _ZTv0_n12_NSt1[0-9][c-z]*;
+ _ZTv0_n12_NSt[2-9][a-z0-9]*;
+# _ZTv0_n24_NS*;
+ _ZTv0_n24_NS[dio]*;
+ _ZTv0_n24_NSt1[0-9]a*;
+ _ZTv0_n24_NSt1[34]basic*;
+ _ZTv0_n24_NSt15basic_streambufI*;
+ _ZTv0_n24_NSt15basic_stringbufI*;
+ _ZTv0_n24_NSt18basic_stringstreamI*;
+ _ZTv0_n24_NSt19basic_[io]stringstreamI*;
+ _ZTv0_n24_NSt1[0-9][c-z]*;
+ _ZTv0_n24_NSt[2-9][a-z0-9]*;
# stub functions from libmath
sinf;
@@ -1034,7 +1138,7 @@ GLIBCXX_3.4.10 {
_ZNKSt4hashISsEclESs;
_ZNKSt4hashIeEclEe;
- _ZSt17__verify_grouping*;
+ _ZSt17__verify_groupingPKc[mj]RKSs;
_ZNSt8__detail12__prime_listE;
_ZNSt3tr18__detail12__prime_listE;
@@ -1390,10 +1494,15 @@ GLIBCXX_3.4.18 {
# Names inside the 'extern' block are demangled names.
extern "C++"
{
- std::random_device::*;
std::__detail::_Prime_rehash_policy::*;
};
+ _ZNSt13random_device14_M_init_pretr1ERKSs;
+ _ZNSt13random_device16_M_getval_pretr1Ev;
+ _ZNSt13random_device7_M_finiEv;
+ _ZNSt13random_device7_M_initERKSs;
+ _ZNSt13random_device9_M_getvalEv;
+
# std::this_thread::__sleep_for
_ZNSt11this_thread11__sleep_for*;
@@ -1487,7 +1596,7 @@ GLIBCXX_3.4.21 {
_ZNKSt8ios_base7failureB5cxx114whatEv;
_ZNSt8ios_base7failureB5cxx11C[12]ERKSs;
_ZNSt8ios_base7failureB5cxx11C[12]EPKcRKSt10error_code;
- _ZNSt8ios_base7failureB5cxx11C[12]ERKSsB5cxx11;
+ _ZNSt8ios_base7failureB5cxx11C[12]ERKNSt7__cxx1112basic_string*;
_ZNSt8ios_base7failureB5cxx11C[12]ERKSsB5cxx11RKSt10error_code;
_ZNSt8ios_base7failureB5cxx11D[012]Ev;
_ZTINSt8ios_base7failureB5cxx11E;
@@ -1506,6 +1615,139 @@ GLIBCXX_3.4.21 {
# std::__future_base::_State_baseV2::_Make_ready::_M_set()
_ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
+ # ABI-tagged std::basic_string
+ _ZNSt7__cxx1112basic_string*;
+ _ZNKSt7__cxx1112basic_string*;
+
+ # ABI-tagged stringstreams
+ _ZNSt7__cxx1115basic_stringbuf*;
+ _ZNSt7__cxx1118basic_stringstream*;
+ _ZNSt7__cxx1119basic_istringstream*;
+ _ZNSt7__cxx1119basic_ostringstream*;
+ _ZNKSt7__cxx1115basic_stringbuf*;
+ _ZNKSt7__cxx1118basic_stringstream*;
+ _ZNKSt7__cxx1119basic_istringstream*;
+ _ZNKSt7__cxx1119basic_ostringstream*;
+ _ZT[ISTV]NSt7__cxx1115basic_stringbuf*;
+ _ZT[ISTV]NSt7__cxx1118basic_stringstream*;
+ _ZT[ISTV]NSt7__cxx1119basic_istringstream*;
+ _ZT[ISTV]NSt7__cxx1119basic_ostringstream*;
+ _ZThn8_NSt7__cxx1118basic_stringstream*;
+ _ZThn16_NSt7__cxx1118basic_stringstream*;
+ _ZTv0_n12_NSt7__cxx1115basic_stringbuf*;
+ _ZTv0_n12_NSt7__cxx1118basic_stringstream*;
+ _ZTv0_n12_NSt7__cxx1119basic_istringstream*;
+ _ZTv0_n12_NSt7__cxx1119basic_ostringstream*;
+ _ZTv0_n24_NSt7__cxx1115basic_stringbuf*;
+ _ZTv0_n24_NSt7__cxx1118basic_stringstream*;
+ _ZTv0_n24_NSt7__cxx1119basic_istringstream*;
+ _ZTv0_n24_NSt7__cxx1119basic_ostringstream*;
+
+ # I/O functions for ABI-tagged basic_string
+ _ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_string*;
+ _ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_string*;
+ _ZStrsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_string*;
+
+ # std::locale::name() returning new std::string
+ _ZNKSt6locale4nameB5cxx11Ev;
+
+ # ABI-tagged locale facets
+ _ZT[ISTV]NSt7__cxx117collateI[cw]*;
+ _ZT[ISTV]NSt7__cxx1114collate_bynameI[cw]*;
+ _ZT[ISTV]NSt7__cxx118messagesI[cw]*;
+ _ZT[ISTV]NSt7__cxx1115messages_bynameI[cw]*;
+ _ZT[ISTV]NSt7__cxx119money_getI[cw]*;
+ _ZT[ISTV]NSt7__cxx119money_putI[cw]*;
+ _ZT[ISTV]NSt7__cxx1110moneypunctI[cw]Lb[01]*;
+ _ZT[ISTV]NSt7__cxx1117moneypunct_bynameI[cw]Lb[01]*;
+ _ZT[ISTV]NSt7__cxx118numpunctI[cw]*;
+ _ZT[ISTV]NSt7__cxx1115numpunct_bynameI[cw]*;
+ _ZT[ISTV]NSt7__cxx118time_getI[cw]*;
+ _ZT[ISTV]NSt7__cxx1115time_get_bynameI[cw]*;
+
+ # guard vars for new facet::id globals
+ _ZGVNSt7__cxx117collateI[cw]*;
+ _ZGVNSt7__cxx118messagesI[cw]*;
+ _ZGVNSt7__cxx1110moneypunctI[cw]Lb[01]*;
+ _ZGVNSt7__cxx119money_getI[cw]*;
+ _ZGVNSt7__cxx119money_putI[cw]*;
+ _ZGVNSt7__cxx118numpunctI[cw]*;
+ _ZGVNSt7__cxx118time_getI[cw]*;
+
+ _ZNSt7__cxx117collateI*;
+ _ZNSt7__cxx1114collate_bynameI*;
+ _ZNSt7__cxx118messagesI*;
+ _ZNSt7__cxx1115messages_bynameI*;
+ _ZNSt7__cxx119money_getI*;
+ _ZNSt7__cxx119money_putI*;
+ _ZNSt7__cxx1110moneypunctI*;
+ _ZNSt7__cxx1117moneypunct_bynameI*;
+ _ZNSt7__cxx118numpunctI*;
+ _ZNSt7__cxx1115numpunct_bynameI*;
+ _ZNSt7__cxx118time_getI*;
+ _ZNSt7__cxx1115time_get_bynameI*;
+
+ _ZNKSt7__cxx117collateI*;
+ _ZNKSt7__cxx118messagesI*;
+ _ZNKSt7__cxx119money_getI*;
+ _ZNKSt7__cxx119money_putI*;
+ _ZNKSt7__cxx1110moneypunctI*;
+ _ZNKSt7__cxx118numpunctI*;
+ _ZNKSt7__cxx118time_getI*;
+
+ _ZSt9has_facetINSt7__cxx117collate*;
+ _ZSt9has_facetINSt7__cxx118messages*;
+ _ZSt9has_facetINSt7__cxx119money_get*;
+ _ZSt9has_facetINSt7__cxx119money_put*;
+ _ZSt9has_facetINSt7__cxx1110moneypunct*;
+ _ZSt9has_facetINSt7__cxx118numpunct*;
+ _ZSt9has_facetINSt7__cxx118time_get*;
+ _ZSt9use_facetINSt7__cxx117collate*;
+ _ZSt9use_facetINSt7__cxx118messages*;
+ _ZSt9use_facetINSt7__cxx119money_get*;
+ _ZSt9use_facetINSt7__cxx119money_put*;
+ _ZSt9use_facetINSt7__cxx1110moneypunct*;
+ _ZSt9use_facetINSt7__cxx118numpunct*;
+ _ZSt9use_facetINSt7__cxx118time_get*;
+
+ _ZSt17__verify_groupingPKc[mj]RKNSt7__cxx1112basic_string*;
+
+ _ZNSt3_V214error_category*;
+ _ZNKSt3_V214error_category*;
+ _ZTVNSt3_V214error_categoryE;
+ _ZTINSt3_V214error_categoryE;
+ _ZNSt3_V215system_categoryEv;
+ _ZNSt3_V216generic_categoryEv;
+
+ # New exception constructors
+ _ZNSt11logic_errorC[12]EPKc;
+ _ZNSt11logic_errorC[12]ERKS_;
+ _ZNSt11logic_erroraSERKS_;
+ _ZNSt11logic_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt11range_errorC[12]EPKc;
+ _ZNSt11range_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt12domain_errorC[12]EPKc;
+ _ZNSt12domain_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt12length_errorC[12]EPKc;
+ _ZNSt12length_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt12out_of_rangeC[12]EPKc;
+ _ZNSt12out_of_rangeC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt13runtime_errorC[12]EPKc;
+ _ZNSt13runtime_errorC[12]ERKS_;
+ _ZNSt13runtime_erroraSERKS_;
+ _ZNSt13runtime_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt14overflow_errorC[12]EPKc;
+ _ZNSt14overflow_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt15underflow_errorC[12]EPKc;
+ _ZNSt15underflow_errorC[12]ERKNSt7__cxx1112basic_string*;
+ _ZNSt16invalid_argumentC[12]EPKc;
+ _ZNSt16invalid_argumentC[12]ERKNSt7__cxx1112basic_string*;
+
+ _ZNSt13random_device14_M_init_pretr1ERKNSt7__cxx1112basic_string*;
+ _ZNSt13random_device7_M_initERKNSt7__cxx1112basic_string*;
+
+ _ZNKSt3tr14hashINSt7__cxx1112basic_string*;
+
} GLIBCXX_3.4.20;
diff --git a/libstdc++-v3/config/locale/generic/monetary_members.cc b/libstdc++-v3/config/locale/generic/monetary_members.cc
index b4f27a46103..20eabe1013a 100644
--- a/libstdc++-v3/config/locale/generic/monetary_members.cc
+++ b/libstdc++-v3/config/locale/generic/monetary_members.cc
@@ -34,11 +34,16 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+// This file might be compiled twice, but we only want to define the members
+// of money_base once.
+#if ! _GLIBCXX_USE_CXX11_ABI
+
// Construct and return valid pattern consisting of some combination of:
// space none symbol sign value
money_base::pattern
money_base::_S_construct_pattern(char, char, char) throw()
{ return _S_default_pattern; }
+#endif
template<>
void
diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc
index 25cdfd0b6ca..820ced2c9f8 100644
--- a/libstdc++-v3/config/locale/gnu/monetary_members.cc
+++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc
@@ -35,6 +35,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+// This file might be compiled twice, but we only want to define the members
+// of money_base once.
+#if ! _GLIBCXX_USE_CXX11_ABI
+
// Construct and return valid pattern consisting of some combination of:
// space none symbol sign value
money_base::pattern
@@ -201,6 +205,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
return __ret;
}
+#endif
template<>
void
diff --git a/libstdc++-v3/config/locale/gnu/numeric_members.cc b/libstdc++-v3/config/locale/gnu/numeric_members.cc
index 8af7cf68eee..69ac176ff42 100644
--- a/libstdc++-v3/config/locale/gnu/numeric_members.cc
+++ b/libstdc++-v3/config/locale/gnu/numeric_members.cc
@@ -117,6 +117,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
if (_M_data->_M_grouping_size)
delete [] _M_data->_M_grouping;
+ _M_data->_M_grouping = 0;
delete _M_data;
}
@@ -209,6 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
if (_M_data->_M_grouping_size)
delete [] _M_data->_M_grouping;
+ _M_data->_M_grouping = 0;
delete _M_data;
}
#endif
diff --git a/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver b/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver
index 3dd0336306c..5ef4a6cb6e1 100644
--- a/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver
+++ b/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver
@@ -9,7 +9,17 @@ GLIBCXX_LDBL_3.4 {
_ZSt14__convert_to_vIgEvPKcRT_RSt12_Ios_IostateRKP*;
_ZStlsIg[cw]St11char_traitsI[cw]EERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E;
_ZStrsIg[cw]St11char_traitsI[cw]EERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E;
- *__gnu_cxx_ldbl128*;
+ *__gnu_cxx_ldbl128[1-6]*;
+ *St9has_facetINSt17__gnu_cxx_ldbl1287*;
+ *St9use_facetINSt17__gnu_cxx_ldbl1287*;
+ *__gnu_cxx_ldbl1287num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE[CD][0-2]E?;
+ *__gnu_cxx_ldbl1287num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE2idE;
+ *__gnu_cxx_ldbl1287num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEEE;
+ *__gnu_cxx_ldbl1287num_getI[cw]*getE*;
+ *__gnu_cxx_ldbl1287num_getI[cw]*14_M_extract_intI*;
+ *__gnu_cxx_ldbl1287num_getI[cw]*16_M_extract_floatE*;
+ *__gnu_cxx_ldbl1287num_putI[cw]*;
+ *__gnu_cxx_ldbl128[8-9]*;
};
# Corresponding to exports in GLIBCXX_3.4.9, not GLIBCXX_3.4.7
@@ -25,6 +35,11 @@ GLIBCXX_LDBL_3.4.10 {
_ZNKSt4hashIgEclEg;
} GLIBCXX_LDBL_3.4.7;
+GLIBCXX_LDBL_3.4.21 {
+ __gnu_cxx_ldbl1287num_getI[cw]*14_M_extract_intB5cxx11*;
+ __gnu_cxx_ldbl1287num_getI[cw]*16_M_extract_floatB5cxx11*;
+} GLIBCXX_LDBL_3.4.10;
+
CXXABI_LDBL_1.3 {
_ZT[IS]g;
_ZT[IS]Pg;
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 3f8ecf15622..be9337fcec0 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -645,6 +645,9 @@ GLIBCXX_LDBL_COMPAT_FALSE
GLIBCXX_LDBL_COMPAT_TRUE
ENABLE_CXX11_ABI_FALSE
ENABLE_CXX11_ABI_TRUE
+glibcxx_cxx98_abi
+ENABLE_DUAL_ABI_FALSE
+ENABLE_DUAL_ABI_TRUE
ENABLE_VISIBILITY_FALSE
ENABLE_VISIBILITY_TRUE
libtool_VERSION
@@ -882,7 +885,8 @@ with_system_libunwind
enable_linux_futex
enable_symvers
enable_libstdcxx_visibility
-enable_libstdcxx_cxx11_abi
+enable_libstdcxx_dual_abi
+with_default_libstdcxx_abi
enable_libstdcxx_threads
with_gxx_include_dir
enable_version_specific_runtime_libs
@@ -1578,8 +1582,8 @@ Optional Features:
[default=yes]
--enable-libstdcxx-visibility
enables visibility safe usage [default=yes]
- --disable-libstdcxx-cxx11-abi
- disable the C++11-conforming ABI
+ --enable-libstdcxx-dual-abi
+ support two versions of std::string [default=yes]
--enable-libstdcxx-threads
enable C++11 threads support [default=auto]
--enable-version-specific-runtime-libs
@@ -1602,6 +1606,8 @@ Optional Packages:
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-system-libunwind use installed libunwind
+ --with-default-libstdcxx-abi
+ set the std::string ABI to use by default
--with-gxx-include-dir=DIR
installation directory for include files
@@ -11531,7 +11537,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11534 "configure"
+#line 11540 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11637,7 +11643,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11640 "configure"
+#line 11646 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15057,7 +15063,7 @@ fi
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 15060 "configure"
+#line 15066 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15409,7 +15415,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15412 "configure"
+#line 15418 "configure"
int main()
{
typedef bool atomic_type;
@@ -15444,7 +15450,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15447 "configure"
+#line 15453 "configure"
int main()
{
typedef short atomic_type;
@@ -15479,7 +15485,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15482 "configure"
+#line 15488 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15515,7 +15521,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15518 "configure"
+#line 15524 "configure"
int main()
{
typedef long long atomic_type;
@@ -15594,7 +15600,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15597 "configure"
+#line 15603 "configure"
int main()
{
_Decimal32 d1;
@@ -15636,7 +15642,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15639 "configure"
+#line 15645 "configure"
template
struct same
{ typedef T2 type; };
@@ -15670,7 +15676,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15673 "configure"
+#line 15679 "configure"
template
struct same
{ typedef T2 type; };
@@ -78166,20 +78172,56 @@ $as_echo "$as_me: visibility supported: $enable_libstdcxx_visibility" >&6;}
- # Check whether --enable-libstdcxx-cxx11-abi was given.
-if test "${enable_libstdcxx_cxx11_abi+set}" = set; then :
- enableval=$enable_libstdcxx_cxx11_abi;
+ # Check whether --enable-libstdcxx-dual-abi was given.
+if test "${enable_libstdcxx_dual_abi+set}" = set; then :
+ enableval=$enable_libstdcxx_dual_abi;
+ case "$enableval" in
+ yes|no) ;;
+ *) as_fn_error "Argument to enable/disable libstdcxx-dual-abi must be yes or no" "$LINENO" 5 ;;
+ esac
+
else
- enable_libstdcxx_cxx11_abi=yes
+ enable_libstdcxx_dual_abi=yes
fi
- if test x"$enable_libstdcxx_cxx11_abi" != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: C++11-conforming ABI is disabled" >&5
-$as_echo "$as_me: C++11-conforming ABI is disabled" >&6;}
+
+ if test x"$enable_libstdcxx_dual_abi" != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: dual ABI is disabled" >&5
+$as_echo "$as_me: dual ABI is disabled" >&6;}
+ default_libstdcxx_abi="c++98"
fi
+ if test x$enable_libstdcxx_dual_abi = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default std::string ABI to use" >&5
+$as_echo_n "checking for default std::string ABI to use... " >&6; }
+
+# Check whether --with-default-libstdcxx-abi was given.
+if test "${with_default_libstdcxx_abi+set}" = set; then :
+ withval=$with_default_libstdcxx_abi; case "$withval" in
+ c++98|gnu++98|c++03|gnu++03) default_libstdcxx_abi="c++98" ;;
+ c++1?|gnu++1?) default_libstdcxx_abi="c++11" ;;
+ *) as_fn_error "Invalid argument for --with-default-libstdcxx-abi" "$LINENO" 5 ;;
+ esac
+else
+ default_libstdcxx_abi="c++11"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${default_libstdcxx_abi}" >&5
+$as_echo "${default_libstdcxx_abi}" >&6; }
+ fi
+ if test $default_libstdcxx_abi = "c++11"; then
+ glibcxx_cxx11_abi=1
+ glibcxx_cxx98_abi=0
+ else
+ glibcxx_cxx11_abi=0
+ glibcxx_cxx98_abi=1
+ fi
+
+
+
+
ac_ldbl_compat=no
case "$target" in
powerpc*-*-linux* | \
@@ -79332,7 +79374,16 @@ else
fi
- if test $enable_libstdcxx_cxx11_abi = yes; then
+ if test $enable_libstdcxx_dual_abi = yes; then
+ ENABLE_DUAL_ABI_TRUE=
+ ENABLE_DUAL_ABI_FALSE='#'
+else
+ ENABLE_DUAL_ABI_TRUE='#'
+ ENABLE_DUAL_ABI_FALSE=
+fi
+
+
+ if test $glibcxx_cxx11_abi = 1; then
ENABLE_CXX11_ABI_TRUE=
ENABLE_CXX11_ABI_FALSE='#'
else
@@ -79758,6 +79809,10 @@ if test -z "${ENABLE_VISIBILITY_TRUE}" && test -z "${ENABLE_VISIBILITY_FALSE}";
as_fn_error "conditional \"ENABLE_VISIBILITY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_DUAL_ABI_TRUE}" && test -z "${ENABLE_DUAL_ABI_FALSE}"; then
+ as_fn_error "conditional \"ENABLE_DUAL_ABI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${ENABLE_CXX11_ABI_TRUE}" && test -z "${ENABLE_CXX11_ABI_FALSE}"; then
as_fn_error "conditional \"ENABLE_CXX11_ABI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 135d536e1b2..7a7c1d820fa 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -368,7 +368,8 @@ AC_SUBST(libtool_VERSION)
GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY([yes])
-GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI([yes])
+GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI([yes])
+GLIBCXX_DEFAULT_ABI
ac_ldbl_compat=no
case "$target" in
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
index 85f6e3f3031..d1f05007898 100644
--- a/libstdc++-v3/doc/Makefile.in
+++ b/libstdc++-v3/doc/Makefile.in
@@ -218,6 +218,7 @@ glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@
glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@
+glibcxx_cxx98_abi = @glibcxx_cxx98_abi@
glibcxx_localedir = @glibcxx_localedir@
glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@
glibcxx_prefixdir = @glibcxx_prefixdir@
diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html
index e1ca43c9822..6453f08d2e7 100644
--- a/libstdc++-v3/doc/html/manual/configure.html
+++ b/libstdc++-v3/doc/html/manual/configure.html
@@ -227,6 +227,15 @@
facilities, which might be undesirable in a low-memory environment or
when standard error is not available. This option disables those
messages. This option does not change the library ABI.
+
--disable-libstdcxx-dual-abi
+ Disable support for the new, C++11-conforming std::string
+ implementation. This option changes the library ABI.
+
--with-default-libstdcxx-abi
+ By default, the new std::string
implementation will be
+ declared and a macro must be defined to declare the old implementation
+ instead. That default can be reversed by configuring the library with
+ --with-default-libstdcxx-abi=c++98
.
+ This option does not change the library ABI.
--enable-vtable-verify
[default]Use -fvtable-verify=std
to compile the C++
runtime with instrumentation for vtable verification. All virtual
functions in the standard library will be verified at runtime.
diff --git a/libstdc++-v3/doc/html/manual/using_exceptions.html b/libstdc++-v3/doc/html/manual/using_exceptions.html
index f1dd0996758..00e9d38f315 100644
--- a/libstdc++-v3/doc/html/manual/using_exceptions.html
+++ b/libstdc++-v3/doc/html/manual/using_exceptions.html
@@ -310,4 +310,4 @@ is called.
GCC Bug 25191: exception_defines.h #defines try/catch
- .