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