[PATCH vkd3d] Makefile: Explicitly avoid ANSI stdio modifiers when cross compiling.

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Jan 25 11:32:33 CST 2022


On 1/25/22 03:44, Giovanni Mascellani wrote:
> Hi,
> 
> Il 24/01/22 17:24, Zebediah Figura (she/her) ha scritto:
>> The problem isn't PRIu64. The problem is that we're using 
>> __attribute__((format(printf))), which defaults to ms_printf for MinGW 
>> targets, even though we actually want gnu_printf.
> 
> But do we really? Crosstests are linked against msvcrt, and from what I 
> understand msvcrt should use MS printf modifiers, shouldn't it?

MinGW handles CRT linking implicitly. If using ANSI stdio, it will link 
against its own CRT library (libmingwex) which provides ANSI-compatible 
versions of printf functions, and then link against msvcrt to resolve 
everything else.

You can see this in practice if you disassemble our crosstests—before 
this change, they don't link against "printf" from msvcrt, after this 
change they do.



More information about the wine-devel mailing list