summaryrefslogtreecommitdiffstats
path: root/images/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-25 03:59:23 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:16:59 +0200
commit1616d46052efae72587fb6da5f4fd117f91ce6f8 (patch)
treee95c9db97d390a7ccd8b616c8ed1d65066dff066 /images/Makefile
parent6ad4f5fe1b225eaa0f7e42839a6ee98fa15ff925 (diff)
downloadbarebox-1616d46052efae72587fb6da5f4fd117f91ce6f8.tar.gz
barebox-1616d46052efae72587fb6da5f4fd117f91ce6f8.tar.xz
kbuild: use $(SRCARCH) to point to the arch directory
A couple of arch directories in Linux are biarch, that is, a single arch/*/ directory supports both 32-bit and 64-bit. In old days of Linux, they started as separated directories. arm/arm64 is the exceptional case, but the other architectures were unified. e.g.) arch/i386, arch/x86_64 -> arch/x86 arch/sh, arch/sh64 -> arch/sh arch/sparc, arch/sparc64 -> arch/sparc Linux commit 6752ed90da03 ("Kbuild: allow arch/xxx to use a different source path") introduced SRCARCH to point to the arch directory, still allowing to pass in the former ARCH=i386 or ARCH=x86_64. The top Makefile in Linux converts ARCH to SRCARCH as follows: # Additional ARCH settings for x86 ifeq ($(ARCH),i386) SRCARCH := x86 endif ifeq ($(ARCH),x86_64) SRCARCH := x86 endif So, if you follow the upstream Kbuild convention, using arch/$(SRCARCH) is the correct way to point to the arch directory. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images/Makefile')
-rw-r--r--images/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/images/Makefile b/images/Makefile
index fe29c75e27..0aa4676aea 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -50,7 +50,7 @@ quiet_cmd_objcopy_bin = OBJCOPYB $@
pbl-lds := $(obj)/pbl.lds
extra-y += $(pbl-lds)
-$(pbl-lds): $(obj)/../arch/$(ARCH)/lib/pbl.lds.S FORCE
+$(pbl-lds): $(obj)/../arch/$(SRCARCH)/lib/pbl.lds.S FORCE
$(call if_changed_dep,cpp_lds_S)
quiet_cmd_elf__ ?= LD $@
@@ -139,8 +139,8 @@ $(obj)/%.img: $(obj)/$$(FILE_$$(@F))
$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
$(call if_changed,shipped)
-board = $(srctree)/arch/$(ARCH)/boards
-objboard = $(objtree)/arch/$(ARCH)/boards
+board = $(srctree)/arch/$(SRCARCH)/boards
+objboard = $(objtree)/arch/$(SRCARCH)/boards
include $(srctree)/images/Makefile.am33xx
include $(srctree)/images/Makefile.am35xx