On 12/05/2011 09:41 AM, Daniel P. Berrange wrote: > On Mon, Dec 05, 2011 at 09:25:40AM -0700, Eric Blake wrote: >> On 12/04/2011 02:26 AM, Peter Krempa wrote: >>> I tried building rc2 on my macbook and build was successful, but I've >>> got a warning on each file built: >>> >>> cc1: warning: command line option "-Wabi" is valid for C++/ObjC++ but >>> not for C >>> cc1: warning: command line option "-Wdeprecated" is valid for C++/ObjC++ >>> but not for C >> >> This is a known (and harmless) issue with the gnulib 'manywarnings' >> module, and only triggers with older versions of gcc. It will probably >> be resolved in gnulib in time for libvirt 0.9.9, but I don't see us >> doing anything about it for now (if you don't want the warning, then >> don't use --enable-compile-warnings with ./autogen.sh or ./configure). > > Can we workaround it by adding > > > dontwarn="$dontwarn -Wabi" > dontwarn="$dontwarn -Wdeprecated" > > to our m4 config, until such time as we rebase gnulib ? Sure. Done as follows, under the trivial rule: From f17e0e2182ecefd9ba9eb346bab839cd5b59fb9c Mon Sep 17 00:00:00 2001 From: Eric Blake <eblake@xxxxxxxxxx> Date: Mon, 5 Dec 2011 10:14:55 -0700 Subject: [PATCH] build: reduce warnings from older gcc Older gcc warns (on every file!) that -Wabi and -Wdeprecated only make sense on C++ projects. Newer gcc accepts these warnings for C, but it is not clear that they can do anything useful, so it is easier to just drop the warnings altogether. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Silence -Wabi and -Wdeprecated on older gcc. Reported by Peter Krempa. --- m4/virt-compile-warnings.m4 | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index a17e4b7..ba388aa 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -22,6 +22,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # Don't care about C++ compiler compat dontwarn="$dontwarn -Wc++-compat" + dontwarn="$dontwarn -Wabi" + dontwarn="$dontwarn -Wdeprecated" # Don't care about ancient C standard compat dontwarn="$dontwarn -Wtraditional" # Don't care about ancient C standard compat -- 1.7.7.3 -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list