blob: e4d8936fd73638d56fd6da030dfb715445e92d67 [file] [log] [blame]
Andrew Geissler80d41842023-09-11 08:36:15 -04001From e6a71160cc145e18ab45195abf89884112e02dfb 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
16Upstream-Status: Backport
17Signed-off-by: Jon Mason <jon.mason@arm.com>
18
19---
20 scripts/gcc-plugins/gcc-common.h | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
24index 9a1895747b15..84c730da36dd 100644
25--- a/scripts/gcc-plugins/gcc-common.h
26+++ b/scripts/gcc-plugins/gcc-common.h
27@@ -71,7 +71,9 @@
28 #include "varasm.h"
29 #include "stor-layout.h"
30 #include "internal-fn.h"
31+#include "gimple.h"
32 #include "gimple-expr.h"
33+#include "gimple-iterator.h"
34 #include "gimple-fold.h"
35 #include "context.h"
36 #include "tree-ssa-alias.h"
37@@ -85,10 +87,8 @@
38 #include "tree-eh.h"
39 #include "stmt.h"
40 #include "gimplify.h"
41-#include "gimple.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