From: Nathan Chancellor <natechancellor@gmail.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, cesarb@cesarb.eti.br,
clang-built-linux@googlegroups.com,
Nathan Chancellor <natechancellor@gmail.com>
Subject: [PATCH] mips: Remove compiler check in unroll macro
Date: Fri, 10 Jul 2020 15:34:41 -0700 [thread overview]
Message-ID: <20200710223441.756320-1-natechancellor@gmail.com> (raw)
In-Reply-To: <20200709221102.323356-1-cesarb@cesarb.eti.br>
CONFIG_CC_IS_GCC is undefined when Clang is used, which breaks the build
(see our Travis link below).
Clang 8 was chosen as a minimum version for this check because there
were some improvements around __builtin_constant_p in that release. In
reality, MIPS was not even buildable until clang 9 so that check was not
technically necessary. Just remove all compiler checks and just assume
that we have a working compiler.
Fixes: d4e60453266b ("Restore gcc check in mips asm/unroll.h")
Link: https://travis-ci.com/github/ClangBuiltLinux/continuous-integration/jobs/359642821
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
arch/mips/include/asm/unroll.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/mips/include/asm/unroll.h b/arch/mips/include/asm/unroll.h
index 49009319ac2c..7dd4a80e05d6 100644
--- a/arch/mips/include/asm/unroll.h
+++ b/arch/mips/include/asm/unroll.h
@@ -25,9 +25,7 @@
* generate reasonable code for the switch statement, \
* so we skip the sanity check for those compilers. \
*/ \
- BUILD_BUG_ON((CONFIG_CC_IS_GCC || \
- CONFIG_CLANG_VERSION >= 80000) && \
- !__builtin_constant_p(times)); \
+ BUILD_BUG_ON(!__builtin_constant_p(times)); \
\
switch (times) { \
case 32: fn(__VA_ARGS__); /* fall through */ \
base-commit: aa0c9086b40c17a7ad94425b3b70dd1fdd7497bf
--
2.27.0
next prev parent reply other threads:[~2020-07-10 22:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 22:11 [PATCH] Restore gcc check in mips asm/unroll.h Cesar Eduardo Barros
2020-07-10 0:53 ` Linus Torvalds
2020-07-10 18:43 ` Nick Desaulniers
2020-07-10 22:31 ` Linus Torvalds
2020-07-11 3:16 ` Nathan Chancellor
2020-07-10 22:34 ` Nathan Chancellor [this message]
2020-07-10 22:43 ` [PATCH] mips: Remove compiler check in unroll macro Linus Torvalds
2020-07-11 2:15 ` 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=20200710223441.756320-1-natechancellor@gmail.com \
--to=natechancellor@gmail.com \
--cc=cesarb@cesarb.eti.br \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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).