Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1245855pxb; Thu, 4 Mar 2021 07:00:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwR4bOEdvqUdglSGL7TnsCX22C4xJ7AmM62qtnXLlnwJKQmgWUhXj2r4+zSJvnc1fsdZU3R X-Received: by 2002:a17:907:da1:: with SMTP id go33mr4579400ejc.488.1614870046403; Thu, 04 Mar 2021 07:00:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614870046; cv=none; d=google.com; s=arc-20160816; b=ZC0jaQmISACx715paP+0dI65jnQvP0srAoponqNXCJoj+Dp6IoULqW3hHFj+mFa+AT gAaUfTJbmMmGS/ztdVWY7PPVEkBWRYXY5G5ArMBt2g0KNuppr8HDj4JbSnpvg8D1DSwR 9nogrXL7SSRSz73GH4DvoRDwjInT8B1+qEeUpssmOqJVhrGndjIBKy9IK0lcwkY9VmqF RAcpTRfwmMbzUBkhAMC7DLa+jOEErY9wOMXt0X07dvuGd7CiYTxf5Xb4rqS+tP5KNGHQ +RsohIDsKYt7qAvfSdfGe3P0o/nG6cq0cWrh5qNLfNnSGn7ifisBLnos/Soml9l9KWbX CQaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=en0KpVrwC/nthRbafbg21u1PrVXS63VIb1LgHZTVyEI=; b=efEU9bFL7lIUV/8xG2QWw8ze4D6BPhuWqkpymkBTf7eMxpgpw09/66mE0Q0kIEIQoh tL/xvt36AMEH1rHb0iV4RWZlDiSrAROiO0k2KCwaWwDxYB5bzzs1Wll1lOAIJMvR79Pd iqMu8cp4ER993gb8jId/S3oCAGOZPPdSPuWfrDVa6TC6yZ1URpfe7FuB7k/QaFYKjnmH oUWcwphgtJb7AkGDTFWKgJS9InXuuk6zugHCifF/b+gwQo22a0ntTrvz44WlNVktAg5F yHpIjGJxE6uePoQ4snppSP7Mh9u570MLB6zALRMmym99txHMq/akkndEaIuKOrtP4HyH ZKSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfhmrj4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si2029017ejk.27.2021.03.04.07.00.20; Thu, 04 Mar 2021 07:00:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfhmrj4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234101AbhCDFTw (ORCPT + 99 others); Thu, 4 Mar 2021 00:19:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:58560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234076AbhCDFTh (ORCPT ); Thu, 4 Mar 2021 00:19:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DAA6964EE1; Thu, 4 Mar 2021 05:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614835137; bh=ks396mxGbJMDwWqDM77TaVb8yzjRnPxdJhthci3VPbk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cfhmrj4+vqKGW5GDt2BkhI6povBO+2MCsBi0yGxi3sIo4iCIaBED9PpT9H+e9+Sjw 18EDHsRpCWUxblIOEQBG3YoK0CwQ4S5yg3jGakpRXzobsW4DonxGRu+Fg4pS3c09py zUryEzu4Elq+LGHXUhTG0xi6Hgoof4c2aNSAZmIOvFDtR/pw7UGW0DfOPzMR1hPQFb 7D2uIUwghEvyMB0rDlhRFTpSJWwjxTu8UKMSpUaSNbib0z1R3OfdaBhcoq3HZQu8Yq 0I4A+N+lB8zh09X38nWyDSt8owVluIIDjhppRtQmUDKcolcSVE8s6csleQdSwLcOD7 zEdFsLRSK2eAA== Date: Wed, 3 Mar 2021 22:18:52 -0700 From: Nathan Chancellor To: Tiezhu Yang Cc: Thomas Bogendoerfer , Nick Desaulniers , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Xuefeng Li Subject: Re: [PATCH] MIPS: Add comment about CONFIG_MIPS32_O32 in loongson3_defconfig when build with Clang Message-ID: <20210304051852.6gf7ry26n3fct3ud@archlinux-ax161> References: <1614820544-10686-1-git-send-email-yangtiezhu@loongson.cn> <20210304020244.pza6xd4ixziysrom@archlinux-ax161> <958c5df5-76aa-9161-9519-07a03ee864a0@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <958c5df5-76aa-9161-9519-07a03ee864a0@loongson.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 04, 2021 at 11:48:09AM +0800, Tiezhu Yang wrote: > On 03/04/2021 10:02 AM, Nathan Chancellor wrote: > > On Thu, Mar 04, 2021 at 09:15:44AM +0800, Tiezhu Yang wrote: > > > When build kernel with Clang [1]: > > > > > > $ make CC=clang loongson3_defconfig > > > $ make CC=clang > > [snip] > > > I think this might be a better solution. I know that I personally never > > read defconfig files if a build fails. > > > > If CONFIG_MIPS32_O32 is broken with clang and the MIPS backend > > maintainer has said that it will not be supported due to lack of > > resources, then the config should not even be selectable in my opinion. > > > > Cheers, > > Nathan > > > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > > index d89efba3d8a4..ed35318a759d 100644 > > --- a/arch/mips/Kconfig > > +++ b/arch/mips/Kconfig > > @@ -3315,6 +3315,8 @@ config SYSVIPC_COMPAT > > config MIPS32_O32 > > bool "Kernel support for o32 binaries" > > depends on 64BIT > > + # https://bugs.llvm.org/show_bug.cgi?id=38063 > > + depends on $(success,$(CC) $(CLANG_FLAGS) -march=mips64 -o32 -c -x c /dev/null -o /dev/null) > > select ARCH_WANT_OLD_COMPAT_IPC > > select COMPAT > > select MIPS32_COMPAT > > Hi Nathan, > > Thank you very much for your reply and suggestion, maybe the following > change is simple, clear and better? If yes, I will send v2 later. Hi Tiezhu, I think that the change is simpler but better is subjective. I tend to prefer tests like mine so that it is not dependent on someone going "oh hey, this LLVM bug has been fixed so we can turn this config on!". Instead, the config will just turn on automatically as soon as that bug is fixed. However, in this particular case, it does not seem like that will happen unless someone steps but there have been times where an independent party will implement some change that benefits them and nobody notices for a while. Plus, I periodically grep the tree for CC_IS_CLANG to see if there are any configuration options that can be re-enabled.. Regardless, if Thomas is happy with the below change, so am I, as it will allow us to test more 64-bit MIPS configurations. I can add an ack or review at that point in time. Cheers, Nathan > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index 3a38d27..f6ba59f 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -3318,6 +3318,8 @@ config SYSVIPC_COMPAT > config MIPS32_O32 > bool "Kernel support for o32 binaries" > depends on 64BIT > + # https://bugs.llvm.org/show_bug.cgi?id=38063 > + depends on !CC_IS_CLANG > select ARCH_WANT_OLD_COMPAT_IPC > select COMPAT > select MIPS32_COMPAT > > Thanks, > Tiezhu >