mirror of git://sourceware.org/git/glibc.git
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: math/test-double-canonicalize.out testing double (without inline functions) Failure: canonicalize (max_value): Exception "Overflow" set Failure: canonicalize (max_value): Exception "Inexact" set Failure: canonicalize (-max_value): Exception "Overflow" set Failure: canonicalize (-max_value): Exception "Inexact" set Failure: canonicalize_downward (max_value): Exception "Overflow" set Failure: canonicalize_downward (max_value): Exception "Inexact" set Failure: canonicalize_downward (-max_value): Exception "Overflow" set Failure: canonicalize_downward (-max_value): Exception "Inexact" set Failure: canonicalize_towardzero (max_value): Exception "Overflow" set Failure: canonicalize_towardzero (max_value): Exception "Inexact" set Failure: canonicalize_towardzero (-max_value): Exception "Overflow" set Failure: canonicalize_towardzero (-max_value): Exception "Inexact" set Failure: canonicalize_upward (max_value): Exception "Overflow" set Failure: canonicalize_upward (max_value): Exception "Inexact" set Failure: canonicalize_upward (-max_value): Exception "Overflow" set Failure: canonicalize_upward (-max_value): Exception "Inexact" set test-float-catanh.out testing float (without inline functions) Failure: Real part of: catanh (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
a252205e1c
commit
111f2367f4
|
|
@ -916,6 +916,9 @@ endif
|
|||
# disable any optimization that assume default rounding mode.
|
||||
+math-flags = -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" and
|
||||
# "libmvec" can use -fno-math-errno.
|
||||
|
|
|
|||
Loading…
Reference in New Issue