Subject: Re: clarification between machine_arch and machine
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 01/29/2002 15:24:02
In article <Pine.WNT.firstname.lastname@example.org>,
Todd Vierling <email@example.com> wrote:
>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
>: 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.
Fine, I understand all that. I don't mind a sysctl. What I am saying is:
1. I'd like access to that information from userland
2. I'd like somehow to cleanup the situation in /usr/src/sys/arch/Makefile