]>
Commit | Line | Data |
---|---|---|
6b90bd4b ER |
1 | ifdef 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 | ||
0dae776c | 5 | gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) += cyc_complexity_plugin.so |
6b90bd4b ER |
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 | ||
24 | endif |