gcc-plugins: drop support for GCC <= 4.7
Nobody was opposed to raising minimum GCC version to 4.8 [1] So, we will drop GCC <= 4.7 support sooner or later. We always use C++ compiler for building plugins for GCC >= 4.8. This commit drops the plugin support for GCC <= 4.7 a bit earlier, which allows us to dump lots of code. [1] https://lkml.org/lkml/2020/1/23/545 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
@@ -1,18 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
PLUGINCC := $(CONFIG_PLUGIN_HOSTCC:"%"=%)
|
||||
GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
|
||||
|
||||
ifeq ($(PLUGINCC),$(HOSTCC))
|
||||
HOSTLIBS := hostlibs
|
||||
HOST_EXTRACFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
|
||||
export HOST_EXTRACFLAGS
|
||||
else
|
||||
HOSTLIBS := hostcxxlibs
|
||||
HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti
|
||||
HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb
|
||||
HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat
|
||||
export HOST_EXTRACXXFLAGS
|
||||
endif
|
||||
HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti
|
||||
HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb
|
||||
HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat
|
||||
|
||||
$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
|
||||
quiet_cmd_create_randomize_layout_seed = GENSEED $@
|
||||
@@ -22,9 +13,9 @@ $(objtree)/$(obj)/randomize_layout_seed.h: FORCE
|
||||
$(call if_changed,create_randomize_layout_seed)
|
||||
targets = randomize_layout_seed.h randomize_layout_hash.h
|
||||
|
||||
$(HOSTLIBS)-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))
|
||||
always-y := $($(HOSTLIBS)-y)
|
||||
hostcxxlibs-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))
|
||||
always-y := $(hostcxxlibs-y)
|
||||
|
||||
$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
|
||||
$(foreach p,$(hostcxxlibs-y:%.so=%),$(eval $(p)-objs := $(p).o))
|
||||
|
||||
clean-files += *.so
|
||||
|
Reference in New Issue
Block a user