| .. | .. |
|---|
| 1 | | -preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),$(HOSTCC)) |
|---|
| 2 | | - |
|---|
| 3 | | -config PLUGIN_HOSTCC |
|---|
| 4 | | - string |
|---|
| 5 | | - default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC |
|---|
| 6 | | - help |
|---|
| 7 | | - Host compiler used to build GCC plugins. This can be $(HOSTCXX), |
|---|
| 8 | | - $(HOSTCC), or a null string if GCC plugin is unsupported. |
|---|
| 9 | | - |
|---|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
|---|
| 10 | 2 | config HAVE_GCC_PLUGINS |
|---|
| 11 | 3 | bool |
|---|
| 12 | 4 | help |
|---|
| 13 | 5 | An arch should select this symbol if it supports building with |
|---|
| 14 | 6 | GCC plugins. |
|---|
| 15 | 7 | |
|---|
| 16 | | -config GCC_PLUGINS |
|---|
| 17 | | - bool |
|---|
| 8 | +menuconfig GCC_PLUGINS |
|---|
| 9 | + bool "GCC plugins" |
|---|
| 18 | 10 | depends on HAVE_GCC_PLUGINS |
|---|
| 19 | | - depends on PLUGIN_HOSTCC != "" |
|---|
| 11 | + depends on CC_IS_GCC |
|---|
| 12 | + depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h) |
|---|
| 20 | 13 | default y |
|---|
| 21 | 14 | help |
|---|
| 22 | 15 | GCC plugins are loadable modules that provide extra features to the |
|---|
| 23 | 16 | compiler. They are useful for runtime instrumentation and static analysis. |
|---|
| 24 | 17 | |
|---|
| 25 | | - See Documentation/gcc-plugins.txt for details. |
|---|
| 18 | + See Documentation/kbuild/gcc-plugins.rst for details. |
|---|
| 26 | 19 | |
|---|
| 27 | | -menu "GCC plugins" |
|---|
| 28 | | - depends on GCC_PLUGINS |
|---|
| 20 | +if GCC_PLUGINS |
|---|
| 29 | 21 | |
|---|
| 30 | 22 | config GCC_PLUGIN_CYC_COMPLEXITY |
|---|
| 31 | 23 | bool "Compute the cyclomatic complexity of a function" if EXPERT |
|---|
| .. | .. |
|---|
| 86 | 78 | source tree isn't cleaned after kernel installation). |
|---|
| 87 | 79 | |
|---|
| 88 | 80 | The seed used for compilation is located at |
|---|
| 89 | | - scripts/gcc-plgins/randomize_layout_seed.h. It remains after |
|---|
| 81 | + scripts/gcc-plugins/randomize_layout_seed.h. It remains after |
|---|
| 90 | 82 | a make clean to allow for external modules to be compiled with |
|---|
| 91 | 83 | the existing seed and will be removed by a make mrproper or |
|---|
| 92 | 84 | make distclean. |
|---|
| .. | .. |
|---|
| 108 | 100 | in structures. This reduces the performance hit of RANDSTRUCT |
|---|
| 109 | 101 | at the cost of weakened randomization. |
|---|
| 110 | 102 | |
|---|
| 111 | | -endmenu |
|---|
| 103 | +config GCC_PLUGIN_ARM_SSP_PER_TASK |
|---|
| 104 | + bool |
|---|
| 105 | + depends on GCC_PLUGINS && ARM |
|---|
| 106 | + |
|---|
| 107 | +endif |
|---|