aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-07-18 16:01:36 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-07-18 16:01:36 +0000
commitc95111995bc630a90687c5a4dc191332b1843403 (patch)
tree6784fcc85079e99b79f736c50a9084c2adad432b /configure
parentnest method and attribute doc (diff)
downloadcpython-c95111995bc630a90687c5a4dc191332b1843403.tar.gz
cpython-c95111995bc630a90687c5a4dc191332b1843403.tar.bz2
cpython-c95111995bc630a90687c5a4dc191332b1843403.zip
Add configure check for a bug with gcc soft floating-point and subnormals, to help debug issue 8265.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure41
1 files changed, 40 insertions, 1 deletions
diff --git a/configure b/configure
index d48e8dcb64b..e8a62eec253 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 82090 .
+# From configure.in Revision: 82746 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for python 3.2.
#
@@ -11641,6 +11641,45 @@ $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
fi
+# Temporary check for a floating-point bug that appeared on ARM.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy subnormal floating-point" >&5
+$as_echo_n "checking for buggy subnormal floating-point... " >&6; }
+if test "${ac_cv_buggy_subnormal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+if test "$cross_compiling" = yes; then :
+ ac_cv_buggy_subnormal=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int main() {
+ double MIN = 2.2250738585072014e-308; /* 2**-1022 */
+ double TINY = 4.9406564584124654e-324; /* 2**-1074 */
+ double TRIPLE_TINY = 1.4821969375237396e-323; /* 3 * TINY */
+
+ double diff = MIN - TRIPLE_TINY;
+ double expected_diff = 2.2250738585071999e-308;
+
+ return !(diff == expected_diff);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_buggy_subnormal=no
+else
+ ac_cv_buggy_subnormal=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_subnormal" >&5
+$as_echo "$ac_cv_buggy_subnormal" >&6; }
+
# The short float repr introduced in Python 3.1 requires the
# correctly-rounded string <-> double conversion functions from
# Python/dtoa.c, which in turn require that the FPU uses 53-bit