Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2001 03:50:04 -0800 (PST)
From:      Peter Pentchev <roam@orbitel.bg>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/25750: rrdtool port fails to build with -ffast-math -mfancy-math-387
Message-ID:  <200103221150.f2MBo3740764@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/25750; it has been noted by GNATS.

From: Peter Pentchev <roam@orbitel.bg>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103221150.f2MBo3740764>