xref: /linux-6.15/scripts/Makefile.gcc-plugins (revision 6b90bd4b)
  • 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_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y))
6
7  export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN
8
9  ifeq ($(PLUGINCC),)
10    ifneq ($(GCC_PLUGINS_CFLAGS),)
11      ifeq ($(call cc-ifversion, -ge, 0405, y), y)
12        PLUGINCC := $(shell $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
13        $(warning warning: your gcc installation does not support plugins, perhaps the necessary headers are missing?)
14      else
15        $(warning warning: your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
16      endif
17    endif
18  endif
19
20  KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
21  GCC_PLUGIN := $(gcc-plugin-y)
22
23endif
24

served by {OpenGrok

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