Subject: Re: local-host tools used during NetBSD xcompilation
To: None <tech-misc@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-misc
Date: 12/26/2007 20:00:54
On Wed, 26 Dec 2007, Tom Spindler wrote:
> Right now, there are a fair amount of host-locale binaries built and run
> during the NetBSD build process - e.g. a bunch of bits in games/,
> sys/arch/i386/stand/genprom, etc. Right now, there seem to be no
> flags, no defines, or anything other than "cc -O -c -o".
They should, at the very least, be using ${HOST_CC} and ${HOST_CFLAGS},
not assuming "cc" and "-O". Are you sure they don't do that?
I think we should work towards treating them all as tools.
> I'd like to see something akin to pkgsrc's buildwrappers to whinge
> and complain if the non-USE_TOOLS compiler is used during the build
Even without that sort of wrapper framework, some imaginative
use "grep cc | grep -v WHATEVERFLAGS" could probably find evidence in the
build log.
> - but at this point, I'd be happy with the .lo and/or bsd.hostprog.mk
> related stuff emit some extra defines. Unfortunately, I have no idea
> where all that sort of thing lives in the bowels of mk/ - any of
> y'all have insight?
HOST_CC and HOST_CFLAGS (and several related variables) are defined in
bsd.sys.mk, or can be overridden in /etc/mk.conf.
--apb (Alan Barrett)