[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2307181515260.61566@angie.orcam.me.uk>
Date: Tue, 18 Jul 2023 15:37:27 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
cc: Jan-Benedict Glaw <jbglaw@...-owl.de>,
Guillaume Tucker <guillaume.tucker@...labora.com>,
Huacai Chen <chenhuacai@...ngson.cn>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] Revert MIPS: Loongson: Fix build error when make
modules_install
Revert commit 531b3d1195d0 ("MIPS: Loongson: Fix build error when make
modules_install"), which made `-march=loongson2e', `-march=loongson2f',
and `-march=loongson3a' compilation options probed for even though GCC
has supported them since 4.4.0, 4.4.0, and 4.6.0 respectively, which is
below our current minimum requirement of 5.1, in an attempt to work
around for the `cc-option' `make' function being undefined with `make'
targets that do not use the compiler. The workaround has now been made
obsolete, by querying the `need-compiler' variable instead so as to make
sure the compiler isn't called for non-build targets.
Verified with `fuloong2e_defconfig' and the `modules_install' target.
Signed-off-by: Maciej W. Rozycki <macro@...am.me.uk>
---
arch/mips/Makefile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Index: linux-macro/arch/mips/Makefile
===================================================================
--- linux-macro.orig/arch/mips/Makefile
+++ linux-macro/arch/mips/Makefile
@@ -181,12 +181,16 @@ endif
cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap
-cflags-$(CONFIG_CPU_LOONGSON2E) += $(call cc-option,-march=loongson2e) -Wa,--trap
-cflags-$(CONFIG_CPU_LOONGSON2F) += $(call cc-option,-march=loongson2f) -Wa,--trap
-cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap
+cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e -Wa,--trap
+cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f -Wa,--trap
# Some -march= flags enable MMI instructions, and GCC complains about that
# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi)
+ifdef CONFIG_CPU_LOONGSON64
+cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
+cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
+cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
+endif
cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi)
cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)
Powered by blists - more mailing lists