Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gcc-plugins: allow to enable GCC_PLUGINS for COMPILE_TEST

Now that the compiler's plugin support is checked in Kconfig,
all{yes,mod}config will not be bothered.

Remove 'depends on !COMPILE_TEST' for GCC_PLUGINS.

'depends on !COMPILE_TEST' for the following three are still kept:
GCC_PLUGIN_CYC_COMPLEXITY
GCC_PLUGIN_STRUCTLEAK_VERBOSE
GCC_PLUGIN_RANDSTRUCT_PERFORMANCE

Kees suggested to do so because the first two are too noisy, and the
last one would reduce the compile test coverage. I commented the
reasons in arch/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>

+3 -4
+3 -4
arch/Kconfig
··· 417 417 bool "GCC plugins" 418 418 depends on HAVE_GCC_PLUGINS 419 419 depends on PLUGIN_HOSTCC != "" 420 - depends on !COMPILE_TEST 421 420 help 422 421 GCC plugins are loadable modules that provide extra features to the 423 422 compiler. They are useful for runtime instrumentation and static analysis. ··· 426 427 config GCC_PLUGIN_CYC_COMPLEXITY 427 428 bool "Compute the cyclomatic complexity of a function" if EXPERT 428 429 depends on GCC_PLUGINS 429 - depends on !COMPILE_TEST 430 + depends on !COMPILE_TEST # too noisy 430 431 help 431 432 The complexity M of a function's control flow graph is defined as: 432 433 M = E - N + 2P ··· 493 494 config GCC_PLUGIN_STRUCTLEAK_VERBOSE 494 495 bool "Report forcefully initialized variables" 495 496 depends on GCC_PLUGIN_STRUCTLEAK 496 - depends on !COMPILE_TEST 497 + depends on !COMPILE_TEST # too noisy 497 498 help 498 499 This option will cause a warning to be printed each time the 499 500 structleak plugin finds a variable it thinks needs to be ··· 533 534 config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE 534 535 bool "Use cacheline-aware structure randomization" 535 536 depends on GCC_PLUGIN_RANDSTRUCT 536 - depends on !COMPILE_TEST 537 + depends on !COMPILE_TEST # do not reduce test coverage 537 538 help 538 539 If you say Y here, the RANDSTRUCT randomization will make a 539 540 best effort at restricting randomization to cacheline-sized