Subject: Re: Separate tools trees for each target arch?
To: Alan Post <apost@recalcitrant.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-users
Date: 04/08/2005 08:49:53
You can share the tools directory across target architectures from a
given NetBSD source tree on a given architecture.  You cannot share it
across NetBSD releases (e.g. 2.0 and current), or across hosts (OS or
arch).

E.g., building NetBSD-current on an i386 NetBSD 2.0 box for i386 amd64
sparc64 and alpha all 4 builds can use '-T /usr/obj/tools'.

Two sorts of things go in there (I'm fuzzy on official nomenclature),
which I'll call "host tools", and "cross tools".  Host tools run on
the host, e.g. make, tz compiler, rpcgen and produce output that
doesn't depend on the target arch (but perhaps on the target OS and version) on .  These are in
$TOOLDIR/bin/nb* and the same tools are used to build various
architectures (differing only for different hosts).

Then, there are cross tools, also in $TOOLDIR/bin/,
e.g. i386--netbsdelf-gcc.  Some of these are symlinked into
$TOOLDIR/$arch.../bin.

After you build for a second arch you'll get another arch-specific
directory and arch-specific-named-toolchain in $TOOLDIR/bin.  I would
expect that the 'host tools' wouldn't be rebuilt, but I'm not sure.

I use obj directories with $arch in them, and haven't figured out a
way to have the "tools" use a different obj prefix.


-- 
        Greg Troxel <gdt@ir.bbn.com>