0009-fix-crossgcc-acpica-build-on-newer-hostcc.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. From 373dd351e374f391c9e2048e5f3e535267a04719 Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <leah@libreboot.org>
  3. Date: Sun, 9 Jul 2023 19:37:39 +0100
  4. Subject: [PATCH 1/1] fix crossgcc/acpica build on newer hostcc
  5. Changes made to acpica/iasl:
  6. remove superfluous YYSTYPE declaration
  7. make LuxBuffer variables static, to avoid warnings
  8. treated as errors about multiple definitions
  9. AcpiGbl_DbOpt_NoRegionSupport - remove this definition
  10. in source/tools/acpiexec/aemain.c because it's already
  11. re-defined by acpiexec. otherwise the linker complains
  12. about multiple definitions
  13. Signed-off-by: Leah Rowe <leah@libreboot.org>
  14. ---
  15. .../acpica-unix2-20190703_mitigategcc.patch | 76 +++++++++++++++++++
  16. 1 file changed, 76 insertions(+)
  17. create mode 100644 util/crossgcc/patches/acpica-unix2-20190703_mitigategcc.patch
  18. diff --git a/util/crossgcc/patches/acpica-unix2-20190703_mitigategcc.patch b/util/crossgcc/patches/acpica-unix2-20190703_mitigategcc.patch
  19. new file mode 100644
  20. index 0000000000..8de47245bd
  21. --- /dev/null
  22. +++ b/util/crossgcc/patches/acpica-unix2-20190703_mitigategcc.patch
  23. @@ -0,0 +1,76 @@
  24. +From 66b927d923183ff62c9a757fafdeca9d1ac3fa87 Mon Sep 17 00:00:00 2001
  25. +From: Leah Rowe <leah@libreboot.org>
  26. +Date: Sun, 9 Jul 2023 18:58:11 +0100
  27. +Subject: [PATCH 1/1] fix building on newer hostcc (debian sid tested)
  28. +
  29. +remove superfluous YYSTYPE declaration
  30. +
  31. +make LuxBuffer variables static, to avoid warnings
  32. +treated as errors about multiple definitions
  33. +
  34. +AcpiGbl_DbOpt_NoRegionSupport - remove this definition
  35. +in source/tools/acpiexec/aemain.c because it's already
  36. +re-defined by acpiexec. otherwise the linker complains
  37. +about multiple definitions
  38. +
  39. +Signed-off-by: Leah Rowe <leah@libreboot.org>
  40. +---
  41. + source/compiler/aslcompiler.l | 1 -
  42. + source/compiler/dtparser.l | 2 +-
  43. + source/compiler/prparser.l | 2 +-
  44. + source/tools/acpiexec/aemain.c | 1 -
  45. + 4 files changed, 2 insertions(+), 4 deletions(-)
  46. +
  47. +diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
  48. +index 1949b32..a24f028 100644
  49. +--- a/source/compiler/aslcompiler.l
  50. ++++ b/source/compiler/aslcompiler.l
  51. +@@ -48,7 +48,6 @@
  52. +
  53. + #include <stdlib.h>
  54. + #include <string.h>
  55. +-YYSTYPE AslCompilerlval;
  56. +
  57. + /*
  58. + * Generation: Use the following command line:
  59. +diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l
  60. +index 6517e52..d35181c 100644
  61. +--- a/source/compiler/dtparser.l
  62. ++++ b/source/compiler/dtparser.l
  63. +@@ -100,7 +100,7 @@ NewLine [\n]
  64. + /*
  65. + * Local support functions
  66. + */
  67. +-YY_BUFFER_STATE LexBuffer;
  68. ++static YY_BUFFER_STATE LexBuffer;
  69. +
  70. + /******************************************************************************
  71. + *
  72. +diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l
  73. +index bcdef14..5a1b848 100644
  74. +--- a/source/compiler/prparser.l
  75. ++++ b/source/compiler/prparser.l
  76. +@@ -116,7 +116,7 @@ Identifier [a-zA-Z][0-9a-zA-Z]*
  77. + /*
  78. + * Local support functions
  79. + */
  80. +-YY_BUFFER_STATE LexBuffer;
  81. ++static YY_BUFFER_STATE LexBuffer;
  82. +
  83. +
  84. + /******************************************************************************
  85. +diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
  86. +index 58640dd..cd0add6 100644
  87. +--- a/source/tools/acpiexec/aemain.c
  88. ++++ b/source/tools/acpiexec/aemain.c
  89. +@@ -84,7 +84,6 @@ BOOLEAN AcpiGbl_VerboseHandlers = FALSE;
  90. + UINT8 AcpiGbl_RegionFillValue = 0;
  91. + BOOLEAN AcpiGbl_IgnoreErrors = FALSE;
  92. + BOOLEAN AcpiGbl_AbortLoopOnTimeout = FALSE;
  93. +-BOOLEAN AcpiGbl_DbOpt_NoRegionSupport = FALSE;
  94. + UINT8 AcpiGbl_UseHwReducedFadt = FALSE;
  95. + BOOLEAN AcpiGbl_DoInterfaceTests = FALSE;
  96. + BOOLEAN AcpiGbl_LoadTestTables = FALSE;
  97. +--
  98. +2.40.1
  99. +
  100. --
  101. 2.40.1