]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgo: Build math package with -ffp-contract=off on non-x86.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 12 Mar 2014 04:38:52 +0000 (04:38 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 12 Mar 2014 04:38:52 +0000 (04:38 +0000)
http://golang.org/issue/7074 shows that not using
-ffp-contract=off produces the wrong result for math.Log2(1)
on arm64.

From-SVN: r208505

libgo/configure
libgo/configure.ac

index c55212042c648452d8e9d63a401e33f33edc2ccc..f4b8c104465a36af228c0f147583b466a6536695 100755 (executable)
@@ -14985,6 +14985,8 @@ $as_echo "$libgo_cv_c_fancymath" >&6; }
 MATH_FLAG=
 if test "$libgo_cv_c_fancymath" = yes; then
   MATH_FLAG="-mfancy-math-387 -funsafe-math-optimizations"
+else
+  MATH_FLAG="-ffp-contract=off"
 fi
 
 
index 7063e2d162f7aa04e915f22a9f8b322d9aa43654..4480261a9c9ec9a7d0c073e78eac5d7e627253cc 100644 (file)
@@ -620,6 +620,8 @@ CFLAGS=$CFLAGS_hold])
 MATH_FLAG=
 if test "$libgo_cv_c_fancymath" = yes; then
   MATH_FLAG="-mfancy-math-387 -funsafe-math-optimizations"
+else
+  MATH_FLAG="-ffp-contract=off"
 fi
 AC_SUBST(MATH_FLAG)