Subject: Cross-build question.
To: BSD Current Users <current-users@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 02/04/2003 13:48:00
Greetings,

I asked something similar to this in tech-userlevel but never got a
response, so I'm asking again, here:

I wish to cross-build, e.g., sparc on i386.  build.sh usually works well
for this sort of thing, but when building, it wants to rebuild nbmake
and the nbmake wrapper.

The problem I see here is that I cannot in any way, shape or form,
find which *CFLAGS variable I can use such that host-built host tools
can be passed any of the requisite args for the host, simultaneously
being able to pass something suitable for crossbuilding to the target
build tools.  I.e. specifically, I wish to enable "-O3 -mv8
-mcpu=supersparc" to the target compiler running on the host.

I somehow don't think that HOST_CFLAGS is the appropriate place to be
setting this.

Does TARGET_ARCH or any other cross-compilation variable ever get set
during the build process?  I'd like to be able to toss a conditional
into /etc/mk.conf that I could just run with and not have to think
about too much once I get it set.

				--*greywolf;
--
NetBSD is much like a tipi:  No windows, no gates, and an apache inside.