commit 6987f84f278d2cbf5b828a8c81c1be84b292b1af Author: Torvald Riegel Date: Tue Jan 19 18:36:14 2016 +0100 libstdc: Use weak alias instead of just alias in TM support. PR libstdc++/69310 * src/c++11/cow-stdexcept.cc: Use weak alias instead of just alias to make Darwin happy. diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc index a0f505c..a070747 100644 --- a/libstdc++-v3/src/c++11/cow-stdexcept.cc +++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc @@ -364,7 +364,9 @@ _ZGTtNSt##NAME##C1EPKc (CLASS* that, const char* s) \ construct the COW string in the latter manually. Note that the \ exception classes will not be declared transaction_safe if the \ shared empty _Rep is disabled with --enable-fully-dynamic-string \ - (in which case _GLIBCXX_FULLY_DYNAMIC_STRING is nonzero). */ \ + (in which case _GLIBCXX_FULLY_DYNAMIC_STRING is nonzero). \ + The alias declarations are also declared weak because Darwin \ + doesn't support non-weak aliases. */ \ CLASS e(""); \ _ITM_memcpyRnWt(that, &e, sizeof(CLASS)); \ _txnal_cow_string_C1_for_exceptions(_txnal_##BASE##_get_msg(that), \ @@ -372,7 +374,7 @@ _ZGTtNSt##NAME##C1EPKc (CLASS* that, const char* s) \ } \ void \ _ZGTtNSt##NAME##C2EPKc (CLASS*, const char*) \ - __attribute__((alias ("_ZGTtNSt" #NAME "C1EPKc"))); \ + __attribute__((weak, alias ("_ZGTtNSt" #NAME "C1EPKc"))); \ void \ _ZGTtNSt##NAME##C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \ CLASS* that, const std::__sso_string& s) \ @@ -393,7 +395,7 @@ _ZGTtNSt##NAME##D1Ev(CLASS* that) \ { _txnal_cow_string_D1(_txnal_##BASE##_get_msg(that)); } \ void \ _ZGTtNSt##NAME##D2Ev(CLASS*) \ -__attribute__((alias ("_ZGTtNSt" #NAME "D1Ev"))); \ +__attribute__((weak, alias ("_ZGTtNSt" #NAME "D1Ev"))); \ void \ _ZGTtNSt##NAME##D0Ev(CLASS* that) \ { \