blob: 447a5e446f331e9dea2deeb65bfc31a2568cd8b0 [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---
16 scripts/gcc-plugins/gcc-common.h | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
20index 0c087614fc3e..27770c31214c 100644
21--- a/scripts/gcc-plugins/gcc-common.h
22+++ b/scripts/gcc-plugins/gcc-common.h
23@@ -77,8 +77,10 @@
24 #include "varasm.h"
25 #include "stor-layout.h"
26 #include "internal-fn.h"
27+#include "gimple.h"
28 #include "gimple-expr.h"
29 #include "gimple-fold.h"
30+#include "gimple-iterator.h"
31 #include "context.h"
32 #include "tree-ssa-alias.h"
33 #include "tree-ssa.h"
34@@ -91,11 +93,9 @@
35 #include "tree-eh.h"
36 #include "stmt.h"
37 #include "gimplify.h"
38-#include "gimple.h"
39 #include "tree-ssa-operands.h"
40 #include "tree-phinodes.h"
41 #include "tree-cfg.h"
42-#include "gimple-iterator.h"
43 #include "gimple-ssa.h"
44 #include "ssa-iterators.h"
45
46--
472.39.1
48