NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Some questions about build.sh, machine, -u and tools
TL;DR: src/BUILDING explains most of these things.
On Mon, May 03, 2021 at 12:18:54 +0200, Rocky Hotas wrote:
> I struggle instead about MACHINE. Some of them (sparc, vax) have
> just one MACHINE_ARCH with the same name. Some of them have just
> one MACHINE_ARCH with a different name (amd64). This allows to
> specify just one between `-m' or `-a', when building with build.sh.
> Then, there are the cases where a single MACHINE has several
> MACHINE_ARCH. So, what does MACHINE exactly refer to?
Roughly speaking MACHINE determines with kernel, bootloader, etc the
system uses. You can have multiple MACHINE_ARCH for the same MACHINE
when the machine can have different ABIs (e.g. old arm, earm) or run
in different endianness (big, little) or bitness (32, 64).
> tooldir.NetBSD-9.99.81-amd64
> tools
>
> `tooldir.NetBSD-9.99.81-amd64' actually contains the cross-compiler
> with its tools that have just been built: they are the actual `tools'
> created by build.sh and they are supposed to run on the host platform.
>
> What exactly is, instead, the contents of the directory `tools'?
> Are they supposed to run on the build host platform to build the
> cross-compiler and its tools?
tooldir* is default TOOLDIR, a place where the cross tools are
installed, you can set it with -T option to build.sh. tools is the
objdir for the src/tools, a place where tools are built. The choice
to put tooldir inside objdir by default might be a bit confusing, IMO.
Personally, I just use explicit -T.
> IIUC, `-u' means that if anything between tools and kernel has already
> been built and its code has not been modified after build 1, now it
> won't be built again. Is this correct?
Yes, -u is an "update" build. build.sh is not magic, it's just a
wrapper for plain old make. Roughly speaking, -u tells it to not nuke
the existing objdir and destdir and just run make and let it do the
make thing, figuring out which things are out of date.
If you have a tree you've already built. You can hack on, say,
src/games/trek and then just run $TOOLDIR/bin/nbmake-vax to compile
your changes, where nbmake-vax is just a script that invokes nbmake
host tool (i.e. good old make, compiled for the host you are on) with
a bunch of variables pointing to the right places to find sources, the
toolchain, etc.
-uwe
Home |
Main Index |
Thread Index |
Old Index