From khera@kciLink.com  Mon Mar 12 13:04:04 2001
Return-Path: <khera@kciLink.com>
Received: from yertle.kciLink.com (yertle.kciLink.com [208.184.13.195])
	by hub.freebsd.org (Postfix) with ESMTP id 70ABE37B719
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Mar 2001 13:04:03 -0800 (PST)
	(envelope-from khera@kciLink.com)
Received: from onceler.kciLink.com (onceler.kciLink.com [208.184.13.196])
	by yertle.kciLink.com (Postfix) with ESMTP id D5B462E440
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Mar 2001 16:04:01 -0500 (EST)
Received: (from khera@localhost)
	by onceler.kciLink.com (8.11.3/8.11.1) id f2CL41A56436;
	Mon, 12 Mar 2001 16:04:01 -0500 (EST)
	(envelope-from khera)
Message-Id: <200103122104.f2CL41A56436@onceler.kciLink.com>
Date: Mon, 12 Mar 2001 16:04:01 -0500 (EST)
From: <khera@kciLink.com>
Reply-To: khera@kciLink.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: rrdtool port fails to build with -ffast-math -mfancy-math-387
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         25750
>Category:       ports
>Synopsis:       ports/net/rrdtool fails to build with CC hardware math options
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    demon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 12 13:10:01 PST 2001
>Closed-Date:    Mon Mar 26 02:55:35 PST 2001
>Last-Modified:  Mon Mar 26 02:56:10 PST 2001
>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.


>Release-Note:
>Audit-Trail:

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.
Responsible-Changed-From-To: freebsd-ports->demon 
Responsible-Changed-By: kuriyama 
Responsible-Changed-When: Sun Mar 25 20:36:39 PST 2001 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25750 
State-Changed-From-To: open->closed 
State-Changed-By: kuriyama 
State-Changed-When: Mon Mar 26 02:55:35 PST 2001 
State-Changed-Why:  
My patch was committed.  Thank you for your report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25750 
>Unformatted:
