Subject: Re: tries cross build with host CFLAGS/COPTS?
To: Hauke Fath <>
From: Andrew Brown <>
List: current-users
Date: 01/10/2003 11:55:14
>crt0.o cc1: Invalid option `cpu=supersparc'
>cc1: Invalid option `tune=supersparc'
>cc1: Invalid option `cpu=supersparc'
>cc1: Invalid option `tune=supersparc'
>*** Error code 1
>nbmake: stopped in /export/bsd/netbsd-src/current/src/lib/csu/m68k_elf
>*** Error code 1
>-- how do I teach a cross-build not to use CFLAGS and COPTS from

perhaps something like:


that should make /etc/mk.conf not set things if the target isn't the
same as your host.  you can also conditionally set things in
/etc/mk.conf by checking:


so that you can adjust certain settings for things like "kernel builds
as part of a release process" vs "a kernel build that i'm doing by
hand for this machine", etc.

you may wish to use MACHINE and uname -m instead of MACHINE_ARCH and
uname -p.  depends on how you wish to scope it.  for sparc, there is
only sparc, but if you were using, eg, a macppc host, you might want
the specificity.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."