powerpc/mm/book3s64/radix: Remove unused code.
[linux-2.6-block.git] / scripts / gcc-plugins / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
59f53855 2PLUGINCC := $(CONFIG_PLUGIN_HOSTCC:"%"=%)
6b90bd4b
ER
3GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
4
5ifeq ($(PLUGINCC),$(HOSTCC))
6 HOSTLIBS := hostlibs
7 HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
8 export HOST_EXTRACFLAGS
9else
10 HOSTLIBS := hostcxxlibs
11 HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti
12 HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb
13 HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable
14 export HOST_EXTRACXXFLAGS
15endif
16
313dd1b6
KC
17$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
18quiet_cmd_create_randomize_layout_seed = GENSEED $@
19cmd_create_randomize_layout_seed = \
20 $(CONFIG_SHELL) $(srctree)/$(src)/gen-random-seed.sh $@ $(objtree)/include/generated/randomize_layout_hash.h
21$(objtree)/$(obj)/randomize_layout_seed.h: FORCE
22 $(call if_changed,create_randomize_layout_seed)
23targets = randomize_layout_seed.h randomize_layout_hash.h
24
caefd8c9 25$(HOSTLIBS)-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))
6b90bd4b
ER
26always := $($(HOSTLIBS)-y)
27
7040c83b 28$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
543c37cb 29
6b90bd4b 30clean-files += *.so