diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-01-29 11:53:35 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-30 20:25:52 +0000 |
commit | 85056f039d8ce4176556f934094e31e5d1b25de9 (patch) | |
tree | fce86443201d9f13e4e01a5fc717a976e463e614 | |
parent | 6ac7bae74c02d8db306ad236d6498dfad8771ee9 (diff) | |
download | haskell-85056f039d8ce4176556f934094e31e5d1b25de9.tar.gz |
Detect hard/soft float in the same way as other ARM features
-rw-r--r-- | aclocal.m4 | 33 | ||||
-rw-r--r-- | configure.ac | 13 |
2 files changed, 31 insertions, 15 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 7b185b9853..0fe79cfd34 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 02f327fb6c..29b240fea9 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 |