summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-12 04:38:52 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-12 04:38:52 +0000
commita1a3143a5316b2df830e8b96bd516c5ca821b2dc (patch)
tree0f756fd91e39303eb8313268ac375a6dd090ec11 /libgo
parent3ec6e95b257537e7cd6f927fa2f4149b318c071a (diff)
downloadgcc-a1a3143a5316b2df830e8b96bd516c5ca821b2dc.tar.gz
libgo: Build math package with -ffp-contract=off on non-x86.
http://golang.org/issue/7074 shows that not using -ffp-contract=off produces the wrong result for math.Log2(1) on arm64. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208505 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rwxr-xr-xlibgo/configure2
-rw-r--r--libgo/configure.ac2
2 files changed, 4 insertions, 0 deletions
diff --git a/libgo/configure b/libgo/configure
index c55212042c6..f4b8c104465 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -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
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 7063e2d162f..4480261a9c9 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -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)