mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-01 23:33:07 +03:00
a5219cd288
GCC bug 119085, which affects versions 13.0--15.1, is being triggered by the C backend, resulting in a (small but critical) miscompilation in zig2. Unfortunately, we can't really work around that bug without a command-line flag, because the bug is sensitive to things like the order in which `struct` types are defined. Therefore, I have added an option to `bootstrap.c` which causes it to pass the appropriate flag to `gcc` to disable the optimization pass in question. This flag can likely be removed in future, once the affected GCC versions become less common. At least one of our x86_64-linux CI machines is using an affected GCC version, so I also updated the relevant CI script to pass this flag when testing no-LLVM bootstrap. CMakeLists also has a workaround, but no user intervention is required there: the GCC version range is automatically detected by CMakeLists.