From 3aee127a614fa4be8cac353e06cec3e668a94c8c Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Thu, 28 May 2020 11:43:37 -0700 Subject: Updated to 5.6.15 Updated gcc patch to 20200527 --- 0003-gcc-common.h-Update-for-GCC-10.patch | 86 ------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 0003-gcc-common.h-Update-for-GCC-10.patch (limited to '0003-gcc-common.h-Update-for-GCC-10.patch') diff --git a/0003-gcc-common.h-Update-for-GCC-10.patch b/0003-gcc-common.h-Update-for-GCC-10.patch deleted file mode 100644 index ec4fc15..0000000 --- a/0003-gcc-common.h-Update-for-GCC-10.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 41e53fdbbf5121960fd44427c2ae7536d8fdd701 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= - -Date: Tue, 7 Apr 2020 13:32:59 +0200 -Subject: gcc-common.h: Update for GCC 10 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Remove "params.h" include, which has been dropped in GCC 10. - -Remove is_a_helper() macro, which is now defined in gimple.h, as seen -when running './scripts/gcc-plugin.sh g++ g++ gcc': - -In file included from :1: -./gcc-plugins/gcc-common.h:852:13: error: redefinition of ‘static bool is_a_helper::test(U*) [with U = const gimple; T = const ggoto*]’ - 852 | inline bool is_a_helper::test(const_gimple gs) - | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -In file included from ./gcc-plugins/gcc-common.h:125, - from :1: -/usr/lib/gcc/x86_64-redhat-linux/10/plugin/include/gimple.h:1037:1: note: ‘static bool is_a_helper::test(U*) [with U = const gimple; T = const ggoto*]’ previously declared here - 1037 | is_a_helper ::test (const gimple *gs) - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add -Wno-format-diag to scripts/gcc-plugins/Makefile to avoid -meaningless warnings from error() formats used by plugins: - -scripts/gcc-plugins/structleak_plugin.c: In function ‘int plugin_init(plugin_name_args*, plugin_gcc_version*)’: -scripts/gcc-plugins/structleak_plugin.c:253:12: warning: unquoted sequence of 2 consecutive punctuation characters ‘'-’ in format [-Wformat-diag] - 253 | error(G_("unknown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Frédéric Pierret (fepitre) -Link: https://lore.kernel.org/r/20200407113259.270172-1-frederic.pierret@qubes-os.org -[kees: include -Wno-format-diag for plugin builds] -Signed-off-by: Kees Cook ---- - scripts/gcc-plugins/Makefile | 1 + - scripts/gcc-plugins/gcc-common.h | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile -index f22858b2c3d6..80f354289eeb 100644 ---- a/scripts/gcc-plugins/Makefile -+++ b/scripts/gcc-plugins/Makefile -@@ -4,6 +4,7 @@ GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) - 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 -+HOST_EXTRACXXFLAGS += -Wno-format-diag - - $(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h - quiet_cmd_create_randomize_layout_seed = GENSEED $@ -diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h -index 17f06079a712..9ad76b7f3f10 100644 ---- a/scripts/gcc-plugins/gcc-common.h -+++ b/scripts/gcc-plugins/gcc-common.h -@@ -35,7 +35,9 @@ - #include "ggc.h" - #include "timevar.h" - -+#if BUILDING_GCC_VERSION < 10000 - #include "params.h" -+#endif - - #if BUILDING_GCC_VERSION <= 4009 - #include "pointer-set.h" -@@ -847,6 +849,7 @@ static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree l - return gimple_build_assign(lhs, subcode, op1, op2 PASS_MEM_STAT); - } - -+#if BUILDING_GCC_VERSION < 10000 - template <> - template <> - inline bool is_a_helper::test(const_gimple gs) -@@ -860,6 +863,7 @@ inline bool is_a_helper::test(const_gimple gs) - { - return gs->code == GIMPLE_RETURN; - } -+#endif - - static inline gasm *as_a_gasm(gimple stmt) - { --- -cgit v1.2.3-1-gf6bb5 - -- cgit v1.2.1