summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2021-05-02 02:24:36 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2021-05-06 01:49:13 +0900
commit23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3 (patch)
tree5b5826ec25ead8f16c04b1be5e8e4a30ad7b53d2 /arch/xtensa/Makefile
parent45799491a92174ff78d9c46de55d614814bdd3e1 (diff)
downloadlinux-23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3.tar.gz
linux-23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3.tar.bz2
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/xtensa/Makefile')
-rw-r--r--arch/xtensa/Makefile6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index ba9fee75e675..e9c8f064c44d 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -19,12 +19,8 @@ variant-y := $(patsubst "%",%,$(CONFIG_XTENSA_VARIANT_NAME))
VARIANT = $(variant-y)
export VARIANT
-# Test for cross compiling
-
ifneq ($(VARIANT),)
- COMPILE_ARCH = $(shell uname -m)
-
- ifneq ($(COMPILE_ARCH), xtensa)
+ ifdef cross_compiling
ifndef CROSS_COMPILE
CROSS_COMPILE = xtensa_$(VARIANT)-
endif