summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2009-10-06 15:00:30 +0000
committerCaolán McNamara <cmc@openoffice.org>2009-10-06 15:00:30 +0000
commitc4989e147f02f0c39e3cdaa9be4223d4fa4b438a (patch)
tree0afc17a13fdf57d747e5b62b3a5238b6bbef0a64 /bridges
parent6107d76a57d3d5f5e0303d049558eb613ed33ae5 (diff)
#i105302# allow build with -mfloat-abi=softfp -mfpu=vfp
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index b365bdb8aee1..f59a16b2ac38 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -45,7 +45,17 @@
#include <stdio.h>
#include <string.h>
-#if defined(__ARM_EABI__) && !defined(__SOFTFP__)
+/*
+ * Based on http://gcc.gnu.org/PR41443
+ * References to __SOFTFP__ are incorrect for EABI; the __SOFTFP__ code
+ * should be used for *soft-float ABI* whether or not VFP is enabled,
+ * and __SOFTFP__ does specifically mean soft-float not soft-float ABI.
+ *
+ * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then
+ * -mfloat-abi=softfp should work. -mfloat-abi=hard won't; that would
+ * need both a new macro to identify the hard-VFP ABI.
+ */
+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
#error Not Implemented
/*
@@ -103,7 +113,7 @@ namespace arm
void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterReturn)
{
-#ifndef __SOFTFP__
+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
register float fret asm("f0");
register double dret asm("f0");
#endif
@@ -128,14 +138,14 @@ void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterR
*(unsigned char*)pRegisterReturn = (unsigned char)r0;
break;
case typelib_TypeClass_FLOAT:
-#ifdef __SOFTFP__
+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
((long*)pRegisterReturn)[0] = r0;
#else
*(float*)pRegisterReturn = fret;
#endif
break;
case typelib_TypeClass_DOUBLE:
-#ifdef __SOFTFP__
+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
((long*)pRegisterReturn)[1] = r1;
((long*)pRegisterReturn)[0] = r0;
#else