about summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-03-16 16:07:57 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2012-03-21 23:58:50 +0100
commit7998fa7899a29803ad4512002636332dfee48451 (patch)
treeab1e75e83dd8478f276b2fbf87b192732f83548d /configure.in
parent8e95c99a7a0b0ca8cf9bfbeddf1e43fb3efc1bee (diff)
downloadglibc-7998fa7899a29803ad4512002636332dfee48451.tar.gz
glibc-7998fa7899a29803ad4512002636332dfee48451.tar.xz
glibc-7998fa7899a29803ad4512002636332dfee48451.zip
Disable use of FMA instructions in branred
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 b2fed4bd1c..2363015edb 100644
--- a/configure.in
+++ b/configure.in
@@ -1992,6 +1992,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
@@ -2135,6 +2143,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(libc_cv_sparc_as_vis3)