On Sat, 2016-01-16 at 10:57 +0100, Dominique d'Humières wrote:
> > Addressed these, fixed a problem with using GLIBCXX_WEAK_DEFINITION
> > (which is only set on Darwin despite the generic-sounding name -- so
> > just use __attribute__((weak)) directly), and also updated
> > testsuite_abi.cc so that it knows about CXXABI_1.3.10.
> >
> > Approved by Jonathan Wakely.  Committed as r232454.
> This breaks bootstrap on darwin, see 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310.

Please give this patch a try.  I've only tested it on x86_64-linux.
Jon, okay from your side if Darwin testing succeeds?
commit 6987f84f278d2cbf5b828a8c81c1be84b292b1af
Author: Torvald Riegel <trie...@redhat.com>
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)					\
 {									\

Reply via email to