[PATCH 6/6] kbuild: set SRCARCH=arm when ARCH=arm64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 477741a72..16b23c107 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.
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux