blob: 4f6468761c6fcac3caaec2038bc8276474d7e08e [file] [log] [blame]
Patrick Williams864cc432023-02-09 14:54:44 -06001From 32f53700aeef2f5c7797ddda66348fc0b29e1047 Mon Sep 17 00:00:00 2001
2From: Kees Cook <keescook@chromium.org>
3Date: Wed, 18 Jan 2023 12:21:35 -0800
4Subject: [PATCH] gcc-plugins: Reorganize gimple includes for GCC 13
5
6The gimple-iterator.h header must be included before gimple-fold.h
7starting with GCC 13. Reorganize gimple headers to work for all GCC
8versions.
9
10Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
11Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
12Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
13Cc: linux-hardening@vger.kernel.org
14Signed-off-by: Kees Cook <keescook@chromium.org>
15---
Patrick Williams520786c2023-06-25 16:20:36 -050016Upstream-Status: Pending
17
Patrick Williams864cc432023-02-09 14:54:44 -060018 scripts/gcc-plugins/gcc-common.h | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
22index 0c087614fc3e..27770c31214c 100644
23--- a/scripts/gcc-plugins/gcc-common.h
24+++ b/scripts/gcc-plugins/gcc-common.h
25@@ -77,8 +77,10 @@
26 #include "varasm.h"
27 #include "stor-layout.h"
28 #include "internal-fn.h"
29+#include "gimple.h"
30 #include "gimple-expr.h"
31 #include "gimple-fold.h"
32+#include "gimple-iterator.h"
33 #include "context.h"
34 #include "tree-ssa-alias.h"
35 #include "tree-ssa.h"
36@@ -91,11 +93,9 @@
37 #include "tree-eh.h"
38 #include "stmt.h"
39 #include "gimplify.h"
40-#include "gimple.h"
41 #include "tree-ssa-operands.h"
42 #include "tree-phinodes.h"
43 #include "tree-cfg.h"
44-#include "gimple-iterator.h"
45 #include "gimple-ssa.h"
46 #include "ssa-iterators.h"
47
48--
492.39.1
50