From 1616d46052efae72587fb6da5f4fd117f91ce6f8 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 25 Apr 2020 03:59:23 +0900 Subject: 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 Signed-off-by: Sascha Hauer --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 601a4d9cd7..57c9467691 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -175,7 +175,7 @@ cmd_modversions = \ if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ $(CPP) -D__GENKSYMS__ $(c_flags) $< \ | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ - -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \ + -T $(@D)/$(@F:.o=.symtypes)) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ -- cgit v1.2.3