2016-05-24 05:09:38 +07:00
|
|
|
GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
|
|
|
|
|
|
|
|
ifeq ($(PLUGINCC),$(HOSTCC))
|
|
|
|
HOSTLIBS := hostlibs
|
|
|
|
HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
|
|
|
|
export HOST_EXTRACFLAGS
|
|
|
|
else
|
|
|
|
HOSTLIBS := hostcxxlibs
|
|
|
|
HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti
|
|
|
|
HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb
|
|
|
|
HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable
|
|
|
|
export HOST_EXTRACXXFLAGS
|
|
|
|
endif
|
|
|
|
|
|
|
|
export GCCPLUGINS_DIR HOSTLIBS
|
|
|
|
|
2016-05-24 05:11:37 +07:00
|
|
|
ifneq ($(CFLAGS_KCOV), $(SANCOV_PLUGIN))
|
|
|
|
GCC_PLUGIN := $(filter-out $(SANCOV_PLUGIN), $(GCC_PLUGIN))
|
|
|
|
endif
|
|
|
|
|
2016-05-24 05:09:38 +07:00
|
|
|
$(HOSTLIBS)-y := $(GCC_PLUGIN)
|
|
|
|
always := $($(HOSTLIBS)-y)
|
|
|
|
|
2016-06-26 22:36:43 +07:00
|
|
|
$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
|
2016-05-24 05:11:37 +07:00
|
|
|
|
2016-05-24 05:09:38 +07:00
|
|
|
clean-files += *.so
|