pmaports/main/gcc4/1001-fix-reload1-compile-error.patch
Luca Weiss 19809ae262
main/gcc4: fix build (MR 3152)
Fix the build failure when built with newer gcc:

/home/pmos/build/src/gcc-4.9.2/gcc/reload1.c:89:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   89 |   (this_target_reload->x_spill_indirect_levels)
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/pmos/build/src/gcc-4.9.2/gcc/reload1.c:444:7: note: in expansion of macro 'spill_indirect_levels'
  444 |       spill_indirect_levels++;
      |       ^~~~~~~~~~~~~~~~~~~~~

Patch source: https://github.com/ChrisMacGregor/esp-open-sdk/blob/master/1001-fix-reload1-compile-error.patch
2022-05-24 23:05:24 +02:00

17 lines
578 B
Diff

Avoid gcc/reload1.c compile error when building with newer gcc (e.g. gcc 11.2 on Ubuntu 21.10).
The error was:
.../esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.5/gcc/reload1.c:89:24: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
--- gcc-4.8.5/gcc/reload1.c~ 2013-01-21 06:55:05.000000000 -0800
+++ gcc-4.8.5/gcc/reload1.c 2022-01-05 17:18:10.148547719 -0800
@@ -440,7 +440,7 @@
while (memory_address_p (QImode, tem))
{
- spill_indirect_levels++;
+ spill_indirect_levels = 1;
tem = gen_rtx_MEM (Pmode, tem);
}