Patchwork [Darwin] rationalize libgcc usage across darwin versions.

login
register
mail settings
Submitter IainS
Date Aug. 13, 2010, 4:10 p.m.
Message ID <025A675C-900B-45C0-A699-599911AC0937@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/61701/
State New
Headers show

Comments

IainS - Aug. 13, 2010, 4:10 p.m.
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.
Mike Stump - Aug. 13, 2010, 5:43 p.m.
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.
IainS - Aug. 15, 2010, 7:16 p.m.
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

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)	   \