From nobody Tue Dec 16 17:01:42 2025 Received: from smtpbgeu1.qq.com (smtpbgeu1.qq.com [52.59.177.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9319F510; Tue, 22 Apr 2025 10:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.59.177.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745317446; cv=none; b=Qn+PO1I8tSCoc6LXTjukJiFsArBXq5A13fMt4IcZKgpyGcf0rvsyr4Q00OpaHCoa00YesYDBo757YEVQOQo362entLTl/or+ssO28ltmvhqQu8H5ySDJKAxaWqcAI5B2UYR4xcz9RCtFoRwLqbMdpGZ1np6Q39/E3xmLxMHfh5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745317446; c=relaxed/simple; bh=QwylYaArHciXtrOfCdsCAGn0Ril2BBTKFUXlFhVuIeU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tRoUwXUHJXzaReHLq0b3sP6aO+hDvOBJzgU19tQLdXkAyuU2rqiM5fxuqBCIaHAUWOfD4TGO05iqXXqfUwuYbqvU3h9NqLxUvjdgPFGoR+tUEdgzD9CfhLfMX98+Ll0N5CamDPLWetKrS+9PC6LJSV+3ofAEccYeOQXBWwxZXxs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=dF6E9pqh; arc=none smtp.client-ip=52.59.177.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="dF6E9pqh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1745317427; bh=WlmB1lqRNxFbFMYPeJr4njtQ9mNImQJWs4aHfijngHw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=dF6E9pqhaG9bHpdcJOM0lqVFCn5WstacrdMGBx5UtVbSG0mR3uxySrdxgzcuawbsg G/Jx9/RQyZH33e88TjmdkiLrZexRmDCMB/c0+apfYG7IZlgnkddnPvmHWrmmtH1bkk XJLidj+5g9mvpajBWxa0M400uL/sgC1uWH8LWUMc= X-QQ-mid: zesmtpip4t1745317380te5bc3dce X-QQ-Originating-IP: WcYi1NZqqtZuTN8yyNwmSTGUPHkECqFH8z/doLuEEKY= Received: from localhost.localdomain ( [localhost]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 22 Apr 2025 18:22:58 +0800 (CST) X-QQ-SSF: 0002000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 8748779318587994258 EX-QQ-RecipientCnt: 9 From: WangYuli To: wangyuli@uniontech.com Cc: guanwentao@uniontech.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, macro@orcam.me.uk, niecheng1@uniontech.com, tsbogend@alpha.franken.de, zhanjun@uniontech.com, Chen Linxuan Subject: [PATCH v2 1/6] MIPS: dec: Only check -msym32 when need compiler Date: Tue, 22 Apr 2025 18:22:48 +0800 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: <24EC7D2CA58B25F5+20250422101855.136675-1-wangyuli@uniontech.com> References: <24EC7D2CA58B25F5+20250422101855.136675-1-wangyuli@uniontech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpip:uniontech.com:q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o pWYg1v8Ry/xPYfYTs8gDfaU45vfeV+Ox0hHaE5jY0LVGe41a4V156iQ5F/V0sCdVhMWtgns IXKFGy7+t9lPTMPwF5BQlM= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= X-QQ-RECHKSPAM: 0 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. For more technical details on why need-compiler is null during =E2=80=98make modules_install=E2=80=99 and why no compiler invocation is ac= tually needed at this point, please refer to commit 4fe4a6374c4d ("MIPS: Only fiddle with CHECKFLAGS if need-compiler") and commit 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed"). Commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression") tried to fix the same issue but it caused a compile error on clang compiler because it doesn't support '-msym32'. Then, commit 18ca63a2e23c ("MIPS: Probe toolchain support of -msym32") fixed it but reintroduced the CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression. Wrapping this entire code block with #ifdef need-compiler to avoid all issues is the best solution for now. To get rid of spurious "CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32" error. 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: a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_insta= ll' regression") Reported-by: Maciej W. Rozycki Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@ang= ie.orcam.me.uk/ Co-developed-by: Chen Linxuan Signed-off-by: Chen Linxuan Signed-off-by: WangYuli --- arch/mips/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index d9057e29bc62..1fffc6cf8b52 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -284,6 +284,7 @@ entry-y =3D $(shell $(objtree)/arch/mips/tools/elf-e= ntry vmlinux) cflags-y +=3D -I$(srctree)/arch/mips/include/asm/mach-generic drivers-$(CONFIG_PCI) +=3D arch/mips/pci/ =20 +ifdef need-compiler # # Automatically detect the build format. By default we choose # the elf format according to the load address. @@ -304,7 +305,8 @@ ifdef CONFIG_64BIT $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32) endif endif -endif +endif # CONFIG_64BIT +endif # need-compiler =20 # When linking a 32-bit executable the LLVM linker cannot cope with a # 32-bit load address that has been sign-extended to 64 bits. Simply --=20 2.49.0