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>
This commit is contained in:
Masahiro Yamada 2018-05-28 18:22:07 +09:00
parent 59f53855ba
commit 1658dcee3d
1 changed files with 3 additions and 4 deletions

View File

@ -417,7 +417,6 @@ menuconfig GCC_PLUGINS
bool "GCC plugins" bool "GCC plugins"
depends on HAVE_GCC_PLUGINS depends on HAVE_GCC_PLUGINS
depends on PLUGIN_HOSTCC != "" depends on PLUGIN_HOSTCC != ""
depends on !COMPILE_TEST
help help
GCC plugins are loadable modules that provide extra features to the GCC plugins are loadable modules that provide extra features to the
compiler. They are useful for runtime instrumentation and static analysis. compiler. They are useful for runtime instrumentation and static analysis.
@ -427,7 +426,7 @@ menuconfig GCC_PLUGINS
config GCC_PLUGIN_CYC_COMPLEXITY config GCC_PLUGIN_CYC_COMPLEXITY
bool "Compute the cyclomatic complexity of a function" if EXPERT bool "Compute the cyclomatic complexity of a function" if EXPERT
depends on GCC_PLUGINS depends on GCC_PLUGINS
depends on !COMPILE_TEST depends on !COMPILE_TEST # too noisy
help help
The complexity M of a function's control flow graph is defined as: The complexity M of a function's control flow graph is defined as:
M = E - N + 2P M = E - N + 2P
@ -494,7 +493,7 @@ config GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
config GCC_PLUGIN_STRUCTLEAK_VERBOSE config GCC_PLUGIN_STRUCTLEAK_VERBOSE
bool "Report forcefully initialized variables" bool "Report forcefully initialized variables"
depends on GCC_PLUGIN_STRUCTLEAK depends on GCC_PLUGIN_STRUCTLEAK
depends on !COMPILE_TEST depends on !COMPILE_TEST # too noisy
help help
This option will cause a warning to be printed each time the This option will cause a warning to be printed each time the
structleak plugin finds a variable it thinks needs to be structleak plugin finds a variable it thinks needs to be
@ -534,7 +533,7 @@ config GCC_PLUGIN_RANDSTRUCT
config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
bool "Use cacheline-aware structure randomization" bool "Use cacheline-aware structure randomization"
depends on GCC_PLUGIN_RANDSTRUCT depends on GCC_PLUGIN_RANDSTRUCT
depends on !COMPILE_TEST depends on !COMPILE_TEST # do not reduce test coverage
help help
If you say Y here, the RANDSTRUCT randomization will make a If you say Y here, the RANDSTRUCT randomization will make a
best effort at restricting randomization to cacheline-sized best effort at restricting randomization to cacheline-sized