From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com,
Xuefeng Li <lixuefeng@loongson.cn>
Subject: [PATCH v3] MIPS: Make MIPS32_O32 depends on !CC_IS_CLANG
Date: Thu, 4 Mar 2021 16:04:00 +0800 [thread overview]
Message-ID: <1614845040-12995-1-git-send-email-yangtiezhu@loongson.cn> (raw)
When building with Clang [1]:
$ 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 because GCC works, as Nathan said, the config
should not even be selectable when building with Clang, so
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>
Acked-by: Nathan Chancellor <nathan@kernel.org>
---
v3: Update the commit message suggested by Nathan, thank you!
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
next reply other threads:[~2021-03-04 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 8:04 Tiezhu Yang [this message]
2021-03-04 17:37 ` [PATCH v3] MIPS: Make MIPS32_O32 depends on !CC_IS_CLANG Nick Desaulniers
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=1614845040-12995-1-git-send-email-yangtiezhu@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=tsbogend@alpha.franken.de \
/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;
as well as URLs for NNTP newsgroup(s).