linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Restore gcc check in mips asm/unroll.h
@ 2020-07-09 22:11 Cesar Eduardo Barros
  2020-07-10  0:53 ` Linus Torvalds
  2020-07-10 22:34 ` [PATCH] mips: Remove compiler check in unroll macro Nathan Chancellor
  0 siblings, 2 replies; 8+ messages in thread
From: Cesar Eduardo Barros @ 2020-07-09 22:11 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Cesar Eduardo Barros

While raising the gcc version requirement to 4.9, the compile-time check
in the unroll macro was accidentally changed from being used on gcc and
clang to being used on clang only.

Restore the gcc check, changing it from "gcc >= 4.7" to "all gcc".

Fixes: 6ec4476ac825 ("Raise gcc version requirement to 4.9")
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.eti.br>
---
 arch/mips/include/asm/unroll.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/unroll.h b/arch/mips/include/asm/unroll.h
index 8ed660adc84f..49009319ac2c 100644
--- a/arch/mips/include/asm/unroll.h
+++ b/arch/mips/include/asm/unroll.h
@@ -25,7 +25,8 @@
 	 * generate reasonable code for the switch statement,	\
 	 * so we skip the sanity check for those compilers.	\
 	 */							\
-	BUILD_BUG_ON((CONFIG_CLANG_VERSION >= 80000) &&		\
+	BUILD_BUG_ON((CONFIG_CC_IS_GCC ||			\
+		      CONFIG_CLANG_VERSION >= 80000) &&		\
 		     !__builtin_constant_p(times));		\
 								\
 	switch (times) {					\
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-11  3:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] mips: Remove compiler check in unroll macro Nathan Chancellor
2020-07-10 22:43   ` Linus Torvalds
2020-07-11  2:15     ` Nathan Chancellor

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).