Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Link problems: restFP/saveFP and -lcc_dynamic -- why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link problems: restFP/saveFP and -lcc_dynamic -- why?



Norman Gray wrote:

Greetings,

Can anyone explain to me what the story is with the restFP/saveFP
symbols, which cause such inexplicable link problems with (some? all?)
combinations of g77 and gcc code? [I posted this query on
email@hidden a few days ago, but nobody wanted to bite].

The underlying situation is that saveFP/restFP are entry points to
special assembly language routines that some versions of the compiler
will call instead of issuing a long string of floating-point register
loads and stores when calling a function; saves a little space in
code. Normally the definitions get compiled into GCC's own library
libgcc, aka libcc_dynamic, and normally the compiler adds the library
to the link line automagically.

Problems come up because not every version of GCC issues the
saveFP/restFP calls in preference to issuing the loads/stores directly,
so if you mix-n-match compilers and don't link a libgcc that defines
these, you get undefines. Another thing to watch out for is random
libraries that were compiled by a GCC that assumes these, but linking
with a libgcc that doesn't.

In particular, restFP/saveFP has been one of the differences
between FSF GCC and Apple GCC.

Stan
_______________________________________________
fortran-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/fortran-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Link problems: restFP/saveFP and -lcc_dynamic -- why? (From: Norman Gray <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.