From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhCI-00052o-6Q for qemu-devel@nongnu.org; Thu, 30 Jun 2016 15:00:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIhCD-0007AP-38 for qemu-devel@nongnu.org; Thu, 30 Jun 2016 15:00:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhCC-0007AI-Qe for qemu-devel@nongnu.org; Thu, 30 Jun 2016 15:00:17 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5UIvw4t066456 for ; Thu, 30 Jun 2016 15:00:14 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 23v09r34pu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 30 Jun 2016 15:00:14 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Jun 2016 13:00:13 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <5773866E.7000302@redhat.com> References: <1467157426-6461-1-git-send-email-mdroth@linux.vnet.ibm.com> <5773866E.7000302@redhat.com> Date: Wed, 29 Jun 2016 06:01:19 -0500 Message-Id: <20160629110119.9860.64054@loki> Subject: Re: [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-devel@nongnu.org Cc: Stefan Weil , Paolo Bonzini 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: =E2=80=98typedef=E2=80=99 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 Thanks!