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>
1 parent 6ad4f5f commit 1616d46052efae72587fb6da5f4fd117f91ce6f8
@Masahiro Yamada Masahiro Yamada authored on 24 Apr 2020
Sascha Hauer committed on 27 Apr 2020
Showing 3 changed files
View
Makefile
View
images/Makefile
View
scripts/Makefile.build