mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cesar Eduardo Barros <cesarb@cesarb.eti.br>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	Cesar Eduardo Barros <cesarb@cesarb.eti.br>
Subject: [PATCH] Restore gcc check in mips asm/unroll.h
Date: Thu,  9 Jul 2020 19:11:02 -0300	[thread overview]
Message-ID: <20200709221102.323356-1-cesarb@cesarb.eti.br> (raw)

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


             reply	other threads:[~2020-07-10  4:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 22:11 Cesar Eduardo Barros [this message]
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

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=20200709221102.323356-1-cesarb@cesarb.eti.br \
    --to=cesarb@cesarb.eti.br \
    --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

all inboxes | Powered by JetHome®