Subject: Re: -ffast-math and packages
To: Lubomir Sedlacik <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 05/23/2003 08:46:31
On Fri, 23 May 2003, Lubomir Sedlacik wrote:

> On Fri, May 23, 2003 at 01:40:37PM +0100, David Brownlee wrote:
> >
> > It seems to make more sense for the Makefile for a package to know
> > about this - such as havin
> >     CFLAGS:=${CFLAGS:S/-ffast-math//}
> > in the relevant package makefiles. It allows people to add -ffast-math
> > and the few packages with issues to automatically exclude the flags,
> > without having everyone who wants to set -ffast-math have to work out
> > which packages to exclude.

It does sound reasonable to me. I use -ffast-math now for all the
audio/video processing programs I build outside of pkgsrc. (Of course,
there's no benefit for many other kinds of programs.)

> while i tend to agree i am not sure this is the way pkgsrc should go.
> this time it's -ffast-math, next time it will be -finline-functions or
> something else.

You've got a point. Are committers going to be obligated to check if
every new package works with -ffast-math?

> i understand that fixing optimisation bugs so common
> in gcc for less mainstream architectures (alpha, arm, ...) which are
> already present in various packages are necessary simply to be able to
> compile the software at all, but i think that fixing the packages for
> any additional compiler optimisations is adding unnecessary complexity

It was my understanding that -ffast-math was "mostly harmless" for any
normal use of floating point, and that the only reason it wasn't the
default is that it breaks strict conformance with some standard. I
wonder what the issue is with -ffast-math regarding postgresql?