Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.6-dev-20: runtime determination of MACHTYPE



> It's not that easy.  Look at config.guess: $MACHTYPE is not always
> the same as `uname -m`.  Leave $MACHTYPE being compiled in as it was.
> If you want access to the runtime uname strings without forking off a
> uname process, invent a new special parameter.

The behavior of config.guess is a bit inconsistent, and this description
is a little vague.

       MACHTYPE
              The machine type (microprocessor class  or  machine
              model), as determined at compile time.


What was the original purpose of the parameter?  Seems to me that
`uname -m`, `uname -p`, and the output of arch(1) are often a stretch
from what one might infer from their descriptions, anyway, not to
mention inconsistent, but if MACHTYPE is set to sparc without regard
for whether I'm on a SuperSPARC or an UltraSPARC, whether I'm running
Solaris or Linux, then why differentiate between types of Alpha or x86?
Especially if the same chip will be i686 under Linux and i386 under FreeBSD?

The problem's scope is really beyond zsh, but if a parameter is compiled
in, it should be a generic "CPU architecture" type (e.g. sparc, ix86/i386,
alpha, m68k, &c.), and if it's defined at runtime, it should be more specific.

So I'm fine with adding a new parameter and keeping MACHTYPE static,
but in that case I think that MACHTYPE should become more generic.
Anyone disagree?



Messages sorted by: Reverse Date, Date, Thread, Author