xref: /linux-6.15/scripts/Makefile.gcc-plugins (revision 0dae776c)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ifdef CONFIG_GCC_PLUGINS
2  __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
3  PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
4
5  gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY)	+= cyc_complexity_plugin.so
6  GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
7
8  export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN
9
10  ifeq ($(PLUGINCC),)
11    ifneq ($(GCC_PLUGINS_CFLAGS),)
12      ifeq ($(call cc-ifversion, -ge, 0405, y), y)
13        PLUGINCC := $(shell $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
14        $(warning warning: your gcc installation does not support plugins, perhaps the necessary headers are missing?)
15      else
16        $(warning warning: your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
17      endif
18    endif
19  endif
20
21  KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
22  GCC_PLUGIN := $(gcc-plugin-y)
23
24endif
25

served by {OpenGrok

Last Index Update: Fri May 15 20:09:11 GMT 2026