[commit: ghc] master: ARM: infer VFPv2 presence from the C compiler (0375fcb)

Simon Marlow marlowsd at gmail.com
Tue Jan 29 11:12:37 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0375fcb10e0914b57cfa9744e75e692552fd2672

>---------------------------------------------------------------

commit 0375fcb10e0914b57cfa9744e75e692552fd2672
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Tue Jan 29 09:10:20 2013 +0000

    ARM: infer VFPv2 presence from the C compiler

>---------------------------------------------------------------

 aclocal.m4 |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index edbe389..7b185b9 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -367,11 +367,23 @@ AC_DEFUN([GET_ARM_ISA],
                      #endif]
                 )],
                 [AC_DEFINE(arm_HOST_ARCH_PRE_ARMv7, 1, [ARM pre v7])
-                 changequote(, )dnl
                  ARM_ISA=ARMv6
-                 ARM_ISA_EXT="[]"
-                 changequote([, ])dnl
-                ],
+                 AC_COMPILE_IFELSE([
+                        AC_LANG_PROGRAM(
+                                [],
+                                [#if defined(__VFP_FP__)
+                                     return 0;
+                                #else
+                                     no vfp
+                                #endif]
+                        )],
+                        [changequote(, )dnl
+                         ARM_ISA_EXT="[VFPv2]"
+                         changequote([, ])dnl],
+                        [changequote(, )dnl
+                         ARM_ISA_EXT="[]"
+                         changequote([, ])dnl]
+                )],
                 [changequote(, )dnl
                  ARM_ISA=ARMv7
                  ARM_ISA_EXT="[VFPv3,NEON]"





More information about the ghc-commits mailing list