Subject: Re: arch/sparc64 mandatory for sun4c?
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Eduardo E. Horvath <eeh@one-o.com>
List: port-sparc
Date: 11/24/1999 08:50:39
> At 7:41 Uhr +0100 22.11.1999, Hauke Fath wrote:
> >>From /sys/arch/Makefile...
> >
> >.if ${MACHINE} == sparc
> >SUBDIR+= sparc64
> >.endif
> 
> Er, hum, cough...
> 
> Was this too dumb a question with too obvious an answer?
> 
> Why does "make build" on a Sun IPX want to pull in sparc64 headers when
> only a week ago it didn't?

sparc64 supports two distinct MACHINE_ARCHs: sparc and sparc64.  The
latter is a 64-bit userland, which only runs on a 64-bit kernel, while
the former is a 32-bit userland that will run on 32-bit kernels,
64-bit kernels with 32-bit emulation (which is still a bit buggy), or
NetBSD/sparc machines.

This mostly works.

Unfortunately, we have certain kvm grovelling programs in userland,
which rely on certain kernel structures.  These currently will only
work on one particular MACHINE.

So the options are:

	Ship two separate, almost identical sparc32 userlands with
	different kvm grovellers, say MACHINE_ARCH=sparc and
	MACHINE_ARCH=sparc32.

	Change the NetBSD/sparc kernels to use the sparc64 structures.

	Install both sparc and sparc64 kernel header files on all
	machines and build unified kvm grovellers.

The last one sounds easiest, with the most benefits and least risks.

If having a dozen extra files in /usr/include bothers you, you can
simply `rm -rf /usr/include/sparc64' (unless you want to build a kvm
groveller.)

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me