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