aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch')
-rw-r--r--meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch b/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch
new file mode 100644
index 00000000..3dfa31a1
--- /dev/null
+++ b/meta-ti-bsp/recipes-kernel/linux/files/0001-gcc-plugins-Fix-build-for-upcoming-GCC-release.patch
@@ -0,0 +1,46 @@
+From 3cd29a3d7c25cca9989e7d8966141f725fa99c68 Mon Sep 17 00:00:00 2001
+From: Palmer Dabbelt <palmer@rivosinc.com>
+Date: Fri, 13 Jan 2023 09:30:33 -0800
+Subject: [PATCH] gcc-plugins: Fix build for upcoming GCC release
+
+The upcoming GCC release has refactored the gimple plugin interface a
+bit and unless gimple-iterator.h is included before gimple-fold.h I end
+up with a bunch of missing declarations when building the stack
+protector plugin.
+
+Upstream-Status: Backport [https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/]
+Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
+Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
+Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
+Cc: linux-hardening@vger.kernel.org
+Signed-off-by: Kees Cook <keescook@chromium.org>
+---
+ scripts/gcc-plugins/gcc-common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/gcc-plugins/gcc-common.h
++++ b/scripts/gcc-plugins/gcc-common.h
+@@ -108,7 +108,9 @@
+ #include "varasm.h"
+ #include "stor-layout.h"
+ #include "internal-fn.h"
++#include "gimple.h"
+ #include "gimple-expr.h"
++#include "gimple-iterator.h"
+ #include "gimple-fold.h"
+ #include "context.h"
+ #include "tree-ssa-alias.h"
+@@ -124,13 +126,10 @@
+ #include "gimplify.h"
+ #endif
+
+-#include "gimple.h"
+-
+ #if BUILDING_GCC_VERSION >= 4009
+ #include "tree-ssa-operands.h"
+ #include "tree-phinodes.h"
+ #include "tree-cfg.h"
+-#include "gimple-iterator.h"
+ #include "gimple-ssa.h"
+ #include "ssa-iterators.h"
+ #endif