summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-25 03:59:24 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:16:59 +0200
commit504687e7c63f138b3747fd07358ad2c3cdd1b2f5 (patch)
tree736adb37eec68b15d4f8bc43004887b25c29789a /Makefile
parent1616d46052efae72587fb6da5f4fd117f91ce6f8 (diff)
downloadbarebox-504687e7c63f138b3747fd07358ad2c3cdd1b2f5.tar.gz
barebox-504687e7c63f138b3747fd07358ad2c3cdd1b2f5.tar.xz
kbuild: set SRCARCH=arm when ARCH=arm64
In Linux, ARCH can be passed from the command line or the environment. In barebox, "ARCH=arm64 make" works, but "make ARCH=arm64" does not. Instead of overriding ARCH, use SRCARCH properly. This is what Linux does for biarch directories (x86, sh, sparc). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 477741a72c..16b23c107b 100644
--- a/Makefile
+++ b/Makefile
@@ -163,10 +163,6 @@ export srctree objtree VPATH
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
-ifeq ($(ARCH),arm64)
-ARCH = arm
-endif
-
ARCH ?= sandbox
CROSS_COMPILE ?=
@@ -174,6 +170,10 @@ CROSS_COMPILE ?=
UTS_MACHINE := $(ARCH)
SRCARCH := $(ARCH)
+ifeq ($(ARCH),arm64)
+ SRCARCH := arm
+endif
+
KCONFIG_CONFIG ?= .config
# Default file for 'make defconfig'. This may be overridden by arch-Makefile.