[commit: ghc] master: Detect hard/soft float in the same way as other ARM features (85056f0)
Simon Marlow
marlowsd at gmail.com
Wed Jan 30 21:26:09 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/85056f039d8ce4176556f934094e31e5d1b25de9
>---------------------------------------------------------------
commit 85056f039d8ce4176556f934094e31e5d1b25de9
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Jan 29 11:53:35 2013 +0000
Detect hard/soft float in the same way as other ARM features
>---------------------------------------------------------------
aclocal.m4 | 33 +++++++++++++++++++++++++++++++--
configure.ac | 13 -------------
2 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 7b185b9..0fe79cf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -379,10 +379,12 @@ AC_DEFUN([GET_ARM_ISA],
)],
[changequote(, )dnl
ARM_ISA_EXT="[VFPv2]"
- changequote([, ])dnl],
+ changequote([, ])dnl
+ ],
[changequote(, )dnl
ARM_ISA_EXT="[]"
- changequote([, ])dnl]
+ changequote([, ])dnl
+ ]
)],
[changequote(, )dnl
ARM_ISA=ARMv7
@@ -390,6 +392,33 @@ AC_DEFUN([GET_ARM_ISA],
changequote([, ])dnl
])
])
+
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [#if defined(__SOFTFP__)
+ return 0;
+ #else
+ not softfp
+ #endif]
+ )],
+ [changequote(, )dnl
+ ARM_ABI="SOFT"
+ changequote([, ])dnl
+ ],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [#if defined(__ARM_PCS_VFP)
+ return 0;
+ #else
+ no hard float ABI
+ #endif]
+ )],
+ [ARM_ABI="HARD"],
+ [ARM_ABI="SOFTFP"]
+ )]
+ )
])
diff --git a/configure.ac b/configure.ac
index 02f327f..29b240f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,19 +207,6 @@ AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
-# Testing ARM ABI
-# required for code generation (LLVM options)
-ARM_ABI=SOFT
-
-case $target in
- arm*-*-linux-gnueabihf | arm*-linux-gnueabihf)
- ARM_ABI=HARD
- ;;
- arm*-*-linux-gnueabi | arm*-linux-gnueabi)
- ARM_ABI=SOFTFP
- ;;
-esac
-
FPTOOLS_SET_PLATFORM_VARS
# Verify that the installed (bootstrap) GHC is capable of generating
More information about the ghc-commits
mailing list