Skip to content

Commit 158ea2d

Browse files
GustavoARSilvatorvalds
authored andcommitted
kbuild: Fix -Wimplicit-fallthrough=5 error for GCC 5.x and 6.x
-Wimplicit-fallthrough=5 was under cc-option because it was only available in GCC 7.x and newer so the build is now broken for GCC 5.x and 6.x: gcc: error: unrecognized command line option '-Wimplicit-fallthrough=5'; did you mean '-Wno-fallthrough'? Fix this by moving -Wimplicit-fallthrough=5 under cc-option. Fixes: dee2b70 ("kconfig: Add support for -Wimplicit-fallthrough") Reported-by: Nathan Chancellor <[email protected]> Co-developed-by: Nathan Chancellor <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent fa55b7d commit 158ea2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ config CC_HAS_INT128
887887

888888
config CC_IMPLICIT_FALLTHROUGH
889889
string
890-
default "-Wimplicit-fallthrough=5" if CC_IS_GCC
890+
default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
891891
default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
892892

893893
#

0 commit comments

Comments
 (0)