16b90bd4bSEmese Revfyifdef CONFIG_GCC_PLUGINS 26b90bd4bSEmese Revfy __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC)) 36b90bd4bSEmese Revfy PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)") 46b90bd4bSEmese Revfy 5*0dae776cSEmese Revfy gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) += cyc_complexity_plugin.so 66b90bd4bSEmese Revfy GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) 76b90bd4bSEmese Revfy 86b90bd4bSEmese Revfy export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN 96b90bd4bSEmese Revfy 106b90bd4bSEmese Revfy ifeq ($(PLUGINCC),) 116b90bd4bSEmese Revfy ifneq ($(GCC_PLUGINS_CFLAGS),) 126b90bd4bSEmese Revfy ifeq ($(call cc-ifversion, -ge, 0405, y), y) 136b90bd4bSEmese Revfy PLUGINCC := $(shell $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)") 146b90bd4bSEmese Revfy $(warning warning: your gcc installation does not support plugins, perhaps the necessary headers are missing?) 156b90bd4bSEmese Revfy else 166b90bd4bSEmese Revfy $(warning warning: your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least) 176b90bd4bSEmese Revfy endif 186b90bd4bSEmese Revfy endif 196b90bd4bSEmese Revfy endif 206b90bd4bSEmese Revfy 216b90bd4bSEmese Revfy KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) 226b90bd4bSEmese Revfy GCC_PLUGIN := $(gcc-plugin-y) 236b90bd4bSEmese Revfy 246b90bd4bSEmese Revfyendif 25