Subject: Re: -ffast-math and packages
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: David Brownlee <abs@netbsd.org>
List: tech-pkg
Date: 05/23/2003 13:40:37
On Fri, 23 May 2003, Lubomir Sedlacik wrote:

> On Fri, May 23, 2003 at 12:38:21PM +0200, Lubomir Sedlacik wrote:
>
> btw you can do this without even touching packages themselves, just set
> a variable in your mk.conf containing category/pkgdir of all packages
> you want to exclude, and do the necessary magick.  e.g.,
>
>   CFLAGS+=-ffast-math
>
>   PKG_EXCLUDE_FAST_MATH=	databases/postgresql		\
> 				anothercategory/somethingelse	\
> 				othercategory/anotherpackage
>
>   _CURPKG=			${.CURDIR:H:T}/${.CURDIR:T}
>
>   .if !empty(PKG_EXCLUDE_FAST_MATH:M${_CURPKG})
>   CFLAGS:=			${CFLAGS:S/-ffast-math//}
>   .endif

	I'm doing something similar now (though in a much less elegant
	fashion - thanks for the make fragment :). It seems to make
	more sense for the Makefile for a package to know about
	this - such as having
	    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.

-- 
		David/absolute          -- www.netbsd.org: No hype required --