Lines Matching +full:diag +full:- +full:version
1 # SPDX-License-Identifier: GPL-2.0
6 SEED=$$(cat $(filter-out FORCE,$^) </dev/null); \
18 # No extra code is needed for single-file plugins.
19 # For multi-file plugins, use *-objs syntax to list the objects.
23 # foo-objs := foo.o foo2.o
25 always-y += $(GCC_PLUGIN)
27 GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
29 plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
30 -include $(srctree)/include/linux/compiler-version.h \
31 -DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \
32 -I $(GCC_PLUGINS_DIR)/include -I $(obj) \
33 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
34 -ggdb -Wno-narrowing -Wno-unused-variable \
35 -Wno-format-diag
37 plugin_ldflags = -shared
39 plugin-single := $(foreach m, $(GCC_PLUGIN), $(if $($(m:%.so=%-objs)),,$(m)))
40 plugin-multi := $(filter-out $(plugin-single), $(GCC_PLUGIN))
41 plugin-objs := $(sort $(foreach m, $(plugin-multi), $($(m:%.so=%-objs))))
43 targets += $(plugin-single) $(plugin-multi) $(plugin-objs)
44 clean-files += *.so
46 plugin-single := $(addprefix $(obj)/, $(plugin-single))
47 plugin-multi := $(addprefix $(obj)/, $(plugin-multi))
48 plugin-objs := $(addprefix $(obj)/, $(plugin-objs))
51 cmd_plugin_cxx_so_c = $(HOSTCXX) $(plugin_cxxflags) $(plugin_ldflags) -o $@ $<
53 $(plugin-single): $(obj)/%.so: $(src)/%.c FORCE
57 cmd_plugin_ld_so_o = $(HOSTCXX) $(plugin_ldflags) -o $@ \
58 $(addprefix $(obj)/, $($(target-stem)-objs))
60 $(plugin-multi): FORCE
62 $(foreach m, $(notdir $(plugin-multi)), $(eval $(obj)/$m: $(addprefix $(obj)/, $($(m:%.so=%-objs)))…
65 cmd_plugin_cxx_o_c = $(HOSTCXX) $(plugin_cxxflags) -c -o $@ $<
67 $(plugin-objs): $(obj)/%.o: $(src)/%.c FORCE