Subject: Re: -ffast-math and packages
To: David <>
From: Krister Walfridsson <>
List: tech-pkg
Date: 05/23/2003 23:18:00
On Fri, 23 May 2003, David wrote:

> 	I'd like to be able to set my default CFLAGS to include
> 	-ffast-math, but there are certain packages where this
> 	would be a Bad Thing (postgresql comes to mind).
> 	Would anyone object to me adding another pkgsrc variable
> 	set that can be used to indicate where packages must not
> 	be optimised in a certain way (that can then be tested
> 	in mk.conf).

I don't think there are that many packages where -ffast-math makes any
noticeable speed improvement, but it has potential for causing breakage
in all packages.

I think it is better to let the individual pakages add -ffast-math where
it is known to be beneficial and safe.  This may be controlled by a
USE_FAST_MATHS in bsd.pkg.defaults in analogue with for example USE_MMX,
or even better, let it be added unconditionally, since there is no
reason not to define it if it is known to be beneficial and safe...