0001-gcc-plugins-Reorganize-gimple-includes-for-GCC-13.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 32f53700aeef2f5c7797ddda66348fc0b29e1047 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
  5. The gimple-iterator.h header must be included before gimple-fold.h
  6. starting with GCC 13. Reorganize gimple headers to work for all GCC
  7. versions.
  8. Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
  9. Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
  10. Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
  11. Cc: linux-hardening@vger.kernel.org
  12. Signed-off-by: Kees Cook <keescook@chromium.org>
  13. ---
  14. Upstream-Status: Pending
  15. scripts/gcc-plugins/gcc-common.h | 4 ++--
  16. 1 file changed, 2 insertions(+), 2 deletions(-)
  17. diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
  18. index 0c087614fc3e..27770c31214c 100644
  19. --- a/scripts/gcc-plugins/gcc-common.h
  20. +++ b/scripts/gcc-plugins/gcc-common.h
  21. @@ -77,8 +77,10 @@
  22. #include "varasm.h"
  23. #include "stor-layout.h"
  24. #include "internal-fn.h"
  25. +#include "gimple.h"
  26. #include "gimple-expr.h"
  27. #include "gimple-fold.h"
  28. +#include "gimple-iterator.h"
  29. #include "context.h"
  30. #include "tree-ssa-alias.h"
  31. #include "tree-ssa.h"
  32. @@ -91,11 +93,9 @@
  33. #include "tree-eh.h"
  34. #include "stmt.h"
  35. #include "gimplify.h"
  36. -#include "gimple.h"
  37. #include "tree-ssa-operands.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"
  43. --
  44. 2.39.1