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

Submitted by IainS on Aug. 20, 2010, 12:46 p.m.


Message ID E10A7201-9841-41C0-B7EE-095F6CD567DB@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

IainS Aug. 20, 2010, 12:46 p.m.
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).

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


Mike Stump Aug. 20, 2010, 3:48 p.m.
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).


Patch hide | download patch | download mbox

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

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