diff options
author | Nick Desaulniers <nick.desaulniers@gmail.com> | 2024-09-06 14:01:28 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-09-10 07:56:37 +0300 |
commit | 8a62d44588451095fd6645d6ed7ff8761edf62aa (patch) | |
tree | 98904fe0973101986aa541fc28ebf07cc12e6b4d /scripts/subarch.include | |
parent | 16ff3f606c7e639d815ede92c258b63484242783 (diff) | |
download | linux-8a62d44588451095fd6645d6ed7ff8761edf62aa.tar.xz |
scripts: subarch.include: fix SUBARCH on macOS hosts
When building the Linux kernel on an aarch64 macOS based host, if we don't
specify a value for ARCH when invoking make, we default to arm and thus
multi_v7_defconfig rather than the expected arm64 and arm64's defconfig.
This is because subarch.include invokes `uname -m` which on MacOS hosts
evaluates to `arm64` but on Linux hosts evaluates to `aarch64`,
This allows us to build ARCH=arm64 natively on macOS (as in ARCH need
not be specified on an aarch64-based system).
Avoid matching arm64 by excluding it from the arm.* sed expression.
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Suggested-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/subarch.include')
-rw-r--r-- | scripts/subarch.include | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/subarch.include b/scripts/subarch.include index 4bd327d0ae42..c4592d59d69b 100644 --- a/scripts/subarch.include +++ b/scripts/subarch.include @@ -6,7 +6,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e /^arm64$$/!s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ |