Skip to content

Commit d4e6045

Browse files
cesarbtorvalds
authored andcommitted
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: 6ec4476 ("Raise gcc version requirement to 4.9") Signed-off-by: Cesar Eduardo Barros <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 355a358 commit d4e6045

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/mips/include/asm/unroll.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
* generate reasonable code for the switch statement, \
2626
* so we skip the sanity check for those compilers. \
2727
*/ \
28-
BUILD_BUG_ON((CONFIG_CLANG_VERSION >= 80000) && \
28+
BUILD_BUG_ON((CONFIG_CC_IS_GCC || \
29+
CONFIG_CLANG_VERSION >= 80000) && \
2930
!__builtin_constant_p(times)); \
3031
\
3132
switch (times) { \

0 commit comments

Comments
 (0)