1*6b90bd4bSEmese Revfyifdef CONFIG_GCC_PLUGINS 2*6b90bd4bSEmese Revfy __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC)) 3*6b90bd4bSEmese Revfy PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)") 4*6b90bd4bSEmese Revfy 5*6b90bd4bSEmese Revfy GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) 6*6b90bd4bSEmese Revfy 7*6b90bd4bSEmese Revfy export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN 8*6b90bd4bSEmese Revfy 9*6b90bd4bSEmese Revfy ifeq ($(PLUGINCC),) 10*6b90bd4bSEmese Revfy ifneq ($(GCC_PLUGINS_CFLAGS),) 11*6b90bd4bSEmese Revfy ifeq ($(call cc-ifversion, -ge, 0405, y), y) 12*6b90bd4bSEmese Revfy PLUGINCC := $(shell $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)") 13*6b90bd4bSEmese Revfy $(warning warning: your gcc installation does not support plugins, perhaps the necessary headers are missing?) 14*6b90bd4bSEmese Revfy else 15*6b90bd4bSEmese Revfy $(warning warning: your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least) 16*6b90bd4bSEmese Revfy endif 17*6b90bd4bSEmese Revfy endif 18*6b90bd4bSEmese Revfy endif 19*6b90bd4bSEmese Revfy 20*6b90bd4bSEmese Revfy KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) 21*6b90bd4bSEmese Revfy GCC_PLUGIN := $(gcc-plugin-y) 22*6b90bd4bSEmese Revfy 23*6b90bd4bSEmese Revfyendif 24