From: Nathan Chancellor <nathan@kernel.org>
To: tsbogend@alpha.franken.de, jiaxun.yang@flygoat.com
Cc: linux-mips@vger.kernel.org, llvm@lists.linux.dev,
patches@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH] MIPS: generic: Do not select CPUs that are unsupported in clang
Date: Thu, 06 Apr 2023 13:09:15 -0700 [thread overview]
Message-ID: <20230406-mips-clang-generic-selects-fix-v1-1-811690c9fb69@kernel.org> (raw)
When building allnoconfig with clang after commit de34007751aa ("MIPS:
generic: Enable all CPUs supported by virt board in Kconfig"), the
following error occurs:
error: unknown target CPU 'r4600'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
Working around that, there are similar errors for 'loongson2e' and
'loongson2f'.
These CPUs are not supported in clang/LLVM, so do not select support for
them in MIPS_GENERIC_KERNEL when building with clang.
Fixes: de34007751aa ("MIPS: generic: Enable all CPUs supported by virt board in Kconfig")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/mips/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index a975f140ae82..84de20f48b59 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -154,15 +154,15 @@ config MIPS_GENERIC_KERNEL
select SMP_UP if SMP
select SWAP_IO_SPACE
select SYS_HAS_CPU_CAVIUM_OCTEON
- select SYS_HAS_CPU_LOONGSON2E
- select SYS_HAS_CPU_LOONGSON2F
+ select SYS_HAS_CPU_LOONGSON2E if !CC_IS_CLANG
+ select SYS_HAS_CPU_LOONGSON2F if !CC_IS_CLANG
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2
select SYS_HAS_CPU_MIPS32_R6
select SYS_HAS_CPU_MIPS64_R1
select SYS_HAS_CPU_MIPS64_R2
select SYS_HAS_CPU_MIPS64_R6
- select SYS_HAS_CPU_R4X00
+ select SYS_HAS_CPU_R4X00 if !CC_IS_CLANG
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
---
base-commit: 045c340c86f8a9d7cb675e179dc6297caa6ebc01
change-id: 20230406-mips-clang-generic-selects-fix-a2f7b3216d18
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
next reply other threads:[~2023-04-06 20:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 20:09 Nathan Chancellor [this message]
2023-04-06 20:59 ` [PATCH] MIPS: generic: Do not select CPUs that are unsupported in clang Jiaxun Yang
2023-04-06 21:09 ` Nathan Chancellor
2023-04-06 21:19 ` Jiaxun Yang
2023-04-06 21:30 ` Jiaxun Yang
2023-04-06 21:39 ` Nathan Chancellor
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=20230406-mips-clang-generic-selects-fix-v1-1-811690c9fb69@kernel.org \
--to=nathan@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-mips@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=patches@lists.linux.dev \
--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 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.