On Wed, 27 Aug 2025, LIU Hao wrote:
在 2025-8-27 03:24, Martin Storsjö 写道:
Yes, this is true - the tests don't use -nostdlib but expect to build and
run against the installed libs.
However this is not something I'm changing in this patch - this is how this
testsuite is set up so far as well.
I'm presenting this as a less brittle and less messy version of
https://sourceforge.net/p/mingw-w64/ mailman/message/59197829/ - which both
try to get rid of the global AM_CFLAGS (which sets -
D__MSVCRT_VERSION__=0x600) for the tests.
I think this series of patches are okay for this reason.
Ok, thanks - I'll go ahead and push them soon, then.
It would be more straightforward if tests are linked against the built
CRT, with `-nostdlib` and all libraries and object files linked
explicitly, so tests should test the built CRT, instead of the installed,
default CRT.
Yes, that's true. However you'd still need to install the matching headers
somewhere in order to be able to build the crt anyway, so it's not quite as
simple as that.
Feel free to work on that as extra steps to make these tests even easier to
run; I'm just presenting this as an initial step to make them work _at all_
for current configurations, so we can get CI coverage of them.
Strictly speaking it's correct; however CRT are often buildable with headers
that are a bit out of date.
Yes, often, although especially for the patch series where things are
refactored between headers and libs, it can lead to confusing errors as
well.
When building an ordinary software package, `make check` is usually executed
before `make install`; it would be strange to require the opposite.
That's true, and in general it would of course be desireable to be able to
test things without installing them into the preexisting toolchain.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public