This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR libitm/55693
- From: Patrick Marlier <patrick dot marlier at gmail dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, iain at codesourcery dot com, mikestump at comcast dot net
- Date: Wed, 6 Feb 2013 17:37:12 +0100
- Subject: Re: [PATCH] Fix PR libitm/55693
- References: <20130206141201.GA4484@bromo.med.uc.edu>
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