All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system headers
Date: Wed, 29 Jun 2016 06:01:19 -0500	[thread overview]
Message-ID: <20160629110119.9860.64054@loki> (raw)
In-Reply-To: <5773866E.7000302@redhat.com>

Quoting Thomas Huth (2016-06-29 03:27:26)
> On 29.06.2016 01:43, Michael Roth wrote:
> > As of e4650c81, we do w32 builds with -Werror enabled. Unfortunately
> > for cases where we enable VSS support in qemu-ga, we still have
> > warnings generated by VSS includes that ship as part of the Microsoft
> > VSS SDK.
> > 
> > We can selectively address a number of these warnings using
> > 
> >   #pragma GCC diagnostic ignored ...
> > 
> > but at least one of these:
> > 
> >   warning: ‘typedef’ was ignored in this declaration
> > 
> > resulting from declarations of the form:
> > 
> >   typedef struct Blah { ... };
> > 
> > does not provide a specific command-line/pragma option to disable
> > warnings of the sort.
> > 
> > To allow VSS builds to succeed, the next-best option is disabling
> > these warnings on a per-file basis. pragmas like #pragma GCC
> > system_header can be used to declare subsequent includes/declarations
> > as being exempt from normal warnings, but this must be done within
> > a header file.
> > 
> > Since we don't control the VSS SDK, we'd need to rely on a
> > intermediate header include to accomplish this, and
> > since different objects in the VSS link target rely on different
> > headers from the VSS SDK, this would become somewhat of a rat's nest
> > (though not totally unmanageable).
> > 
> > The next step up in granularity is just marking the entire VSS
> > SDK include path as system headers via -isystem. This is a bit more
> > heavy-handed, but since this SDK hasn't changed since 2005, there's
> > likely little to be gained from selectively disabling warnings
> > anyway, so we implement that approach here.
> > 
> > This fixes the -Werror failures in both the configure test and the
> > qga build due to shared reliance on $vss_win32_include. For the
> > same reason, this also enforces a new dependency on -isystem support
> > in the C/C++ compiler when building QGA with VSS enabled.
> 
> Did we ever support any non-GCC-based compiler for building QGA? I don't
> think so, but in the worst case, we could later add a check whether the
> compiler supports that parameter, too...

Not really, but I think it's possible to bootstrap clang using mingw,
which is probably a reasonable option to keep open. That was the main
reason I wanted to point out the new dependency, but it turns out clang
supports -isystem anyway so a check/fallback in configure (like we
have for #pragma GCC diagnostic) is probably not not needed atm.

The other possibility is a native MSVC compile, but I doubt that works
as is (heavy usage of unistd.h, for instance), and I'm not aware of any
good reason to make it work.

> 
> Anyway, I think your patch is a nice and clean way to deal with the
> error messages from these headers, so:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Thanks!

  reply	other threads:[~2016-06-30 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 23:43 [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system headers Michael Roth
2016-06-29  8:27 ` Thomas Huth
2016-06-29 11:01   ` Michael Roth [this message]
2016-06-30 19:06 ` Michael Roth

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=20160629110119.9860.64054@loki \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    /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.