2018-09-04 18:47:21 +08:00
|
|
|
# SUBARCH tells the usermode build what the underlying arch is. That is set
|
|
|
|
# first, and if a usermode build is happening, the "ARCH=um" on the command
|
|
|
|
# line overrides the setting of ARCH below. If a native build is happening,
|
|
|
|
# then ARCH is assigned, getting whatever value it gets normally, and
|
|
|
|
# SUBARCH is subsequently ignored.
|
|
|
|
|
|
|
|
SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
|
|
|
|
-e s/sun4u/sparc64/ \
|
2024-09-06 19:01:28 +08:00
|
|
|
-e /^arm64$$/!s/arm.*/arm/ -e s/sa110/arm/ \
|
2021-06-10 10:03:31 +08:00
|
|
|
-e s/s390x/s390/ \
|
2018-09-04 18:47:21 +08:00
|
|
|
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
|
|
|
-e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
|
2022-05-31 18:04:11 +08:00
|
|
|
-e s/riscv.*/riscv/ -e s/loongarch.*/loongarch/)
|