Subject: Re: Cross-build question.
To: Greywolf <greywolf@starwolf.com>
From: Simon J. Gerraty <sjg@crufty.net>
List: current-users
Date: 02/04/2003 18:04:40
>[FB: > in /etc/mk.conf and it does the right thing - for kernel builds
>[FB: > at least.  The same trick should work for other bits of the build.
>[FB:
>[FB: ${DEFCOPTS} doesn't work for other parts of the build, only ${COPTS}.

I know btw - that why I said it was for kernel only.

>I thank you both very much for your efforts.  I must be missing something
>here, like my brain, because when I go to build the tools explicitly,
>mk.conf never picks up the MKTOOLS=no.

This doesn't parse too well...

>Here's what I (effectively) end up running:
>#<***

>export TOOLDIR
>export MACHINE MACHINE_ARCH
>export SHELL
>SHELL=/bin/sh
>MACHINE=sparc MACHINE_ARCH=sparc;
>TOOLDIR=/usr/src/tools/tools.NetBSD-1.6M-sparc;
>PATH=/usr/src/tools/tools.NetBSD-1.6M-sparc/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11/sbin:/root/bin:/usr/src;
>build.sh -O /export/obj/sparc -D /export/build/sparc tools

This explicitly asking to to build tools - so not sure what
effect MKTOOLS=no would have (one interpretation of what you were
saying above).  But more importantly you are setting MACHINE* to sparc
above - so you are telling the Makefiles that the HOST is a sparc.
Don't do that ;-)  The result you are getting should be expected 
given the above.  Let the build frob MACHINE* as needed.

--sjg