aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-15 08:58:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:41 -0300
commit8565bb7763e71465b2f6dceb2319a785cf9092c0 (patch)
tree81582c95400b602efe78ce11de481635acefe93c
parentc72809e0d871e8eebee20a6d9d0319392555e3d5 (diff)
downloadglibc-8565bb7763e71465b2f6dceb2319a785cf9092c0.zip
glibc-8565bb7763e71465b2f6dceb2319a785cf9092c0.tar.gz
glibc-8565bb7763e71465b2f6dceb2319a785cf9092c0.tar.bz2
Build glibc with -ftrapping-math
GCC enables it by default, clang in the other hand sets -fno-trapping-math. This is required to fix some math and stdlib tests that explicit raises floating point exceptions (i.e. stdlib/tst-strtod-round on aarch64).
-rw-r--r--Makeconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makeconfig b/Makeconfig
index 3cf8944..cf0b7ab 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -883,6 +883,9 @@ endif
# disable any optimization that assume default rounding mode.
+math-flags = $(config-cflags-frounding-math)
+# We have to assume that glibc functions might generate user-visible traps.
++math-flags += -ftrapping-math
+
# Logically only "libnldbl", "nonlib" and "testsuite" should be using
# -fno-math-errno. However due to GCC bug #88576, only "libm" can use
# -fno-math-errno.