Subject: Re: clarification between machine_arch and machine
To: Christos Zoulas <christos@zoulas.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 01/27/2002 10:03:25
On Sun, Jan 27, 2002 at 10:34:40AM -0500, Christos Zoulas wrote:

 > in /usr/src/sys/arch:
 > 
 > SUBDIR= ${MACHINE}
 > ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/:S/arm26/arm/:S/arm3
 > 2/arm/:S/m68000/m68k/}

That "ARCHSUBDIR" nonsense can be replaced with ${MACHINE_CPU}.

 > .if ${MACHINE} != ${ARCHSUBDIR}
 > .if exists(${ARCHSUBDIR})
 > SUBDIR+= ${ARCHSUBDIR}
 > .endif
 > .endif
 > .if ${MACHINE} == sparc
 > SUBDIR+= sparc64

This a special case -- NetBSD/sparc also builds/installs NetBSD/sparc64's
boot blocks.

 > .endif
 > .if (${MACHINE} == hpcmips || ${MACHINE} == hpcsh)
 > SUBDIR+= hpc

This is also a special case.

 > .endif
 > .if (${MACHINE} == sun2)
 > SUBDIR+= sun68k

As is this.

 > .endif
 > 
 > I suggest that we add MACHINE_KARCH to indicate the kernel architecture this
 > machine is using. If I change $MACHINE on the sparc to display sun4{,c,m,d}
 > then I'll need more if statements there.

None of those special cases can be solved with a ${MACHINE_KARCH} at all.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>