diff options
author | Landon Fuller <landonf@bikemonkey.org> | 2010-09-18 15:32:08 -0700 |
---|---|---|
committer | Landon Fuller <landonf@bikemonkey.org> | 2010-09-18 15:32:08 -0700 |
commit | 69043d02936bb0579ac59b4ee1ed8dec38c38db7 (patch) | |
tree | 25dac421241b44a3bec5ecceda716828b36d7833 /src | |
parent | a82e6c354ea805114642a6e440abd0832cb1d23f (diff) | |
download | libffi-69043d02936bb0579ac59b4ee1ed8dec38c38db7.tar.gz |
Work-around libffi's FP ABI detection.
On iOS, we must use the AAPCS floating point return value calling
conventions. libffi's ARM implementation will only use these conventions
if __SOFTFP__ is defined, which is not the case when GCC's
-mfloat-abi defaults to 'softfp' instead of 'soft'. To work around this
we manually define __SOFTFP__ for Apple platforms in the ARM-specific
sysv.S.
See also:
http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iPhoneOSABIReference/Introduction/Introduction.html
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/sysv.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arm/sysv.S b/src/arm/sysv.S index 9064318..dc5fe36 100644 --- a/src/arm/sysv.S +++ b/src/arm/sysv.S @@ -34,6 +34,12 @@ #define CONCAT1(a, b) CONCAT2(a, b) #define CONCAT2(a, b) a ## b +/* Use the SOFTFP return value ABI on Mac OS X, as per the iOS ABI + Function Call Guide */ +#ifdef __APPLE__ +#define __SOFTFP__ +#endif + /* Use the right prefix for global labels. */ #define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x) #else |