svn commit: r219325 - stable/8/lib/msun

David Schultz das at FreeBSD.org
Sun Mar 6 08:52:23 UTC 2011


Author: das
Date: Sun Mar  6 08:52:23 2011
New Revision: 219325
URL: http://svn.freebsd.org/changeset/base/219325

Log:
  MFC r216137:
    Disable gcc's built-in rint() function when compiling s_nearbyint.c.
    It results in incorrect optimizations that break nearbyint().

Modified:
  stable/8/lib/msun/Makefile
Directory Properties:
  stable/8/lib/msun/   (props changed)

Modified: stable/8/lib/msun/Makefile
==============================================================================
--- stable/8/lib/msun/Makefile	Sun Mar  6 08:50:15 2011	(r219324)
+++ stable/8/lib/msun/Makefile	Sun Mar  6 08:52:23 2011	(r219325)
@@ -109,6 +109,12 @@ COMMON_SRCS:=  ${COMMON_SRCS:N${i:R}.c}
 .endfor
 .endif
 
+# Some files need certain gcc built-in functions to be disabled, since gcc's
+# model of the functions bogusly assumes -fno-trapping-math.
+XRINT_CFLAGS=	-fno-builtin-rint -fno-builtin-rintf -fno-builtin-rintl
+CFLAGS+=	${XRINT_CFLAGS}
+XRINT_CFLAGS:=	${.IMPSRC:M*/s_nearbyint.c:C/^.+$/${XRINT_CFLAGS}/:C/^$//}
+
 SRCS=	${COMMON_SRCS} ${ARCH_SRCS}
 
 INCS=	fenv.h math.h


More information about the svn-src-stable-8 mailing list