Subject: Re: Proposed improvements to toolchain2netbsd and config.guess
To: Todd Vierling <tv@wasabisystems.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-toolchain
Date: 02/14/2002 09:04:44
On Thu, 14 Feb 2002, Todd Vierling wrote:
> On Thu, 14 Feb 2002, Frederick Bruckman wrote:
>
> : 2) Many files get updated with no change except for the header.
>
> Shouldn't happen as of quite a while ago; there's a heuristic check that
> avoids overwriting if ony the file header is changes by grepping out the
> header.
The old heuristic doesn't rule out the case where the only change in the
header is the version of toolchain2netbsd itself, and that produces a
lot of noise.
> : 3) It starts out "building for m68k-unknown-netbsdelf1.5AZ, where
> : history and bsd.own.mk prefers m68k--netbsdelf1.5AZ, leading to more
> : spurious changes.
>
> What spurious changes? config.guess is not used for `real' configury
> (there's an explicit --host=), so this might be simply an informational
> message and not functionally different.
Are you sure about that?
fredb@tautology-> grep host toolchain2netbsd
for f in auto-host config gencheck hconfig options specs tconfig tm; do
"host" from "config.guess" gets embedded into config.cache, for
subsequent runs, but that doesn't help if it gets it wrong in the first
place. The "unknown" does get placed into the files on a virgin run.
Where is value to "--host" supposed to come from? To try to get it from
bsd.own.mk is really awkward (see my broken submission to PR 15514); it
would be easier to simply elide the vendor and version number in
toolchain2netbsd directly.
> : A side-effect, is that all no-op comment blocks are removed.
>
> This is actually a bad thing; we want the config.h files to be as close to
> `real' config.h as possible for comparison purposes.
OK. I can look at extending the script to keep and collate the #undef
blocks, too.
> : config.guess now omits the vendor portion entirely, on all platforms,
> : just like ${MACHINE_GNU_PLATFORM} in bsd.own.mk.
>
> This goes against the standard config.guess style, so it shouldn't be
> changed. config.guess should use "unknown" as the vendor field if it is
> irrelevant or not known.
> (We use --host explicitly, since our ${MACHINE_GNU_PLATFORM} omits the OS
> version number, and the omission of the vendor field is simply a convenience
> in that case.)
I see. Then "pkgsrc" on current is really messed up:
root@deduction-> uname -smr
NetBSD 1.5ZA mac68k
root@deduction-> pwd
/s/pkgsrc/www/arena
root@deduction-> make show-var VARNAME=MACHINE_GNU_PLATFORM
m68k--netbsdelf
Maybe it would be a good idea to call the argument to --host in
bsd.own.mk something other than ${MACHINE_GNU_PLATFORM}, as you gave
that name to the argument to --host in pkgsrc first? Maybe
${SHORT_PLATFORM}, or something?
> : I'm not sure if it would still be OK on m68k/a.out (probably *not*),
>
> No. New toolchain builds for m68k are *ELF*. When all is said and done,
> some a.out compatibility may be re-added for old NetBSD releases (compiling
> gcc out-of-the-box), but that's really low priority.
The a.out build, on ports that haven't switched yet, doesn't use any of
the same files? Won't matter soon, hopefully.
Frederick