Subject: Re: tries cross build with host CFLAGS/COPTS?
To: Andrew Brown <>
From: Pavel Cahyna <>
List: current-users
Date: 01/14/2003 18:30:37
> perhaps something like:
> __HOST_MACHINE_ARCH!=uname -p
> CFLAGS=...
> COPTS=...
> .endif
> 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

That's nice, but things are unfortunately more complicated. For tools
( -t), at least for the GNU toolchain, CFLAGS are ignored and
youn need to set HOST_CFLAGS to have the tools optimized for your
platform. This is probably a feature of GNU configure. E. g. if I 
compiled for an i386 on an alpha, I've set 
HOST_CFLAGS=-O2 -mcpu=ev4

And, when bulding cross-compilation tools, is MACHINE_ARCH defined to the 
arch of your host or to the arch for which you are compiling? I think
the first would make more sense, but I haven't checked it.

Bye Pavel