Re: [PATCHv3 1/3] build: Check for broken GCC -Wlogical-op in configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 19, 2012 at 01:05:42PM +0100, Viktor Mihajlovski wrote:
> On 12/19/2012 11:21 AM, Daniel P. Berrange wrote:
> >On Wed, Dec 19, 2012 at 11:14:15AM +0100, Viktor Mihajlovski wrote:
> >
> >I think Eric means that on non-GCC this code:
> >
> ># if BROKEN_GCC_WLOGICALOP
> >#  pragma GCC diagnostic ignored "-Wlogical-op"
> ># endif
> >
> >
> >will cause the compiler to complain "Unknown pragma GCC diagnostic..."
> >since obviously non-GCC compilers don't understand GCC pragmas
> >
> >Daniel
> >
> 
> I understood that part. My statement is that BROKEN_GCC_WLOGICALOP will
> not be defined if configure was run on a system with non-GCC compiler.
> Unless I oversaw something fundamental ... which I will never rule out.

I think it depends on what the compiler does with unknown -W flags.
In the configure test you created, there are 2 possible reasons
why the TRY_COMPILE can fail

 - Using GCC with a broken -Wlogical-op impl
 - Compiler which doesn't understand -Wlogical-op at all and treats
   this is a fatal error

I think the solution here is to move the check into
virt-compiler-warnings.m4 and only look for a broken
GCC, if we have already validated that '-Wlogical-op'
is supported by the compiler

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]