From owner-freebsd-ports Thu Mar 22 3:50: 7 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 18D2537B71C for ; Thu, 22 Mar 2001 03:50:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2MBo3740764; Thu, 22 Mar 2001 03:50:04 -0800 (PST) (envelope-from gnats) Date: Thu, 22 Mar 2001 03:50:04 -0800 (PST) Message-Id: <200103221150.f2MBo3740764@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: ports/25750: rrdtool port fails to build with -ffast-math -mfancy-math-387 Reply-To: Peter Pentchev Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/25750; it has been noted by GNATS. From: Peter Pentchev To: khera@kciLink.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: ports/25750: rrdtool port fails to build with -ffast-math -mfancy-math-387 Date: Thu, 22 Mar 2001 13:48:02 +0200 From the gcc infopage (Invoking GCC >> Optimize options): `-ffast-math' This option allows GCC to violate some ANSI or IEEE rules and/or specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the `sqrt' function are non-negative numbers and that no floating-point values are NaNs. This option should never be turned on by any `-O' option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions. So.. if you're turning on -ffast-math, you should know what you are doing; in particular, you should know you are breaking IEEE rules :) Maybe the rrdtool port Makefile should check for -ffast-math in CFLAGS, and warn the user / cancel the build / just remove it? G'luck, Peter -- I had to translate this sentence into English because I could not read the original Sanskrit. On Mon, Mar 12, 2001 at 04:04:01PM -0500, khera@kciLink.com wrote: > > >Number: 25750 > >Category: ports > >Synopsis: ports/net/rrdtool fails to build with CC hardware math options > >Originator: Vivek Khera > >Release: FreeBSD 4.3-BETA i386 > >Organization: > >Environment: > System: FreeBSD onceler.kciLink.com 4.3-BETA FreeBSD 4.3-BETA #1: Wed Mar 7 13:44:04 EST 2001 khera@yertle.kciLink.com:/u/yertle2/usr.obj/amd/onceler/u/onceler1/usr/src/sys/ONCELER i386 > > ports cvsup'd today; world from march 7. > > >Description: > > > in /etc/make.conf, I have > CFLAGS+= -ffast-math -mfancy-math-387 > > which apparently causes IEEE math to fail in GCC, leading to my problem: > > rrdtool dies during its self config at build time. When it croaks, it > spits out the entire config.log making it hard to see the real > error... this is what you get if you can scroll back a bazillion lines: > > checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch... no > checking if IEEE math works with fpsetmask(0)... not isnan(NaN) ... no > checking if IEEE math works with signal(SIGFPE,SIG_IGN)... not isnan(NaN) ... no > configure: error: > Your Compiler does not do propper IEEE math ... Please find out how to > make IEEE math work with your compiler and let me know (oetiker@ee.ethz.ch). > Check config.log to see what went wrong ... > > >How-To-Repeat: > cd /usr/ports/net/rrdtool > make > > >Fix: > > don't specify -ffast-math -mfancy-math-387 to the compiler. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message