qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaroun


From: Marc-André Lureau
Subject: Re: [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaround
Date: Fri, 25 Feb 2022 01:49:19 +0400

Hi

On Fri, Feb 25, 2022 at 1:41 AM Stefan Weil <sw@weilnetz.de> wrote:
Am 24.02.22 um 20:12 schrieb Peter Maydell:

> On Thu, 24 Feb 2022 at 18:38, <marcandre.lureau@redhat.com> wrote:
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> This workaround was added in commit 95df51a4 ("w32: Always use standard
>> instead of native format strings"), as it claimed glib was using
>> __printf__ attribute. This is surprising, since glib has always used
>> G_GNUC_PRINTF which, as the name implies, uses __gnu_printf__ when
>> possible.
> This was not always true: before this commit from 2018
> https://github.com/GNOME/glib/commit/98a0ab929d8c59ee27e5f470f11d077bb6a56749
> G_GNUC_PRINTF used always used __printf__.
> I think that change only landed in glib 2.58, so since our current
> minimum glib version is 2.56 we need to retain this workaround.
>
>> Apparently, the workaound is no longer relevant though, I don't see
>> the warnings.
> You're probably building with a newer glib, and possibly also
> a newer mingw.
>
> I've cc'd Stefan Weil who might know whether we can drop this
> workaround as far as the mingw part is concerned.


My latest builds of QEMU for Windows still used glib 2.54 because that
still is the "newest" version which is provided by Cygwin's mingw64:

https://cygwin.com/cgi-bin2/package-grep.cgi?grep=mingw64-.*-glib2.0

So I even had to downgrade the minimum glib version.

A hard requirement of a newer glib would mean that Cygwin mingw64
packages can no longer be used for building QEMU unless someone updates
those packages.

That sounds doable, I can take a look.

Why not build with msys2 though? It is quite actively maintained and most people recommended it these days. My understanding is that msys2 is closer to native Windows (whereas cygwin tries to bring more POSIX compatiblity: https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin/)

--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]