]> granicus.if.org Git - python/commitdiff
- Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with
authorMatthias Klose <doko@ubuntu.com>
Wed, 23 Sep 2009 18:33:48 +0000 (18:33 +0000)
committerMatthias Klose <doko@ubuntu.com>
Wed, 23 Sep 2009 18:33:48 +0000 (18:33 +0000)
  -mfloat-abi=softfp.

Misc/NEWS
Modules/_ctypes/libffi/src/arm/sysv.S

index b4b9851b9cd044280bbfa397646b0c811a9902d5..661cc0ecfb0fb4d7e981daa26b697df319483407 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -281,6 +281,9 @@ Extension Modules
 Build
 -----
 
+- Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with
+  -mfloat-abi=softfp.
+
 - Issue #6802: Fix build issues on MacOSX 10.6
 
 - Issue 5390: Add uninstall icon independent of whether file
index 34481c8c46c55172cb7ec3705b8ab60b5ce539aa..4c289c697c75f3a1c7dcdbfa575ef11870f0c8b1 100644 (file)
 
 #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
         || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
-        || defined(__ARM_ARCH_6ZK__)
+        || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
+       || defined(__ARM_ARCH_6M__)
 # undef __ARM_ARCH__
 # define __ARM_ARCH__ 6
 #endif
 
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
+        || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
+# undef __ARM_ARCH__
+# define __ARM_ARCH__ 7
+#endif
+
 #if __ARM_ARCH__ >= 5
 # define call_reg(x)   blx     x
 #elif defined (__ARM_ARCH_4T__)
@@ -189,7 +196,7 @@ ARM_FUNC_START ffi_call_SYSV
 
 @ return INT
        cmp     r3, #FFI_TYPE_INT
-#ifdef __SOFTFP__
+#if defined(__SOFTFP__) || defined(__ARM_EABI__)
        cmpne   r3, #FFI_TYPE_FLOAT
 #endif
        streq   r0, [r2]
@@ -197,12 +204,12 @@ ARM_FUNC_START ffi_call_SYSV
 
        @ return INT64
        cmp     r3, #FFI_TYPE_SINT64
-#ifdef __SOFTFP__
+#if defined(__SOFTFP__) || defined(__ARM_EABI__)
        cmpne   r3, #FFI_TYPE_DOUBLE
 #endif
        stmeqia r2, {r0, r1}
 
-#ifndef __SOFTFP__
+#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
        beq     LSYM(Lepilogue)
 
 @ return FLOAT
@@ -245,21 +252,21 @@ ARM_FUNC_START ffi_closure_SYSV
        beq     .Lretint
 
        cmp     r0, #FFI_TYPE_FLOAT
-#ifdef __SOFTFP__
+#if defined(__SOFTFP__) || defined(__ARM_EABI__)
        beq     .Lretint
 #else
        beq     .Lretfloat
 #endif
 
        cmp     r0, #FFI_TYPE_DOUBLE
-#ifdef __SOFTFP__
+#if defined(__SOFTFP__) || defined(__ARM_EABI__)
        beq     .Lretlonglong
 #else
        beq     .Lretdouble
 #endif
 
        cmp     r0, #FFI_TYPE_LONGDOUBLE
-#ifdef __SOFTFP__
+#if defined(__SOFTFP__) || defined(__ARM_EABI__)
        beq     .Lretlonglong
 #else
        beq     .Lretlongdouble
@@ -278,7 +285,7 @@ ARM_FUNC_START ffi_closure_SYSV
        ldr     r1, [sp, #4]
        b       .Lclosure_epilogue
 
-#ifndef __SOFTFP__
+#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
 .Lretfloat:
        ldfs    f0, [sp]
        b       .Lclosure_epilogue