All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	QEMU <qemu-devel@nongnu.org>
Subject: Re: [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaround
Date: Wed, 16 Mar 2022 14:57:28 +0000	[thread overview]
Message-ID: <YjH62Isl70BAai9w@redhat.com> (raw)
In-Reply-To: <CAFEAcA8qeebt1OWenyUc1dfFjT8Q3ut8ZUxgp4uu71qH48vOUA@mail.gmail.com>

On Wed, Mar 16, 2022 at 02:41:41PM +0000, Peter Maydell wrote:
> On Wed, 16 Mar 2022 at 13:44, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Thu, Feb 24, 2022 at 08:14:47PM +0000, Peter Maydell wrote:
> > > On Thu, 24 Feb 2022 at 19:50, Marc-André Lureau
> > > <marcandre.lureau@gmail.com> wrote:
> > > > On Thu, Feb 24, 2022 at 11:23 PM Peter Maydell <peter.maydell@linaro.org> wrote:
> > > >> 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.
> > > >
> > > >
> > > > Probably safer to keep it until we bump glib dependency to >=2.58.
> > > >
> > > > I would move it to glib-compat.h though, and leave a note there, as it is (or should be ) an old glib specific workaround.
> > >
> > > We can only move it to glib-compat if we confirm that only the
> > > glib-related part of the workaround is still relevant and the
> > > mingw side is now no longer needed, though.
> >
> > We know glib uses the GNU printf semantics for all its APIs.
> >
> > We know QEMU code will use the GNU printf annotation for all its
> > APIs where it knows it has GNU printf, due to delegating to
> > GLib.
> >
> > For 3rd party libraries, we can have no confidence about whether
> > they expect GNU or native printf format, unless we're doing
> > something to override the printf family of functions at link
> > time. IIRC, we're not doing that, so we can't assume 3rd party
> > stuff expects GNU format, and so the sooner we get rid of
> > the #define __printf__ __gnu_printf__ the better IMHO. The
> > proof of course would be to see a CI test run with the define
> > removed proving that no code we call relies on it.
> 
> Yes, the workaround is definitely correct for QEMU's own
> code and for glib itself. We don't care about 3rd party
> libraries because we don't use any of those which take
> format-string arguments AFAIK. The 'mingw' part AIUI is
> purely for mingw itself, ie the standard library. What
> I'm asking is "what were the versions of mingw that were
> affected by this, and are they all old enough we don't need
> to care from that point of view?".

I've no idea about affected versions, but if they're more than
2 years old I'd say we don't need to care. The various places
you get mingw prebuilt all tend to stay close to the cutting
edge.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2022-03-16 14:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 18:36 [PATCH 00/12] Misc cleanups marcandre.lureau
2022-02-24 18:36 ` [PATCH 01/12] compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT marcandre.lureau
2022-02-24 19:16   ` Richard Henderson
2022-02-24 18:36 ` [PATCH 02/12] compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED marcandre.lureau
2022-02-24 19:16   ` Richard Henderson
2022-02-24 18:36 ` [PATCH 03/12] osdep.h: move qemu_build_not_reached() marcandre.lureau
2022-02-24 19:32   ` Richard Henderson
2022-02-24 19:58     ` Marc-André Lureau
2022-02-24 18:36 ` [PATCH 04/12] compiler.h: replace QEMU_NORETURN with G_NORETURN marcandre.lureau
2022-02-24 19:31   ` Richard Henderson
2022-02-24 19:57     ` Marc-André Lureau
2022-02-24 18:36 ` [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaround marcandre.lureau
2022-02-24 19:12   ` Peter Maydell
2022-02-24 19:50     ` Marc-André Lureau
2022-02-24 20:14       ` Peter Maydell
2022-03-16 13:44         ` Daniel P. Berrangé
2022-03-16 14:41           ` Peter Maydell
2022-03-16 14:57             ` Daniel P. Berrangé [this message]
2022-02-24 21:40     ` Stefan Weil
2022-02-24 21:49       ` Marc-André Lureau
2022-02-24 18:36 ` [PATCH 06/12] Replace config-time define HOST_WORDS_BIGENDIAN marcandre.lureau
2022-02-24 19:37   ` Richard Henderson
2022-02-24 19:59     ` Marc-André Lureau
2022-02-24 18:36 ` [PATCH 07/12] Simplify HOST_LONG_BITS marcandre.lureau
2022-02-24 19:58   ` Richard Henderson
2022-02-24 18:36 ` [PATCH 08/12] Move HOST_LONG_BITS to compiler.h marcandre.lureau
2022-02-24 20:01   ` Richard Henderson
2022-02-24 18:36 ` [PATCH 09/12] scripts/modinfo-collect: remove unused/dead code marcandre.lureau
2022-02-24 18:36 ` [PATCH 10/12] util: remove needless includes marcandre.lureau
2022-02-24 20:03   ` Richard Henderson
2022-02-24 18:37 ` [PATCH 11/12] util: remove the net/net.h dependency marcandre.lureau
2022-02-24 19:17   ` Peter Maydell
2022-02-24 20:04   ` Richard Henderson
2022-02-24 18:37 ` [PATCH 12/12] qapi: remove needless include marcandre.lureau
2022-02-24 20:04   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YjH62Isl70BAai9w@redhat.com \
    --to=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.