summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorCesar Eduardo Barros <cesarb@cesarb.eti.br>2020-07-09 19:11:02 -0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-07-09 18:03:47 -0700
commitd4e60453266b95b9dc19e0af2a819617e556bc4e (patch)
tree9df019abe251e02bdeb454d0f3d41b4319b8b21f /arch
parent355a3587d4ca09f2b1014778a7c8908351a91468 (diff)
Restore gcc check in mips asm/unroll.h
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". [ We should probably remove this all entirely: if we remove the check for CLANG, then the check for GCC can go away. Older versions of clang are not really appropriate or supported for kernel builds - Linus ] Fixes: 6ec4476ac825 ("Raise gcc version requirement to 4.9") Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.eti.br> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/unroll.h3
1 files changed, 2 insertions, 1 deletions
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) { \