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