Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137986738
D29686.id87197.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
975 B
Referenced Files
None
Subscribers
None
D29686.id87197.diff
View Options
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
--- a/lib/msun/Makefile
+++ b/lib/msun/Makefile
@@ -34,6 +34,16 @@
CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR}
+.include <bsd.compiler.mk>
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000
+# When using clang with x86_64 CPUs that support AVX, some floating point
+# transformations may raise exceptions that would not have been raised by the
+# original code. To avoid this, use the -fp-exception-behavior=maytrap flag,
+# introduced in clang 10.0.0.
+# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254911
+CFLAGS+= -ffp-exception-behavior=maytrap
+.endif
+
.PATH: ${.CURDIR}/bsdsrc
.PATH: ${.CURDIR}/src
.PATH: ${.CURDIR}/man
@@ -113,7 +123,6 @@
# 'long double' [-Werror=overflow]
# if( y >= LDBL_MAX )
# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067
-.include <bsd.compiler.mk>
.if ${COMPILER_TYPE} == "gcc"
CFLAGS.e_powl.c+= -Wno-error=overflow
.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 10:09 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26304777
Default Alt Text
D29686.id87197.diff (975 B)
Attached To
Mode
D29686: Avoid raising unexpected floating point exceptions in libm
Attached
Detach File
Event Timeline
Log In to Comment