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 v2] MIPS: Make MIPS32_O32 depends on !CC_IS_CLANG
Date: Wed, 3 Mar 2021 23:45:52 -0700 [thread overview]
Message-ID: <20210304064552.xzjqbhltghmd5vfa@archlinux-ax161> (raw)
In-Reply-To: <1614838778-3696-1-git-send-email-yangtiezhu@loongson.cn>
On Thu, Mar 04, 2021 at 02:19:38PM +0800, Tiezhu Yang wrote:
> When build kernel with Clang [1]:
Sorry I did not catch this in the first revision but I think this would
sound better as:
When building with Clang [1]:
I think the kernel part is obvious :) couple more comments about the
commit message inline.
>
> $ make CC=clang loongson3_defconfig
> $ make CC=clang
>
> there exists the following error:
>
> Checking missing-syscalls for O32
> CALL scripts/checksyscalls.sh
> error: ABI 'o32' is not supported on CPU 'mips64r2'
> make[1]: *** [Kbuild:48: missing-syscalls] Error 1
> make: *** [arch/mips/Makefile:419: archprepare] Error 2
>
> This is a known bug [2] with Clang, as Simon Atanasyan said,
> "There is no plan on support O32 for MIPS64 due to lack of
> resources".
>
> It is not a good idea to remove CONFIG_MIPS32_O32=y directly
> in defconfig due to GCC works well, as Nathan said, the config
in defconfig because GCC works, as...
> should not even be selectable when build kernel with Clang, so
building with Clang
> just make MIPS32_O32 depends on !CC_IS_CLANG.
>
> [1] https://www.kernel.org/doc/html/latest/kbuild/llvm.html
> [2] https://bugs.llvm.org/show_bug.cgi?id=38063
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
I don't know if Nick will have any comments but for me:
Acked-by: Nathan Chancellor <nathan@kernel.org>
I have added this patch and the LLVM bug to our issue tracker:
https://github.com/ClangBuiltLinux/linux/issues/884
> ---
> arch/mips/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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
> --
> 2.1.0
>
prev parent reply other threads:[~2021-03-04 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 6:19 [PATCH v2] MIPS: Make MIPS32_O32 depends on !CC_IS_CLANG Tiezhu Yang
2021-03-04 6:45 ` Nathan Chancellor [this message]
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=20210304064552.xzjqbhltghmd5vfa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.