On Mon, 14 Jul 2025, Kirill Makurin wrote:
I do not yet completely understand all aspects of mingw-w64's build process
(which, for example, caused issues with btowc and wctob in this patch
series), but I wonder if we could add Makefile.am to testcases subdirectory
and define all tests in that Makefile.am instead of top-level one?
Yes, that's one good potential way of resolving it.
This would allow us, for example, override value of ___MSVCRT_VERSION__ when
compiling tests. I think It would make sense to define it to the value
corresponding to CRT specified with --with-default-msvcrt configure option?
No ideally I think we shouldn't touch it at all.
The current issue is that we build most of the files in mingw-w64-crt, for
e.g. libmingwex.a, with a specific -D__MSVCRT_VERSION__=0x600, as those
object files are supposed to work the same across all msvcrt versions.
Object files that do touch things that differ, need to override this
within the source files, and are bundled in e.g. libucrt.a rather than in
the common libmingwex.a.
For the tests, we probably shouldn't be setting any such define at all,
but assume that the headers that are installed and gets used, match the
setting that was set for building mingw-w64-crt.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public