]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Make 'cc-option' work correctly for the -Wno-xyzzy pattern
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 May 2025 21:35:51 +0000 (14:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 May 2025 21:35:51 +0000 (14:35 -0700)
commit550ccb178de2f379f5e1a1833dd6f4bdafef4b68
treee5616f0b392463705b444df5f42506a8328756f8
parent015a99fa76650e7d6efa3e36f20c0f5b346fe9ce
Make 'cc-option' work correctly for the -Wno-xyzzy pattern

This is the follow-up to commit a79be02bba5c ("Fix mis-uses of
'cc-option' for warning disablement") where I mentioned that the best
fix would be to just make 'cc-option' a bit smarter, and work for all
compiler options, including the '-Wno-xyzzy' pattern that it used to
accept unknown options for.

It turns out that fixing cc-option is pretty straightforward: just
rewrite any '-Wno-xyzzy' option pattern to use '-Wxyzzy' instead for
testing.

That makes the whole artificial distinction between 'cc-option' and
'cc-disable-warning' go away, and we can happily forget about the odd
build rule that you have to treat compiler options that disable warnings
specially.

The 'cc-disable-warning' helper remains as a backwards compatibility
syntax for now, but is implemented in terms of the new and improved
cc-option.

Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/Makefile.compiler