Message ID | 20130206212738.GA6682@bromo.med.uc.edu |
---|---|
State | New |
Headers | show |
Jack, On Wed, Feb 6, 2013 at 10:27 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: > I think you are making this much more complex than it really is. > The ENDFILE_SPEC on ppc is obtained from gcc/config/darwin.h and is > only... > > #define TM_DESTRUCTOR "%{fgnu-tm: -lcrttme.o}" > > whereas for intel darwin, it is defined in gcc/config/i386/darwin.h as > > #undef ENDFILE_SPEC > #define ENDFILE_SPEC \ > "%{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}" > > Iain only added TM_DESTRUCTOR to remove the explicit instance of > %{fgnu-tm: -lcrttme.o} in the definition of ENDFILE_SPEC in > gcc/config/i386/darwin.h (which meant he needed a new definition, TM_DESTRUCTOR). > That change is non-essential to the fix and completely tangential to the > problem. The actual fix is only the change... Ok thanks. I am fine with this then. It was just I did not understand the purpose of this from your first email on gcc-patches. -- Patrick
Index: libgcc/config/darwin-crt-tm.c =================================================================== --- libgcc/config/darwin-crt-tm.c (revision 195764) +++ libgcc/config/darwin-crt-tm.c (working copy) @@ -103,9 +103,12 @@ void __doTMdeRegistrations (void) _ITM_deregisterTMCloneTable (tmct); } +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060 + /* 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. */ + Don't define for 10.6 or later with faster weak-symbol coalescing. */ extern void *__cxa_allocate_exception (size_t) WEAK; extern void __cxa_throw (void *, void *, void *) WEAK; @@ -144,5 +147,5 @@ void _ZdlPvRKSt9nothrow_t (void * a UNUS 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 #endif