aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-02-01 21:05:20 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-02-01 21:05:20 +0000
commit28f3c8143b2f7e6178e5baaf81d15c65cbe6f06b (patch)
tree22f2408010d680c87c037ebf561a741ac3f31c12 /libgo/configure
parentd15f0fa7f9b7bc2eabb29429a7ca8556a3272625 (diff)
downloadgcc-28f3c8143b2f7e6178e5baaf81d15c65cbe6f06b.zip
gcc-28f3c8143b2f7e6178e5baaf81d15c65cbe6f06b.tar.gz
gcc-28f3c8143b2f7e6178e5baaf81d15c65cbe6f06b.tar.bz2
math: adjust compilation flags, use them when testing
We were using special compilation flags for the math package, but we weren't using them when testing. That meant that our tests were not checking the real code we were providing. Fix that. Fixing that revealed that we were not using a good set of flags, or at least were not using flags that let the tests pass. Adjust the flags to stop using -funsafe-math-optimizations on x86. Instead always use -ffp-contract=off -fno-math-errno -fno-trapping-math for all targets. Fixes golang/go#23647 Reviewed-on: https://go-review.googlesource.com/91355 From-SVN: r257312
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure5
1 files changed, 2 insertions, 3 deletions
diff --git a/libgo/configure b/libgo/configure
index d0550c3..aba4dc3 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -15076,10 +15076,9 @@ fi
$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 -fno-math-errno"
-else
- MATH_FLAG="-ffp-contract=off"
+ MATH_FLAG="-mfancy-math-387"
fi
+MATH_FLAG="${MATH_FLAG} -ffp-contract=off -fno-math-errno -fno-trapping-math"
CFLAGS_hold=$CFLAGS