re PR libitm/55693 (libitm.c++/eh-1.C execution test fails on darwin from r193271)
authorIain Sandoe <iain@codesourcery.com>
Mon, 11 Feb 2013 23:30:10 +0000 (23:30 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Mon, 11 Feb 2013 23:30:10 +0000 (23:30 +0000)
/libgcc
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
    Jack Howarth  <howarth@bromo.med.uc.edu>
    Patrick Marlier  <patrick.marlier@gmail.com>

PR libitm/55693
* config/darwin-crt-tm.c: Remove dummy functions hack.

/gcc
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
    Jack Howarth  <howarth@bromo.med.uc.edu>
    Patrick Marlier  <patrick.marlier@gmail.com>

PR libitm/55693
* config/darwin.h: Replace ENDFILE_SPEC with TM_DESTRUCTOR and
define ENDFILE_SPEC as TM_DESTRUCTOR.
* config/i386/darwin.h (ENDFILE_SPEC): Use TM_DESTRUCTOR.

/libitm
2013-02-11  Iain Sandoe  <iain@codesourcery.com>
    Jack Howarth  <howarth@bromo.med.uc.edu>
    Patrick Marlier  <patrick.marlier@gmail.com>

PR libitm/55693
* alloc_cpp.cc: Enable function declarations on darwin.
* eh_cpp.cc: Likewise.

Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>
Co-Authored-By: Patrick Marlier <patrick.marlier@gmail.com>
From-SVN: r195960

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

index 1337da89195a402bdd6ae50e585e7dd809591204..b99a9e51ecb393f9c854cdea17293b101a7e5313 100644 (file)
@@ -1,3 +1,12 @@
+2013-02-11  Iain Sandoe  <iain@codesourcery.com>
+           Jack Howarth  <howarth@bromo.med.uc.edu>
+           Patrick Marlier  <patrick.marlier@gmail.com>
+
+       PR libitm/55693
+       * config/darwin.h: Replace ENDFILE_SPEC with TM_DESTRUCTOR and
+       define ENDFILE_SPEC as TM_DESTRUCTOR.
+       * config/i386/darwin.h (ENDFILE_SPEC): Use TM_DESTRUCTOR.
+
 2013-02-11  Alexander Potapenko <glider@google.com>
            Jack Howarth  <howarth@bromo.med.uc.edu>
            Jakub Jelinek  <jakub@redhat.com>
index 696451876058defccaba3e9190328d63fe880ffe..82a42c8598b1c08336caa356bb47da249471c84a 100644 (file)
@@ -363,7 +363,8 @@ extern GTY(()) int darwin_ms_struct;
   %{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}"
 
 /* We want a destructor last in the list.  */
-#define ENDFILE_SPEC "%{fgnu-tm: -lcrttme.o}"
+#define TM_DESTRUCTOR "%{fgnu-tm: -lcrttme.o}"
+#define ENDFILE_SPEC TM_DESTRUCTOR
 
 #define DARWIN_EXTRA_SPECS                                             \
   { "darwin_crt1", DARWIN_CRT1_SPEC },                                 \
index c2e9f204c6726952355745181d73669290928859..594ec99948409372fe82062d487d0fae7df8d25a 100644 (file)
@@ -131,8 +131,7 @@ extern int darwin_emit_branch_islands;
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
    %{mpc32:crtprec32.o%s} \
    %{mpc64:crtprec64.o%s} \
-   %{mpc80:crtprec80.o%s} \
-   %{fgnu-tm: -lcrttme.o}"
+   %{mpc80:crtprec80.o%s}" TM_DESTRUCTOR
 
 #undef SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS                                   \
index 13fc01dd31d0568d2006670a2ccf67b7b3ef75fe..0eadc320252a806cfc603148a3ea50ee322b989c 100644 (file)
@@ -1,3 +1,10 @@
+2013-02-11  Iain Sandoe  <iain@codesourcery.com>
+           Jack Howarth  <howarth@bromo.med.uc.edu>
+           Patrick Marlier  <patrick.marlier@gmail.com>
+
+       PR libitm/55693
+       * config/darwin-crt-tm.c: Remove dummy functions hack.
+
 2013-02-08  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/54222
index 41734a84e27dd799e804e28f04d2d4e812f16faa..4f4d44449b46cf17ae179f2a1189c8118a245909 100644 (file)
@@ -39,7 +39,6 @@ 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,46 +102,4 @@ void __doTMdeRegistrations (void)
     _ITM_deregisterTMCloneTable (tmct);
 }
 
-/* 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; }
-
 #endif
index 56423c353fcfb95cec7869663f9a812eff069824..a0e3c521a94c8470db6cc2db65722159c923a95f 100644 (file)
@@ -1,3 +1,11 @@
+2013-02-11  Iain Sandoe  <iain@codesourcery.com>
+           Jack Howarth  <howarth@bromo.med.uc.edu>
+           Patrick Marlier  <patrick.marlier@gmail.com>
+
+       PR libitm/55693
+       * alloc_cpp.cc: Enable function declarations on darwin.
+       * eh_cpp.cc: Likewise.
+
 2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
 
        Update copyright years.
index 654b94209f6e12cfc81d6fbedb2de4d48c7134af..a65d01df66e1283e9d6e5a0f34de8b3b14e41ede 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) && !defined (__MACH__)
+#if !defined (HAVE_ELF_STYLE_WEAKREF) 
 void *_ZnwX (size_t) { return NULL; }
 void _ZdlPv (void *) { return; }
 void *_ZnaX (size_t) { return NULL; }
index 00eac5f7864f5fc48fe2b8f36199201aa9597643..929053d331af8bad879913b97f6e9fa6d0a5408e 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) && !defined (__MACH__)
+#if !defined (HAVE_ELF_STYLE_WEAKREF) 
 void *__cxa_allocate_exception (size_t) { return NULL; }
 void __cxa_throw (void *, void *, void *) { return; }
 void *__cxa_begin_catch (void *) { return NULL; }