Subject: Re: patch to rename disklabel host tool
To: Greg Troxel <gdt@ir.bbn.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-toolchain
Date: 12/04/2006 17:41:19
--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Dec 04, 2006 at 08:37:33AM -0500, Greg Troxel wrote:
>=20
> David Laight <david@l8s.co.uk> writes:
>=20
> > On Sun, Dec 03, 2006 at 03:54:11PM -0600, David Young wrote:
> >
> >> that adds the same prefix to disklabel as the
> >> suffix on the wrapper.  That is, if the make wrapper is nbmake-xxx for
> >> the target, then disklabel will be named xxx-disklabel.  In this way,
> >> the tools directory will contain a disklabel that appropriate to every
> >> target's LABELSECTOR and LABELOFFSET #defines.
> >>=20
> >> I would like to commit this.  Let me know if there is a better way.
> >
> > 1) Use separate tools directories for each architecture you build.
>=20
> BUILDING says this isn't necessary (although I won't argue that it
> isn't an effective workaround).
>=20
>      TOOLDIR     Directory to hold the host tools, once built.  If specif=
ied,
>                  must be an absolute path.  This directory should be uniq=
ue to
>                  a given host system and NetBSD source tree.  (However, m=
ulti-
>                  ple targets may share the same TOOLDIR; the target-depen=
dent
>                  files have unique names.)  If unset, a default based on =
the
>                  uname(1) information of the host platform will be create=
d in
>                  the .OBJDIR of src.
>=20
>                  Default: Unset.
>=20
> and I don't think we should change this.  I do this all the time
> (TOOLDIR=3D/usr/obj/auto-current/tools).  Last I checked the objdir ends
> up not shared so non-machine-dependent host tools get built/installed
> more than they needed to, but that's efficiency not correctness.

Agreed. I think this behavior of tools is a good thing and should be=20
retained.

> > 2) Change disklabel so that it is common - c/f installboot.
>=20
> Sure, that would be good.
>=20
> But until that's done, which is a lot of work, it seems that we have
> different versions of host tools depending on the target machine.  I
> think it makes sense to name them with the target; ugly beats broken.
>=20
> I'd call it disklabel-$machine (or nbdisklabel-$machine) instead of
> $machine-disklabel, to be parallel with nbmake-$machine.

nbdisklabel-$machine or nbdisklabel-$arch sounds best. I thought we had it=
=20
so that the same disklabel could be used on all machines of a given arch.=
=20
Note that I believe the fix involved querying the running kernel...

Take care,

Bill

--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFFdM4/Wz+3JHUci9cRAnxDAJ9nCqBw8OVzo4GdSnaX1zBCcnmBeACeNsJe
vwzpJkFMLQYLnglZ8HjFy6w=
=qyd2
-----END PGP SIGNATURE-----

--lrZ03NoBR/3+SXJZ--