summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-11 12:39:28 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-11 12:39:28 +0000
commit459dc828d9d731800ad41b9506dff76070e69aaa (patch)
tree96b62b116976c35c7af895f57906092e5037e1dc /libstdc++-v3
parent6fcaaf9b931078f979a0282d396e78647ea37999 (diff)
downloadgcc-459dc828d9d731800ad41b9506dff76070e69aaa.tar.gz
libstdc++/71049 fix --disable-libstdcxx-dual-abi bootstrap
PR libstdc++/71049 * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_DUAL_ABI]: Don't define exception constructors with __sso_string parameters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/src/c++11/cow-stdexcept.cc37
2 files changed, 26 insertions, 17 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index fdcb9cae2be..a9bea1e8f5d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-11 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/71049
+ * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_DUAL_ABI]: Don't define
+ exception constructors with __sso_string parameters.
+
2016-05-10 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/bits/fs_dir.h (begin, end): Add noexcept.
diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc
index a0f505c2187..31a89dfd554 100644
--- a/libstdc++-v3/src/c++11/cow-stdexcept.cc
+++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc
@@ -292,6 +292,7 @@ _txnal_cow_string_c_str(const void* that)
return (const char*) txnal_read_ptr((void**)&bs->_M_dataplus._M_p);
}
+#if _GLIBCXX_USE_DUAL_ABI
const char*
_txnal_sso_string_c_str(const void* that)
{
@@ -299,6 +300,7 @@ _txnal_sso_string_c_str(const void* that)
(void* const*)const_cast<char* const*>(
&((const std::__sso_string*) that)->_M_s._M_p));
}
+#endif
void
_txnal_cow_string_D1_commit(void* data)
@@ -344,9 +346,24 @@ _txnal_runtime_error_get_msg(void* e)
// result in undefined behavior, which is in this case not initializing this
// string.
#if _GLIBCXX_USE_DUAL_ABI
-#define CTORDTORSTRINGCSTR(s) _txnal_sso_string_c_str((s))
+#define CTORS_FROM_SSOSTRING(NAME, CLASS, BASE) \
+void \
+_ZGTtNSt##NAME##C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \
+ CLASS* that, const std::__sso_string& s) \
+{ \
+ CLASS e(""); \
+ _ITM_memcpyRnWt(that, &e, sizeof(CLASS)); \
+ /* Get the C string from the SSO string. */ \
+ _txnal_cow_string_C1_for_exceptions(_txnal_##BASE##_get_msg(that), \
+ _txnal_sso_string_c_str(&s), that); \
+} \
+void \
+_ZGTtNSt##NAME##C2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \
+ CLASS*, const std::__sso_string&) __attribute__((alias \
+("_ZGTtNSt" #NAME \
+ "C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE")));
#else
-#define CTORDTORSTRINGCSTR(s) ""
+#define CTORS_FROM_SSOSTRING(NAME, CLASS, BASE)
#endif
// This macro defines transaction constructors and destructors for a specific
@@ -373,21 +390,7 @@ _ZGTtNSt##NAME##C1EPKc (CLASS* that, const char* s) \
void \
_ZGTtNSt##NAME##C2EPKc (CLASS*, const char*) \
__attribute__((alias ("_ZGTtNSt" #NAME "C1EPKc"))); \
-void \
-_ZGTtNSt##NAME##C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \
- CLASS* that, const std::__sso_string& s) \
-{ \
- CLASS e(""); \
- _ITM_memcpyRnWt(that, &e, sizeof(CLASS)); \
- /* Get the C string from the SSO string. */ \
- _txnal_cow_string_C1_for_exceptions(_txnal_##BASE##_get_msg(that), \
- CTORDTORSTRINGCSTR(&s), that); \
-} \
-void \
-_ZGTtNSt##NAME##C2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \
- CLASS*, const std::__sso_string&) __attribute__((alias \
-("_ZGTtNSt" #NAME \
- "C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"))); \
+CTORS_FROM_SSOSTRING(NAME, CLASS, BASE) \
void \
_ZGTtNSt##NAME##D1Ev(CLASS* that) \
{ _txnal_cow_string_D1(_txnal_##BASE##_get_msg(that)); } \