Subject: Re: Proposed improvements to toolchain2netbsd and config.guess
To: Todd Vierling <>
From: Frederick Bruckman <>
List: tech-toolchain
Date: 02/14/2002 11:46:31
On Thu, 14 Feb 2002, Todd Vierling wrote:

> On Thu, 14 Feb 2002, Frederick Bruckman wrote:
> : fredb@tautology-> pwd
> : /s/pkgsrc/www/arena
> : fredb@tautology-> uname -msr
> : NetBSD 1.5.3_ALPHA i386
> : fredb@tautology-> make show-var VARNAME=MACHINE_GNU_PLATFORM
> : i386--netbsd
> :
> : That doesn't jibe with anything else: not, and not the
> : "config.guess" in toolchain (which you submitted to the GNU people).
> Yes, this should be fixed.

I'll look to it.

> : I understand now why toolchain departs from the GNU cannon, and that
> : seems reasonable. But shouldn't we be emulating the cannononical
> : config.guess in "pkgsrc"? To my recollection, the only reason we're
> : passing `--host="${MACHINE_GNU_PLATFORM}"' in "pkgsrc" in the first
> : place, was that there was no consistency in the GNU packages
> : "config.guess"'s.
> That's the main reason:  config.guess scripts out there in the real world
> are very broken wrt some (now major) NetBSD platforms.  The problem here is,
> of course, that config.guess defaults to using "uname -m", which is our
> $MACHINE, but we want most binaries to heed the $MACHINE_ARCH ("uname -p"
> or "sysctl hw.machine_arch").  Thanks to this, we really can't remove this
> from pkgsrc.

I didn't mean to suggest removing it (in this lifetime). What I'm
suggesting, is getting it more in sync with GNU's config.guess, so that
up to date software that works out of the box on NetBSD won't require
hacks for pkgsrc, and especially, software that works for pkgsrc will
still work out of the box.

> But it's still valid that we don't really want a version number in the
> --host= argument in pkgsrc unless there's really reason for it.  Packages
> that need to know the difference between a.out and ELF should find it from
> the "netbsd[elf]" part, which I agreed should be fixed (above).
> Only those packages in pkgsrc which *really need* the kernel version number
> (mit-pthreads, for instance) should get it.

All very convincing. So now, what's the "unknown" good for? Omitting it
(in explicitly passed --host=) is obviously not causing any problems, as
no one seems to be using the vendor field, but why give authors a chance
to get it wrong? [Observe: the patch I posted at the beginning of this
thread drops "unknown", but leaves the version number intact.]