archrelease: copy trunk to extra-x86_64
[arch-packages.git] / linux-hardened / trunk / gcc13-compat.patch
blobab0d7e910ab86922c780f3d7c41805ba2ce61079
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-phinodes.h"
39 #include "tree-cfg.h"
40 -#include "gimple-iterator.h"
41 #include "gimple-ssa.h"
42 #include "ssa-iterators.h"
45 2.40.1