Patchwork [darwin,ppc] lgcc to provide save/restFP for pre-exisitng libraries.

login
register
mail settings
Submitter IainS
Date Aug. 20, 2010, 8:14 p.m.
Message ID <1355E78A-603E-4711-A873-334D8ED57ED7@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/62315/
State New
Headers show

Comments

IainS - Aug. 20, 2010, 8:14 p.m.
On 20 Aug 2010, at 16:48, Mike Stump wrote:

> On Aug 20, 2010, at 5:46 AM, IainS wrote:
>> OK for trunk & 4.5 ? (since this is not a reversion - but an  
>> additional patch).
>
> Ok.

It turns out that this is not enough - the cascading of rs6000/darwin{, 
7,8}.h needs to be tidied up :-(

Until I have a change to do that and bootstrap on darwin 8  - I've  
reverted this change and partially reverted r163267.

sorry for the breakage,
Iain

applied as 163419:

gcc/

	revert r163410, partially revert r163267.
	* config/rs6000/darwin.h (LIB_SPEC): Remove.
	* config/darwin.h (REAL_LIBGCC_SPEC): Link lgcc for all
	Darwin versions.

    "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}"
Jack Howarth - Aug. 20, 2010, 11:18 p.m.
On Fri, Aug 20, 2010 at 09:14:35PM +0100, IainS wrote:
>
> On 20 Aug 2010, at 16:48, Mike Stump wrote:
>
>> On Aug 20, 2010, at 5:46 AM, IainS wrote:
>>> OK for trunk & 4.5 ? (since this is not a reversion - but an  
>>> additional patch).
>>
>> Ok.
>
> It turns out that this is not enough - the cascading of rs6000/darwin{, 
> 7,8}.h needs to be tidied up :-(

Iain,
    We really should remove darwin7.h and adjust configure to abort on 
darwin7 or earlier as unsupported targets.
           Jack

>
> Until I have a change to do that and bootstrap on darwin 8  - I've  
> reverted this change and partially reverted r163267.
>
> sorry for the breakage,
> Iain
>
> applied as 163419:
>
> gcc/
>
> 	revert r163410, partially revert r163267.
> 	* config/rs6000/darwin.h (LIB_SPEC): Remove.
> 	* config/darwin.h (REAL_LIBGCC_SPEC): Link lgcc for all
> 	Darwin versions.
>
> Index: gcc/config/darwin.h
> ===================================================================
> --- gcc/config/darwin.h (revision 163418)
> +++ gcc/config/darwin.h (working copy)
> @@ -412,12 +412,12 @@ extern GTY(()) int darwin_ms_struct;
>         %: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)    
>  \
> -       %:version-compare(< 10.5 mmacosx-version-min= -lgcc) ;            
>  \
> +       -lgcc ;                                                           
>  \
>        :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s. 
> 10.4) \
>         %: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)    
>  \
>
> -       %:version-compare(< 10.5 mmacosx-version-min= -lgcc) }"
> +       -lgcc }"
>
>  /* We specify crt0.o as -lcrt0.o so that ld will search the library  
> path.
>
> Index: gcc/config/rs6000/darwin.h
> ===================================================================
> --- gcc/config/rs6000/darwin.h  (revision 163418)
> +++ gcc/config/rs6000/darwin.h  (working copy)
> @@ -120,11 +120,6 @@ extern int darwin_emit_branch_islands;
>     mcpu=G5:ppc970;                             \
>     :ppc}}"
>
> -/* Linked libs might refer to save/restFP - we still need to append - 
> lgcc to
> -   provide these.  */
> -#undef LIB_SPEC
> -#define LIB_SPEC "%{!static:-lgcc -lSystem}"
> -
>  /* crt2.o is at least partially required for 10.3.x and earlier.  */
>  #define DARWIN_CRT2_SPEC \
>    "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}"

Patch

Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 163418)
+++ gcc/config/darwin.h (working copy)
@@ -412,12 +412,12 @@  extern GTY(()) int darwin_ms_struct;
         %: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)     \
-       %:version-compare(< 10.5 mmacosx-version-min= - 
lgcc) ;             \
+       - 
lgcc ;                                                            \
        :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s. 
10.4) \
         %: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)     \

-       %:version-compare(< 10.5 mmacosx-version-min= -lgcc) }"
+       -lgcc }"

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

Index: gcc/config/rs6000/darwin.h
===================================================================
--- gcc/config/rs6000/darwin.h  (revision 163418)
+++ gcc/config/rs6000/darwin.h  (working copy)
@@ -120,11 +120,6 @@  extern int darwin_emit_branch_islands;
     mcpu=G5:ppc970;                             \
     :ppc}}"

-/* Linked libs might refer to save/restFP - we still need to append - 
lgcc to
-   provide these.  */
-#undef LIB_SPEC
-#define LIB_SPEC "%{!static:-lgcc -lSystem}"
-
  /* crt2.o is at least partially required for 10.3.x and earlier.  */
  #define DARWIN_CRT2_SPEC \