Subject: ${MACHINE_CPU}
To: Ben Harris <bjh21@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 01/08/2001 22:26:07
>>	i heard about a plan to have sys/arch/arm for better code sharing
>>	between arm26 and arm32, so if it gets done, setting MACHINE_CPU
>>	to "arm" for arm26/32 may be better.
>
>"arm" is certainly the correct MACHINE_CPU for arm26 and arm32.  There are
>some places where arm32 doesn't yet use the shared arm code, but that's a
>bug in arm32, and will eventually be fixed.  Thus, I think you should:
>
> * Set MACHINE_CPU to "arm" for both arm26 and arm32.
> * Where they use different directories, check for MACHINE_ARCH==arm32 and
>   use the arm32 directory.

	at this moment, i've used the following construct to prefer
	arch/${MACHINE_ARCH} over arch/${MACHINE_CPU}.  i think it
	safe to set MACHINE_CPU to arm.  thanks.

itojun


.if exists(${.CURDIR}/arch/${MACHINE_ARCH})
ARCHSUBDIR=     ${MACHINE_ARCH}
.elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 
ARCHSUBDIR=     ${MACHINE_CPU}
.else
.BEGIN:
	@echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
	@false
.endif