Hi, I'd like to propose adding more testcases for mingw-w64-crt with different CFLAGS. I'm trying to enable `-O2`, `_FORTIFY_SOURCE=2` and `-fstack-protector-strong` when building mingw-w64-crt itself for MSYS2. Unfortunately, we met several regressions, see [1] and [2].
Some regression (e.g. `-fstack-protector-strong` linking issue) is actually downstream (Rust) bug. However, some regression (e.g. `_FORTIFY_SOURCE=2` causes infinite loop in `__memcpy_chk` for Clang) is likely a bug in mingw-w64 itself. Currently, GitHub CI only enables `-Werror`. And it's not clear whether `-O2` is enabled (there's some logic in `configure` that defaults to `-g -O2` or `-O2`, but I'm not sure whether they're effective). So I propose to add a new matrix with some common CFLAGS combination, so that potential problems can be detected earlier. BTW, I understand that some flags that are useful for downstream may not be applicable when compiling mingw-w64-crt itself (I suspect __USE_MINGW_ANSI_STDIO is one of these, and I'm not sure whether _FORTIFY_SOURCE is also one of these). Maybe this can be documented somewhere, or adding some guard logic (checking for _CRTBLD)? [1]: https://github.com/msys2/MINGW-packages/pull/31309 [2]: https://github.com/msys2/MINGW-packages/pull/31355 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
