ARM: infer VFPv2 presence from the C compiler
authorSimon Marlow <marlowsd@gmail.com>
Tue, 29 Jan 2013 09:10:20 +0000 (09:10 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 29 Jan 2013 10:12:28 +0000 (10:12 +0000)
aclocal.m4

index edbe389..7b185b9 100644 (file)
@@ -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]"