diff mbox

[Darwin] rationalize libgcc usage across darwin versions.

Message ID 025A675C-900B-45C0-A699-599911AC0937@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Aug. 13, 2010, 4:10 p.m. UTC
Hi,

this removes the _s stub library for darwin10 and the gratuitous link  
with libgcc.a for darwin > = 9.
The latter is needed on darwin8 for _eprintf (i686,PPC) and save/ 
restore (PPC).

bootstrapped on i686-darwin{8,9} x86_64-darwin10 and ppc-darwin9 (ppc- 
darwin8 is past stage1)

OK for trunk & 4.5?
Iain

+       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s. 
10.5)   \
         %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext. 
10.4)	   \
         %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext. 
10.5)	   \
-       -lgcc}"
+       %:version-compare(< 10.5 mmacosx-version-min= -lgcc) }"

  /* We specify crt0.o as -lcrt0.o so that ld will search the library  
path.

Comments

Mike Stump Aug. 13, 2010, 5:43 p.m. UTC | #1
On Aug 13, 2010, at 9:10 AM, IainS wrote:
> this removes the _s stub library for darwin10 and the gratuitous link with libgcc.a for darwin > = 9.
> The latter is needed on darwin8 for _eprintf (i686,PPC) and save/restore (PPC).
> 
> bootstrapped on i686-darwin{8,9} x86_64-darwin10 and ppc-darwin9 (ppc-darwin8 is past stage1)
> 
> OK for trunk & 4.5?

Ok.
Iain Sandoe Aug. 15, 2010, 7:16 p.m. UTC | #2
On 13 Aug 2010, at 18:43, Mike Stump wrote:

> On Aug 13, 2010, at 9:10 AM, IainS wrote:
>> this removes the _s stub library for darwin10 and the gratuitous  
>> link with libgcc.a for darwin > = 9.
>> The latter is needed on darwin8 for _eprintf (i686,PPC) and save/ 
>> restore (PPC).
>>
>> bootstrapped on i686-darwin{8,9} x86_64-darwin10 and ppc-darwin9  
>> (ppc-darwin8 is past stage1)
>>
>> OK for trunk & 4.5?
>
> Ok.
trunk r163267
Iain
diff mbox

Patch

Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h	(revision 163221)
+++ gcc/config/darwin.h	(working copy)
@@ -406,15 +414,15 @@  extern GTY(()) int darwin_ms_struct;
     "%{static-libgcc|static: -lgcc_eh -lgcc;				   \
        shared-libgcc|fexceptions|fgnu-runtime:				   \
         %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s. 
10.4)	   \
-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s. 
10.5)	   \
+       %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s. 
10.5)   \
         %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext. 
10.4)	   \
         %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext. 
10.5)	   \
-       -lgcc;								   \
+       %:version-compare(< 10.5 mmacosx-version-min= -lgcc) ;		   \
        :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s. 
10.4) \
-       %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s. 
10.5)	   \