Search notes:

scripts/subarch.include

scripts/subarch.include is included from the top-level Makefile (if not a so-called mixed-build) and determines the value of SUBARCH (basically with a variation of uname -m)
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.
The value of SUBARCH is also used to set the value of ARCH if not overridden with make ARCH=….

Index