Subject: Re: sparc/conf/GENERIC_SUN4U -> sparc64 ?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Greywolf <greywolf@starwolf.com>
List: port-sparc
Date: 09/30/2004 13:00:43
Thus spake Manuel Bouyer ("MB> ") sometime Today...

greywolf: if -m == "machine arch" (i.e. kernel arch) and -p == "platform arch"
greywolf: (i.e. userland arch), wouldn't that be dependent, even, upon whether
greywolf: you're running 32/32, 32/64 or 64/64 (user/kernel)?

MB: I would expect 32/64 or 64/64 to return the same thing as 64/64.
MB: But in the 32/32 case, sparc vs sparc64 is the same level of difference than
MB: sparcv7 vs sparcv8 from the userland software point of view. So I would
MB: expect uname to return the same value if I'm running on a IPC, or an
MB: ultra5 with a 32bit kernel.

I do not expect platform arch and kernel arch to necessarily correspond.

[In fact, I would *really* like it if one of -m or -p would tell me what
kind of machine I am *really* on [ i686, k7, whatever ] while the other
would tell me the generic category, i.e. hardware vs. compatibility.]

And I think you mean 'sparcv8' vs. 'sparcv9' above; v7 and v8 are both
32-bit (v8 has the integer mul/div).

MB: BTW, I'm concerned about this because I just started a package bulk build
MB: on this Ultra5, for sparc (not sparc64).

...in which case you should probably be hard-setting the -mcpu option
on gcc via /etc/mk.conf.

For what it's worth, on solaris, 'uname -m' returns the processor type
(sun4u, for example), while 'uname -p' returns the generic architecture
(sparc), and 'uname -i' returns the precise hardware platform
(SUNW,Sun-Fire-15000, in my case).

Perhaps we should do the same, where applicable.

[-m -> athlon-xp, -p -> i386, -i -> probably undefined for ix86...]

'uname' by itself seems to return the name of the OS.  Everyone else
does this, so I guess we're safe there :).

				--*greywolf;
--
[ ] PEACE    [ ] FREEDOM	Pick one.