Re: [PATCH] build: work around gcc 6.0 warnings

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

 



On Mon, 2016-02-29 at 15:41 +0100, Martin Kletzander wrote:
> On Wed, Feb 24, 2016 at 02:29:58PM -0700, Eric Blake wrote:
> > 
> > gcc 6.0 added an annoying warning:
> > 
> > fdstream.c: In function 'virFDStreamWrite':
> > fdstream.c:390:29: error: logical 'or' of equal expressions [-Werror=logical-op]
> >        if (errno == EAGAIN || errno == EWOULDBLOCK) {
> >                            ^~
> > fdstream.c: In function 'virFDStreamRead':
> > fdstream.c:440:29: error: logical 'or' of equal expressions [-Werror=logical-op]
> >        if (errno == EAGAIN || errno == EWOULDBLOCK) {
> >                            ^~
> > 
> > This makes it impossible to build out-of-the-box on rawhide,
> > and we aren't guaranteed that the gcc bug will be fixed in a
> > timely manner:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
> > 
> > So work around it by further complicating the logic to thwart the
> > compiler.
> > 
> > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> > ---
> > 
> > This is a build-breaker fix for rawhide; but I'll wait for a day
> > for any reasons why I should not push it during freeze.
> > 
> It looks like you're still talking this over and thinking about
> approaches.  But could we push the fix for the time being so that the
> release is nicely buildable and then work on making it nicer later?  I'd
> vote ACK for that.

Update: the libvirt-fedora-rawhide build host on CentOS CI
has been updated and it's now running gcc 6.0. The immediate
result is that build jobs have started to fail (see [1] for
an example).

Looking at the gcc bug, it doesn't look like there's been
much movement in that area, so I think we should take some
action on our side...

Eric, you mentioned proposing a v2 that would use #pragma
instead of uglifying the current checks. Do you still
intend to work on such alternative approach?

Failing that, I'm personally okay with pushing this.

Cheers.


[1] https://ci.centos.org/view/libvirt-project/job/libvirt-daemon-build/1131/
-- 
Andrea Bolognani
Software Engineer - Virtualization Team

--
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]