summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 6b57c8db07..80d45f041b 100644
--- a/configure.in
+++ b/configure.in
@@ -2196,6 +2196,14 @@ if test "$libc_cv_gcc_tls_model_attr" = no; then
AC_MSG_ERROR([support for the tls_model attribute is required])
fi
+dnl Determine how to disable generation of FMA instructions.
+AC_CACHE_CHECK([for compiler option to disable generation of FMA instructions],
+ libc_cv_cc_nofma, [dnl
+libc_cv_cc_nofma=
+for opt in -ffp-contract=off -mno-fused-madd; do
+ LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break])
+done])
+
if test -n "$submachine"; then
AC_CACHE_CHECK([for compiler option for CPU variant],
libc_cv_cc_submachine, [dnl
@@ -2340,6 +2348,7 @@ AC_SUBST(libc_cv_cc_avx)
AC_SUBST(libc_cv_cc_sse2avx)
AC_SUBST(libc_cv_cc_novzeroupper)
AC_SUBST(libc_cv_cc_fma4)
+AC_SUBST(libc_cv_cc_nofma)
AC_SUBST(libc_cv_as_i686)
AC_SUBST(use_ldconfig)