Subject: tooldir naming confusion
To: None <current-users@netbsd.org>
From: Louis Guillaume <lguillaume@berklee.edu>
List: current-users
Date: 09/06/2003 23:45:29
Hi Everyone,

The logic behind the whole $TOOLDIR scheme escapes me. Perhaps you can 
help. Here's the source of my confusion...

Let's say I have 1.6W installed and have just updated from cvs, which 
has the source for 1.6Y.

I've learnt from the instructions to do a "./build.sh -U tools" at this 
point (before building a new kernel). This builds the toolchain in 
/usr/src/obj/tooldir.NetBSD-1.6W-i386/.

Now the 1.6Y tools are in a directory called "tooldir.NetBSD-1.6W-1386". 
Odd, I think.

The next step is to build a kernel and reboot with that kernel before 
trying to build the distribution.

But after rebooting, build.sh wants to build new tools in 
/usr/src/obj/tooldir.NetBSD-1.6Y-i386/. And it doesn't remove the old 
1.6W directory with tools!

So I have to wait for the same toolchain to build again and now I have 
duplicate tool directories, taking twice the disk space.

To get around this, I do a...

./build.sh -u -U -D /usr/src/dest.i386 \
   -T /usr/src/obj/tooldir.NetBSD-1.6W-i386 distribution

And that uses the toolchain in the directory named 1.6W. Is this ok? It 
seems to work, and I can't imagine how anything would be different from 
a re-built 1.6Y toolchain.

Wouldn't it be better for the default tooldir to be named without the 
current release number? Perhaps just the architecture would be enough, 
that way cross-compiles will automatically get their own toolchain 
directory.

Is there something that I'm missing?

Thanks very much,

Louis