On 01/04/2012 11:27 PM, Rainer Orth wrote:
>       [libgfortran, libitm] Link with -shared-libgcc
>       http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01382.html
> 
> This will need a fortran resp. libitm maintainer.

Does the following alleviate the need for -shared-libgcc for libitm?


r~
diff --git a/libitm/eh_cpp.cc b/libitm/eh_cpp.cc
index 6f302cd..a6a1851 100644
--- a/libitm/eh_cpp.cc
+++ b/libitm/eh_cpp.cc
@@ -45,6 +45,7 @@ void __cxa_throw (void *, void *, void *) { return; }
 void *__cxa_begin_catch (void *) { return NULL; }
 void *__cxa_end_catch (void) { return NULL; }
 void __cxa_tm_cleanup (void *, void *, unsigned int) { return; }
+void _Unwind_DeleteException (_Unwind_Exception *) { return; }
 #endif /* HAVE_ELF_STYLE_WEAKREF */
 
 }
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
index b53792a..959d802 100644
--- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h
@@ -39,6 +39,10 @@
 #include "local_type_traits"
 #include "local_atomic"
 
+/* Don't require libgcc_s.so for exceptions.  */
+extern void _Unwind_DeleteException (_Unwind_Exception*) __attribute__((weak));
+
+
 #include "common.h"
 
 namespace GTM HIDDEN {

Reply via email to