Subject: Re: clarification between machine_arch and machine
To: Christos Zoulas <christos@zoulas.com>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-kern
Date: 01/29/2002 03:34:55
On Sun, 27 Jan 2002, Christos Zoulas wrote:

: -m      print the machine hardware name. $MACHINE
: -p      print the machine processor architecture name. $MACHINE_ARCH
:
: In most platforms they are the same right now, but I think that should be
: fixed.
:
: On solaris -m reports sun4, sun4c, sun4m, sun4d, sun4u and -p reports sparc.
: We report sparc always.

We've used $MACHINE and "uname -m" to mean the NetBSD kernel architecture
for a very long time, and software *relies* on this fact.  For "sparc", for
instance, there is *no* difference to any userland program (which would be
calling "uname -m") between sun4, sun4c, and sun4m.

You're confusing this with what Solaris does, i.e., uses a completely
different set of base header files for different sun4* architectures.
Solaris machines really do have a completely different kernel layout for
sun4c and sun4m, and thus these are different $MACHINEs (to make an analogy
to our term).  We don't have different $MACHINEs for sun4c and sun4m.

More to the point, only MACHINE_ARCH gives real processor-specific
information.  There's "i386", "sparc", "sparc64", "m68k", "arm", etc. --
these are the CPUs themselves, indicating a lowest common denominator of
compatibility with all machines in that $MACHINE_ARCH.

There's certainly a place where an "optimization specific" architecture can
go:  in sysctl.  And, IMNSHO, that's where it belongs.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/