1 GCC_PLUGINS_DIR
:= $(shell $(CC
) -print-file-name
=plugin
)
3 ifeq ($(PLUGINCC
),$(HOSTCC
))
5 HOST_EXTRACFLAGS
+= -I
$(GCC_PLUGINS_DIR
)/include -I
$(src
) -std
=gnu99
-ggdb
6 export HOST_EXTRACFLAGS
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
15 ifneq ($(CFLAGS_KCOV
), $(SANCOV_PLUGIN
))
16 GCC_PLUGIN
:= $(filter-out $(SANCOV_PLUGIN
), $(GCC_PLUGIN
))
21 $(HOSTLIBS
)-y
:= $(foreach p
,$(GCC_PLUGIN
),$(if
$(findstring /,$(p
)),,$(p
)))
22 always
:= $($(HOSTLIBS
)-y
)
24 $(foreach p
,$($(HOSTLIBS
)-y
:%.so
=%),$(eval
$(p
)-objs
:= $(p
).o
))
26 subdir-y
:= $(GCC_PLUGIN_SUBDIR
)
27 subdir-
+= $(GCC_PLUGIN_SUBDIR
)