diff mbox

[Darwin] adjust crts for Darwin >= 10.

Message ID 2B34D192-9D93-493E-817B-0318290EF02E@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 30, 2011, 12:27 p.m. UTC
The vendor's tools no longer use crts for dylibs or bundles for Darwin  
10.
They also use "crt1.10.6.o" for exes.

our crts amended to match (checked on i686-darwin9 and x86-64-darwin10).

OK for trunk?
Iain

gcc:
	config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when Darwin  
 >= 10.
	(DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
	(DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.

Comments

Mike Stump Dec. 1, 2011, 4:03 a.m. UTC | #1
On Nov 30, 2011, at 7:27 AM, Iain Sandoe <developer@sandoe-acoustics.co.uk 
 > wrote:

> The vendor's tools no longer use crts for dylibs or bundles for  
> Darwin 10.
> They also use "crt1.10.6.o" for exes.

> OK for trunk?

Ok.
diff mbox

Patch

Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h	(revision 181837)
+++ gcc/config/darwin.h	(working copy)
@@ -348,7 +348,9 @@  extern GTY(()) int darwin_ms_struct;
 #undef  STARTFILE_SPEC
 #define STARTFILE_SPEC							    \
   "%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}}		    \
-   %{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o %{fgnu-tm: -lcrttms.o}}}  \
+   %{!Zdynamiclib:%{Zbundle:%{!static:					    \
+	%:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o)	    \
+	%{fgnu-tm: -lcrttms.o}}}					    \
      %{!Zbundle:%{pg:%{static:-lgcrt0.o}				    \
                      %{!static:%{object:-lgcrt0.o}			    \
                                %{!object:%{preload:-lgcrt0.o}		    \
@@ -370,11 +372,12 @@  extern GTY(()) int darwin_ms_struct;
 
 #define DARWIN_DYLIB1_SPEC						\
   "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o)		\
-   %:version-compare(>= 10.5 mmacosx-version-min= -ldylib1.10.5.o)"
+   %:version-compare(>< 10.5 10.6 mmacosx-version-min= -ldylib1.10.5.o)"
 
 #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 10.6 mmacosx-version-min= -lcrt1.10.5.o)	\
+   %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o)	\
    %{fgnu-tm: -lcrttms.o}"
 
 /* Default Darwin ASM_SPEC, very simple.  */