blob: 776849a3c500fb8d9e419ab29aeadac380de5614 [file] [log] [blame]
Anders Roxellb2d35fa2018-09-04 12:47:21 +02001# SUBARCH tells the usermode build what the underlying arch is. That is set
2# first, and if a usermode build is happening, the "ARCH=um" on the command
3# line overrides the setting of ARCH below. If a native build is happening,
4# then ARCH is assigned, getting whatever value it gets normally, and
5# SUBARCH is subsequently ignored.
6
7SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
8 -e s/sun4u/sparc64/ \
9 -e s/arm.*/arm/ -e s/sa110/arm/ \
Masahiro Yamada5f6e0fe2021-06-10 11:03:31 +090010 -e s/s390x/s390/ \
Anders Roxellb2d35fa2018-09-04 12:47:21 +020011 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
12 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
13 -e s/riscv.*/riscv/)