Messages in this thread | | | Date | Mon, 2 May 2016 14:09:55 +0900 | Subject | Re: [PATCH v7 4/6] Add Cyclomatic complexity GCC plugin | From | Masahiro Yamada <> |
| |
Hi Emese,
2016-04-23 3:24 GMT+09:00 Emese Revfy <re.emese@gmail.com>:
> diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins > index e6d66e2..282d63a 100644 > --- a/scripts/Makefile.gcc-plugins > +++ b/scripts/Makefile.gcc-plugins > @@ -2,6 +2,8 @@ ifdef CONFIG_GCC_PLUGINS > __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC)) > PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)") > > + gcc-plugin-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) += cyc_complexity_plugin.so > + > GCC_PLUGINS_CFLAGS := $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) > > ifeq ($(PLUGINCC),) > diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile > index b2d64af..31c72bf 100644 > --- a/scripts/gcc-plugins/Makefile > +++ b/scripts/gcc-plugins/Makefile > @@ -12,4 +12,8 @@ endif > > export GCCPLUGINS_DIR HOSTLIBS > > +$(HOSTLIBS)-$(CONFIG_GCC_PLUGIN_CYC_COMPLEXITY) := cyc_complexity_plugin.so
I noticed we need to add the same string into "gcc-plugin-y" and "$(HOSTLIBS)-y"
Maybe can we do like this?
$(HOSTLIBS)-y := $(gcc-plugin-y)
> always := $($(HOSTLIBS)-y) > + > +cyc_complexity_plugin-objs := cyc_complexity_plugin.o
-- Best Regards Masahiro Yamada
| |