]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 21 Feb 2019 04:13:38 +0000 (13:13 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 27 Feb 2019 12:43:20 +0000 (21:43 +0900)
commit1d87ce1ae1a7d4deb9bc81d9b9ccac3ab6633cf8
treee5115e2524486b8633a4d024e9a1d2761f3c181f
parentc2ca74fabd550f635740a6a3ba5e3d84a089e740
kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig

Since -Wmaybe-uninitialized was introduced by GCC 4.7, we have patched
various false positives:

 - commit ca81ba750ad1 ("Turn off -Wmaybe-uninitialized when building
   with -Os") turned off this option for -Os.

 - commit 996f52f219a9 ("Kbuild: disable 'maybe-uninitialized' warning
   for CONFIG_PROFILE_ALL_BRANCHES") turned off this option for
   CONFIG_PROFILE_ALL_BRANCHES

 - commit 62915b141655 ("Kbuild: enable -Wmaybe-uninitialized warning
   for "make W=1"") turned off this option for GCC < 4.9
   Arnd provided more explanation in https://lkml.org/lkml/2017/3/14/903

I think this looks better by shifting the logic from Makefile to Kconfig.

Link: https://github.com/ClangBuiltLinux/linux/issues/350
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Makefile
init/Kconfig
kernel/trace/Kconfig