diff mbox

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

Message ID 4F28FDAC-7843-446A-B573-CEE5C0B60CFA@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Aug. 20, 2010, 12:49 p.m. UTC
On 20 Aug 2010, at 13:46, IainS wrote:

>
> My patch of r163267 breaks powerpc in the case that one has a static  
> lib that refers to save/restFP.
> Sorry, I didn't spot that, I bootstrap with gmp/mpfr/mpc in tree ..
>
> I could revert the lgcc change for all  archs, but would prefer to  
> try this if that's OK with Mike:
>
> (if it turns out that i686 needs _eprintf for some pre-existing  
> external code, then we might have to give up and just re-add the  
> lgcc for all, which seems a shame)
>
> OK for trunk & 4.5 ? (since this is not a reversion - but an  
> additional patch).
> Iain

would help I pasted the right patch:

    "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}"
diff mbox

Patch

Index: gcc/config/rs6000/darwin.h
===================================================================
--- gcc/config/rs6000/darwin.h	(revision 163400)
+++ gcc/config/rs6000/darwin.h	(working copy)
@@ -120,6 +120,11 @@  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 \