kbuild: remove ARCH=sh64 support from top Makefile
Subsystems (6)
PATCH 1/2 kbuild: remove ARCH=sh64 support from top Makefile
Commit 37744feebc08 ("sh: remove sh5 support") removed the SUPERH64 support entirely.
Remove the left-over code from the top Makefile.
---
Makefile | 5 ----- 1 file changed, 5 deletions(-)
Makefile +0 -5
@@ -399,11 +399,6 @@ ifeq ($(ARCH),sparc64) SRCARCH := sparc endif -# Additional ARCH settings for sh -ifeq ($(ARCH),sh64) - SRCARCH := sh -endif - export cross_compiling := ifneq ($(SRCARCH),$(SUBARCH)) cross_compiling := 1
Signature · 1 line
2.27.0
PATCH 2/2 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.
---
arch/m68k/Makefile | 2 +- arch/mips/Makefile | 2 +- arch/parisc/Makefile | 2 +- arch/sh/Makefile | 2 +- arch/xtensa/Makefile | 6 +----- 5 files changed, 5 insertions(+), 9 deletions(-)
arch/m68k/Makefile +1 -1
@@ -16,7 +16,7 @@ KBUILD_DEFCONFIG := multi_defconfig -ifneq ($(SUBARCH),$(ARCH)) +ifdef cross_compiling ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(call cc-cross-prefix, \ m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
arch/mips/Makefile +1 -1
@@ -50,7 +50,7 @@ tool-archpref = $(64bit-tool-archpref) UTS_MACHINE := mips64 endif -ifneq ($(SUBARCH),$(ARCH)) +ifdef cross_compiling ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-) endif
arch/parisc/Makefile +1 -1
@@ -41,7 +41,7 @@ endif export LD_BFD -ifneq ($(SUBARCH),$(UTS_MACHINE)) +ifdef cross_compiling ifeq ($(CROSS_COMPILE),) CC_SUFFIXES = linux linux-gnu unknown-linux-gnu CROSS_COMPILE := $(call cc-cross-prefix, \
arch/sh/Makefile +1 -1
@@ -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
arch/xtensa/Makefile +1 -5
@@ -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
Signature · 1 line
2.27.0
Re: [PATCH 2/2] arch: use cross_compiling to check whether it is a cross build or not
Hi Yamada-san,
Quoted 9 lines · Masahiro Yamada
'
cross_compiling' is defined by the topMakefileand 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.
Quoted 7 lines
This is rather a fix for parisc because
arch/parisc/MakefiledefinesUTS_MATCHINEdepending onCONFIG_64BIT, therefore cc-cross-prefix is not working inKconfigtime.Signed-off-by Masahiro Yamada <[email protected]>arch/m68k/Makefile | 2 +-
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 2/2] arch: use cross_compiling to check whether it is a cross build or not
In reply to Masahiro YamadaQuoted 9 lines · Masahiro Yamada
'
cross_compiling' is defined by the topMakefileand 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.
Quoted 8 lines
This is rather a fix for parisc because
arch/parisc/MakefiledefinesUTS_MATCHINEdepending onCONFIG_64BIT, therefore cc-cross-prefix is not working inKconfigtime.Signed-off-by Masahiro Yamada <[email protected]>arch/m68k/Makefile | 2 +- arch/mips/Makefile | 2 +- arch/parisc/Makefile | 2 +-
Thanks!
Helge
Re: [PATCH 2/2] arch: use cross_compiling to check whether it is a cross build or not
In reply to Masahiro YamadaQuoted 15 lines · Masahiro Yamada
'
cross_compiling' is defined by the topMakefileand 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/MakefiledefinesUTS_MATCHINEdepending onCONFIG_64BIT, therefore cc-cross-prefix is not working inKconfigtime.Signed-off-by Masahiro Yamada <[email protected]>
Quoted 8 lines
---
arch/m68k/Makefile | 2 +- arch/mips/Makefile | 2 +- arch/parisc/Makefile | 2 +- arch/sh/Makefile | 2 +- arch/xtensa/Makefile | 6 +----- 5 files changed, 5 insertions(+), 9 deletions(-)
Signature · 2 lines
Thanks. -- Max
Re: [PATCH 2/2] arch: use cross_compiling to check whether it is a cross build or not
In reply to Masahiro YamadaQuoted 7 lines · Masahiro Yamada
'
cross_compiling' is defined by the topMakefileand 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.
Quoted 7 lines
No functional change is intended for xtensa, either.
This is rather a fix for parisc because
arch/parisc/MakefiledefinesUTS_MATCHINEdepending onCONFIG_64BIT, therefore cc-cross-prefix is not working inKconfigtime.Signed-off-by Masahiro Yamada <[email protected]>
Tried the patch in my sh build, the result built and booted.
Rob
Quoted 7 lines · Masahiro Yamada
Commit
37744feebc08("sh: remove sh5 support") removed the SUPERH64 support entirely.Remove the left-over code from the top
Makefile.Signed-off-by Masahiro Yamada <[email protected]>
Good catch!
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Masahiro Yamada
Commit
37744feebc08("sh: remove sh5 support") removed the SUPERH64 support entirely.
Quoted 7 lines
Quoted 3 lines
Remove the left-over code from the top
Makefile.Signed-off-by Masahiro Yamada <[email protected]>Good catch!
Acked-by Arnd Bergmann <[email protected]>
Applied to linux-kbuild.
Signature · 2 lines
Best Regards Masahiro Yamada