From owner-svn-src-all@FreeBSD.ORG Fri Dec 3 00:05:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ED531065694; Fri, 3 Dec 2010 00:05:50 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA1228FC0C; Fri, 3 Dec 2010 00:05:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB305nTD038511; Fri, 3 Dec 2010 00:05:49 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB305n9a038509; Fri, 3 Dec 2010 00:05:49 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201012030005.oB305n9a038509@svn.freebsd.org> From: David Schultz Date: Fri, 3 Dec 2010 00:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216137 - head/lib/msun X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 00:05:50 -0000 Author: das Date: Fri Dec 3 00:05:49 2010 New Revision: 216137 URL: http://svn.freebsd.org/changeset/base/216137 Log: Disable gcc's built-in rint() function when compiling s_nearbyint.c. It results in incorrect optimizations that break nearbyint(). PR: 143358 Reviewed by: bde Modified: head/lib/msun/Makefile Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Thu Dec 2 22:37:50 2010 (r216136) +++ head/lib/msun/Makefile Fri Dec 3 00:05:49 2010 (r216137) @@ -113,6 +113,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