xref: /OK3568_Linux_fs/kernel/scripts/subarch.include (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SUBARCH tells the usermode build what the underlying arch is.  That is set
2*4882a593Smuzhiyun# first, and if a usermode build is happening, the "ARCH=um" on the command
3*4882a593Smuzhiyun# line overrides the setting of ARCH below.  If a native build is happening,
4*4882a593Smuzhiyun# then ARCH is assigned, getting whatever value it gets normally, and
5*4882a593Smuzhiyun# SUBARCH is subsequently ignored.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunSUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
8*4882a593Smuzhiyun				  -e s/sun4u/sparc64/ \
9*4882a593Smuzhiyun				  -e s/arm.*/arm/ -e s/sa110/arm/ \
10*4882a593Smuzhiyun				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
11*4882a593Smuzhiyun				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
12*4882a593Smuzhiyun				  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
13*4882a593Smuzhiyun				  -e s/riscv.*/riscv/)
14