summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
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 /scripts/Makefile.build
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 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build2
1 files changed, 1 insertions, 1 deletions
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) \