diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-22 13:51:07 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-22 13:51:07 +0000 |
commit | e2362f5de06d4ba52f86421b0869b0ab04f89315 (patch) | |
tree | cb37d55577828a0e4d3083598574060fadac99a9 /gcc | |
parent | 018076e705f8783a471dc36cef10b60d30d95ebf (diff) | |
download | gcc-e2362f5de06d4ba52f86421b0869b0ab04f89315.zip gcc-e2362f5de06d4ba52f86421b0869b0ab04f89315.tar.gz gcc-e2362f5de06d4ba52f86421b0869b0ab04f89315.tar.bz2 |
darwin.h (ENDFILE_SPEC): New.
gcc:
* config/darwin.h (ENDFILE_SPEC): New.
(DARWIN_CRT1_SPEC): Add crttms.o.
(STARTFILE_SPEC): Likewise for dynamic libs and bundles.
* config/i386.h (ENDFILE_SPEC): Amend to include crttme.o.
libgcc:
* config/darwin-crt-tm.c: New file.
* config.host (darwin): Build crttms.o crttme.o to provide
startup and shutdown for tm clones.
* config/t-darwin (crttms.o): New build rule.
(crttme.o): Likewise.
From-SVN: r181616
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/darwin.h | 13 | ||||
-rw-r--r-- | gcc/config/i386/darwin.h | 3 |
3 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5a855a..28d5deb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-22 Iain Sandoe <iains@gcc.gnu.org> + + * config/darwin.h (ENDFILE_SPEC): New. + (DARWIN_CRT1_SPEC): Add crttms.o. + (STARTFILE_SPEC): Likewise for dynamic libs and bundles. + * config/i386.h (ENDFILE_SPEC): Amend to include crttme.o. + 2011-11-22 Michael Matz <matz@suse.de> PR c++/51264 diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index efff4c9..29a24ddc 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -359,8 +359,8 @@ extern GTY(()) int darwin_ms_struct; #undef STARTFILE_SPEC #define STARTFILE_SPEC \ - "%{Zdynamiclib: %(darwin_dylib1) } \ - %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \ + "%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \ + %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o %{fgnu-tm: -lcrttms.o}}} \ %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ %{!static:%{object:-lgcrt0.o} \ %{!object:%{preload:-lgcrt0.o} \ @@ -372,10 +372,8 @@ extern GTY(()) int darwin_ms_struct; %(darwin_crt2)}}}}}} \ %{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}" -/* The native Darwin linker doesn't necessarily place files in the order - that they're specified on the link line. Thus, it is pointless - to put anything in ENDFILE_SPEC. */ -/* #define ENDFILE_SPEC "" */ +/* We want a destructor last in the list. */ +#define ENDFILE_SPEC "%{fgnu-tm: -lcrttme.o}" #define DARWIN_EXTRA_SPECS \ { "darwin_crt1", DARWIN_CRT1_SPEC }, \ @@ -388,7 +386,8 @@ extern GTY(()) int darwin_ms_struct; #define DARWIN_CRT1_SPEC \ "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ - %:version-compare(>= 10.5 mmacosx-version-min= -lcrt1.10.5.o)" + %:version-compare(>= 10.5 mmacosx-version-min= -lcrt1.10.5.o) \ + %{fgnu-tm: -lcrttms.o}" /* Default Darwin ASM_SPEC, very simple. */ #define ASM_SPEC "-arch %(darwin_arch) \ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 705fe98..83da293 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -132,7 +132,8 @@ 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}" + %{mpc80:crtprec80.o%s} \ + %{fgnu-tm: -lcrttme.o}" #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ |