mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com,
	Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH] MIPS: Add comment about CONFIG_MIPS32_O32 in loongson3_defconfig when build with Clang
Date: Wed, 3 Mar 2021 22:18:52 -0700	[thread overview]
Message-ID: <20210304051852.6gf7ry26n3fct3ud@archlinux-ax161> (raw)
In-Reply-To: <958c5df5-76aa-9161-9519-07a03ee864a0@loongson.cn>

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
> 

  reply	other threads:[~2021-03-04  5:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  1:15 Tiezhu Yang
2021-03-04  2:02 ` Nathan Chancellor
2021-03-04  3:48   ` Tiezhu Yang
2021-03-04  5:18     ` Nathan Chancellor [this message]
2021-03-04 23:08 ` Maciej W. Rozycki
2021-03-05  2:22   ` Jiaxun Yang
2021-03-05  2:46     ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210304051852.6gf7ry26n3fct3ud@archlinux-ax161 \
    --to=nathan@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=ndesaulniers@google.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®