]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libitm/
authorpmarlier <pmarlier@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2012 23:39:28 +0000 (23:39 +0000)
committerpmarlier <pmarlier@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Feb 2012 23:39:28 +0000 (23:39 +0000)
2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
    Patrick Marlier  <patrick.marlier@gmail.com>

PR libitm/52220
* alloc_cpp.cc: No dummy definitions for darwin.
* eh_cpp.cc: Likewise.

libgcc/
2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
    Patrick Marlier  <patrick.marlier@gmail.com>

PR libitm/52220
* config/darwin-crt-tm.c: Generate dummy functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184293 138bc75d-0d04-0410-961f-82ee72b054a4

libgcc/ChangeLog
libgcc/config/darwin-crt-tm.c
libitm/ChangeLog
libitm/alloc_cpp.cc
libitm/eh_cpp.cc

index ff5101a713678fe3b1a91282434b0a0741602491..fef5b6d53cb6d2c94ed0b25e17b6bd3ae0f70bb0 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
+           Patrick Marlier  <patrick.marlier@gmail.com>
+
+       PR libitm/52220
+       * config/darwin-crt-tm.c: Generate dummy functions.
+
 2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
            Patrick Marlier  <patrick.marlier@gmail.com>
 
index 78053f659a8247205a118b3208f01b95b9ea80f5..319b4f89389f66f80bc9b726e682c219010327c9 100644 (file)
@@ -39,6 +39,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #endif
 
 #define WEAK __attribute__((weak))
+#define UNUSED __attribute__((unused))
 
 extern void _ITM_registerTMCloneTable (void *, size_t) WEAK;
 extern void _ITM_deregisterTMCloneTable (void *) WEAK;
@@ -103,3 +104,46 @@ void __doTMdeRegistrations (void)
 }
 
 #endif
+
+/* Provide dummy functions to satisfy linkage for versions of the Darwin 
+   tool-chain that that can't handle undefined weak refs at the link stage.
+   ??? Define these dummy functions only when !HAVE_ELF_STYLE_WEAKREF. */
+
+extern void *__cxa_allocate_exception (size_t) WEAK;
+extern void __cxa_throw (void *, void *, void *) WEAK;
+extern void *__cxa_begin_catch (void *) WEAK;
+extern void *__cxa_end_catch (void) WEAK;
+extern void __cxa_tm_cleanup (void *, void *, unsigned int) WEAK;
+
+extern void *_ZnwX (size_t) WEAK;
+extern void _ZdlPv (void *) WEAK;
+extern void *_ZnaX (size_t) WEAK;
+extern void _ZdaPv (void *) WEAK;
+
+typedef const struct nothrow_t { } *c_nothrow_p;
+
+extern void *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
+extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
+extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
+extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
+
+void *__cxa_allocate_exception (size_t s UNUSED) { return NULL; }
+void __cxa_throw (void * a UNUSED, void * b UNUSED, void * c UNUSED)
+  { return; }
+void *__cxa_begin_catch (void * a UNUSED) { return NULL; }
+void *__cxa_end_catch (void) { return NULL; }
+void __cxa_tm_cleanup (void * a UNUSED, void * b UNUSED, unsigned int c UNUSED)
+  { return; }
+
+void *_ZnwX (size_t s UNUSED) { return NULL; }
+void _ZdlPv (void * a UNUSED) { return; }
+void *_ZnaX (size_t s UNUSED) { return NULL; }
+void _ZdaPv (void * a UNUSED) { return; }
+
+void *_ZnwXRKSt9nothrow_t (size_t s UNUSED, c_nothrow_p b UNUSED)
+  { return NULL; }
+void _ZdlPvRKSt9nothrow_t (void * a UNUSED, c_nothrow_p b UNUSED)  { return; }
+void *_ZnaXRKSt9nothrow_t (size_t s UNUSED, c_nothrow_p b UNUSED)
+  { return NULL; }
+void _ZdaPvRKSt9nothrow_t (void * a UNUSED, c_nothrow_p b UNUSED) { return; }
+
index 3b54c8b7335b6f3e4e4e45a433b5dfd8e4066cdf..e103ca0288bf978383b71ee878cab523fbd45b42 100644 (file)
@@ -1,3 +1,10 @@
+2012-02-15  Iain Sandoe  <iains@gcc.gnu.org>
+           Patrick Marlier  <patrick.marlier@gmail.com>
+
+       PR libitm/52220
+       * alloc_cpp.cc: No dummy definitions for darwin.
+       * eh_cpp.cc: Likewise.
+
 2012-02-14  Richard Henderson  <rth@redhat.com>
 
        * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
index 0789b2e5342988486ab41d1148de22213f575028..00a4d3211d928ae9c295bb0d615719f146a8a5db 100644 (file)
@@ -60,7 +60,7 @@ extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
 extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak));
 extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
 
-#if !defined (HAVE_ELF_STYLE_WEAKREF)
+#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined (__MACH__)
 void *_ZnwX (size_t) { return NULL; }
 void _ZdlPv (void *) { return; }
 void *_ZnaX (size_t) { return NULL; }
index 352a313bee686918ded93fa1a0485d32ce8ef73e..5c4ca2843597c0137d4ae4fc103d5ad7fd4b4367 100644 (file)
@@ -39,7 +39,7 @@ extern void *__cxa_begin_catch (void *) WEAK;
 extern void *__cxa_end_catch (void) WEAK;
 extern void __cxa_tm_cleanup (void *, void *, unsigned int) WEAK;
 
-#if !defined (HAVE_ELF_STYLE_WEAKREF)
+#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined (__MACH__)
 void *__cxa_allocate_exception (size_t) { return NULL; }
 void __cxa_throw (void *, void *, void *) { return; }
 void *__cxa_begin_catch (void *) { return NULL; }