[libvirt] PATCH: Fix compiler flag check for -Wformat-security

Daniel P. Berrange berrange at redhat.com
Mon Apr 27 12:55:49 UTC 2009


On Mon, Apr 27, 2009 at 02:28:58PM +0200, Daniel Veillard wrote:
> On Mon, Apr 27, 2009 at 02:25:16PM +0200, Daniel Veillard wrote:
> > On Mon, Apr 27, 2009 at 11:37:35AM +0100, Daniel P. Berrange wrote:
> > > Certain versions of GCC will ignore the -Wformat-security flag unless you
> > > have also set the -Wformat flag. Unfortunately when checking flags, we only
> 
>   Hum, I noticed recently that some packages change the make output to
> just print something like the following when compiling a C module:
>    CC module.c
> instead of the now 3-4 lines of compiler flags, which make spotting
> warnings way easier. Maybe this would be a good idea for us too,
> opinion ?

This is a little tricky todo with libtool, though you could hack up 
some semi-evil solution

eg, you can hack the makefile.am to add --silent to libtool, but make
itself will still print out the name of the command run (which is huge).
So you also have to add  -s, but then you get no output at all. So you
have to add a wrapper script around libtool to run with --silent and
also print the filename.

Personally I always build with --enable-compile-warnings=error so the
build stops immediately if any warning message is generated. That way
you don't have to pay close attention to the messages scrolling up


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list