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.

From-SVN: r208505
This commit is contained in:
Ian Lance Taylor 2014-03-12 04:38:52 +00:00
parent 6c107fab45
commit 33a9145bb7
2 changed files with 4 additions and 0 deletions

2
libgo/configure vendored
View File

@ -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

View 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)