113.0-1
[arch-packages.git] / linux-rt-lts / trunk / gcc13-compat.patch
blobe8599caa4ff02c20af71326a255a28e8f63a0216
1 From e6a71160cc145e18ab45195abf89884112e02dfb Mon Sep 17 00:00:00 2001
2 From: Kees Cook <keescook@chromium.org>
3 Date: Wed, 18 Jan 2023 12:21:35 -0800
4 Subject: [PATCH] gcc-plugins: Reorganize gimple includes for GCC 13
6 The gimple-iterator.h header must be included before gimple-fold.h
7 starting with GCC 13. Reorganize gimple headers to work for all GCC
8 versions.
10 Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
11 Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
12 Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
13 Cc: linux-hardening@vger.kernel.org
14 Signed-off-by: Kees Cook <keescook@chromium.org>
15 ---
16 scripts/gcc-plugins/gcc-common.h | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
19 diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
20 index 9a1895747b15..84c730da36dd 100644
21 --- a/scripts/gcc-plugins/gcc-common.h
22 +++ b/scripts/gcc-plugins/gcc-common.h
23 @@ -71,7 +71,9 @@
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-iterator.h"
30 #include "gimple-fold.h"
31 #include "context.h"
32 #include "tree-ssa-alias.h"
33 @@ -85,10 +87,8 @@
34 #include "tree-eh.h"
35 #include "stmt.h"
36 #include "gimplify.h"
37 -#include "gimple.h"
38 #include "tree-ssa-operands.h"
39 #include "tree-phinodes.h"
40 #include "tree-cfg.h"
41 -#include "gimple-iterator.h"
42 #include "gimple-ssa.h"
45 2.40.1