1GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) 2 3ifeq ($(PLUGINCC),$(HOSTCC)) 4 HOSTLIBS := hostlibs 5 HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb 6 export HOST_EXTRACFLAGS 7else 8 HOSTLIBS := hostcxxlibs 9 HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti 10 HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb 11 HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable 12 export HOST_EXTRACXXFLAGS 13endif 14 15export GCCPLUGINS_DIR HOSTLIBS 16 17$(HOSTLIBS)-y := $(GCC_PLUGIN) 18always := $($(HOSTLIBS)-y) 19 20clean-files += *.so 21