diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-05-01 19:24:36 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-05-05 18:49:13 +0200 |
commit | 23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3 (patch) | |
tree | 5b5826ec25ead8f16c04b1be5e8e4a30ad7b53d2 /arch/sh | |
parent | kbuild: remove ARCH=sh64 support from top Makefile (diff) | |
download | linux-23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3.tar.xz linux-23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3.zip |
arch: use cross_compiling to check whether it is a cross build or not
'cross_compiling' is defined by the top Makefile and available for
arch Makefiles to check whether it is a cross build or not. A good
thing is the variable name 'cross_compiling' is self-documenting.
This is a simple replacement for m68k, mips, sh, for which $(ARCH)
and $(SRCARCH) always match.
No functional change is intended for xtensa, either.
This is rather a fix for parisc because arch/parisc/Makefile defines
UTS_MATCHINE depending on CONFIG_64BIT, therefore cc-cross-prefix
is not working in Kconfig time.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Helge Deller <deller@gmx.de> # parisc
Acked-by: Max Filippov <jcmvbkbc@gmail.com> # xtensa
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 3bcbf52fb30e..44bcb80e791a 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -9,7 +9,7 @@ # License. See the file "COPYING" in the main directory of this archive # for more details. # -ifneq ($(SUBARCH),$(ARCH)) +ifdef cross_compiling ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(call cc-cross-prefix, sh-linux- sh-linux-gnu- sh-unknown-linux-gnu-) endif |