Hi Jack, Thanks for having a look at this.
However I don't understand why you need this: Index: gcc/config/i386/darwin.h =================================================================== --- gcc/config/i386/darwin.h (revision 195764) +++ gcc/config/i386/darwin.h (working copy) @@ -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: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 195764) +++ gcc/config/darwin.h (working copy) @@ -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 }, \ It seems you just add a macro TM_DESTRUCTOR which is the same as ENDFILE_SPEC. Maybe I missed something (I am updating my svn)... Also why HAVE_ELF_STYLE_WEAKREF is not defined for MacOS version where weak ref works? It could be better to define function to dummy only if HAVE_ELF_STYLE_WEAKREF is not set (and not testing the MacOS version). If we want to remove support for Xcode 4.2 (buggy linker), I think you should also have a look at the old commit to undo it (I remember a change in libitm which add a #ifdef MACH). Thanks. -- Patrick