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 $(obj
)/randomize_layout_plugin.o
: $(objtree
)/$(obj
)/randomize_layout_seed.h
22 quiet_cmd_create_randomize_layout_seed
= GENSEED
$@
23 cmd_create_randomize_layout_seed
= \
24 $(CONFIG_SHELL
) $(srctree
)/$(src
)/gen-random-seed.sh
$@
$(objtree
)/include/generated
/randomize_layout_hash.h
25 $(objtree
)/$(obj
)/randomize_layout_seed.h
: FORCE
26 $(call if_changed
,create_randomize_layout_seed
)
27 targets
= randomize_layout_seed.h randomize_layout_hash.h
29 $(HOSTLIBS
)-y
:= $(foreach p
,$(GCC_PLUGIN
),$(if
$(findstring /,$(p
)),,$(p
)))
30 always
:= $($(HOSTLIBS
)-y
)
32 $(foreach p
,$($(HOSTLIBS
)-y
:%.so
=%),$(eval
$(p
)-objs
:= $(p
).o
))
34 subdir-y
:= $(GCC_PLUGIN_SUBDIR
)
35 subdir-
+= $(GCC_PLUGIN_SUBDIR
)