[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11D1B8A01F6006BF+20250214095523.175229-1-wangyuli@uniontech.com>
Date: Fri, 14 Feb 2025 17:55:22 +0800
From: WangYuli <wangyuli@...ontech.com>
To: wangyuli@...ontech.com
Cc: chenlinxuan@...ontech.com,
guanwentao@...ontech.com,
linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org,
macro@...am.me.uk,
masahiroy@...nel.org,
niecheng1@...ontech.com,
tsbogend@...ha.franken.de,
zhanjun@...ontech.com
Subject: [PATCH v2 1/2] MIPS: dec: Only check -msym32 when need compiler
During make modules_install, the need-compiler variable becomes null,
so Makefile.compiler isn't included.
This results in call cc-option-yn returning nothing.
To get rid of spurious "CONFIG_CPU_DADDI_WORKAROUNDS unsupported
without -msym32" error, just wrap it into `ifdef need-compiler'.
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2502120612000.65342@angie.orcam.me.uk/
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2307180025120.62448@angie.orcam.me.uk/
Fixes: 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed")
Fixes: 18ca63a2e23c ("MIPS: Probe toolchain support of -msym32")
Reported-by: Maciej W. Rozycki <macro@...am.me.uk>
Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/
Co-developed-by: Chen Linxuan <chenlinxuan@...ontech.com>
Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
arch/mips/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index be8cb44a89fd..4d8339d2f20f 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -304,8 +304,12 @@ ifdef CONFIG_64BIT
ifeq ($(KBUILD_SYM32), y)
cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
else
- ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
- $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+# Do not fiddle with the compilation flags when no compiler is
+# going to be used. To get rid of spurious errors.
+ ifdef need-compiler
+ ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
+ $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+ endif
endif
endif
endif
--
2.47.2
Powered by blists - more mailing lists