Subject: Re: Proposed improvements to toolchain2netbsd and config.guess
To: Frederick Bruckman <fredb@immanent.net>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 02/14/2002 11:58:18
On Thu, 14 Feb 2002, Frederick Bruckman wrote:
: > Why is that really messed up? m68k--netbsdelf will certainly match
: > *-*-netbsd* in a configure script, so there's no problem.
:
: OK, so it's not *badly* messed up, but we're still courting problems.
: Some software, someday, might include an autoconf macro, for example,
: that snubs NetBSD 1.6's "msgfmt" for some reason or another.
Well, this is a candidate for a test of msgfmt, not of the OS version
number. pkgsrc deliberately omits the version number in order to catch
these kinds of irresponsible uses of an OS version -- typically, it's only
needed if low-level system twiddling (in our case, `kernel') work is done.
: 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 bsd.own.mk, and not the
: "config.guess" in toolchain (which you submitted to the GNU people).
Yes, this should be fixed.
: 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.
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.
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi & NetBSD: Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/