summaryrefslogtreecommitdiff
path: root/libgcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc/configure.ac')
-rw-r--r--libgcc/configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 186cd6e9cd7..560e988e048 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -182,7 +182,14 @@ AC_SUBST(long_double_type_size)
# Check for decimal float support.
AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
- [AC_COMPILE_IFELSE([_Decimal32 x;], [libgcc_cv_dfp=yes],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fenv.h>
+]], [[
+_Decimal32 x;
+int fe_except =
+ FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT;
+]])],
+ [libgcc_cv_dfp=yes],
[libgcc_cv_dfp=no])])
decimal_float=$libgcc_cv_dfp
AC_SUBST(decimal_float)