All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Li Qiang" <liq3ea@163.com>, "Eduardo Otubo" <otubo@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PULL v2 00/27] ivshmem deprecation, qtests, typedefs and gnu99
Date: Tue, 15 Jan 2019 14:58:20 +0000	[thread overview]
Message-ID: <20190115145820.GB16157@redhat.com> (raw)
In-Reply-To: <cdf8a1ab-c99b-789f-8325-f63d6da5e0c1@redhat.com>

On Tue, Jan 15, 2019 at 03:32:10PM +0100, Thomas Huth wrote:
> On 2019-01-15 14:16, Peter Maydell wrote:
> > On Mon, 14 Jan 2019 at 17:45, Thomas Huth <thuth@redhat.com> wrote:
> >>
> >>  Hi Peter!
> >>
> >> The following changes since commit 7260438b7056469610ee166f7abe9ff8a26b8b16:
> >>
> >>   Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-3.2-part2' into staging (2019-01-14 11:41:43 +0000)
> >>
> >> are available in the git repository at:
> >>
> >>   https://gitlab.com/huth/qemu.git tags/pull-request-2019-01-14v2
> >>
> >> for you to fetch changes up to 650db715681ad1a042705484776e1974f288f3d4:
> >>
> >>   tests/hexloader-test: Don't pass -nographic to the QEMU under test (2019-01-14 18:21:29 +0100)
> >>
> >> ----------------------------------------------------------------
> >> - Remove deprecated "ivshmem" legacy device
> >> - Bug fix for vhost-user-test
> >> - Use more CONFIG Makefile switches for qtests
> >> - Get rid of global_qtests in some more qtests
> >> - typedef cleanups
> >> - Fixes for compiling with Clang
> >> - Force C standard to gnu99
> >> ----------------------------------------------------------------
> > 
> > Hi; another compile failure on that ppc64 system, I'm afraid:
> > 
> > /home/pm215/qemu/qemu-seccomp.c:45:1: error: initializer element is not constant
> >  };
> >  ^
> > /home/pm215/qemu/qemu-seccomp.c:45:1: error: (near initialization for
> > ‘sched_setscheduler_arg[0]’)
> > 
> > (I did a quick check with 'make -k' and it looks like there aren't
> > any more lurking after that one.)
> > 
> > The system libseccomp is libseccomp-2.3.1-3.el7.
> 
> Darn, I think this time it is a compiler bug:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567
> 
> It's only fixed in GCC >= v5.0 :-(
> 
> I see two options:
> 
> 1) Expand the macro manually:
> 
> diff --git a/qemu-seccomp.c b/qemu-seccomp.c
> --- a/qemu-seccomp.c
> +++ b/qemu-seccomp.c
> @@ -41,7 +41,7 @@ struct QemuSeccompSyscall {
>  };
> 
>  const struct scmp_arg_cmp sched_setscheduler_arg[] = {
> -    SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)
> +    { .arg = 1, .op = SCMP_CMP_NE, .datum_a = SCHED_IDLE }
>  };
> 
> ... then it compiles fine for me in gnu99 mode, too.
> 
> 2) Scratch the whole idea with gnu99 again ...

I'd prefer 1, since I think its important for us to actually have a
consistent compiler standard to target, even if we have to do some
short terms hacks like the one you show.  As long as a put a comment
next to it, we can revert the hack when we eventually ditch support for the
GCC <= 5.0

Also, I'd probably argue that the seccomp syntax without the macro
is clearer to understand regardless :-)

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2019-01-15 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 17:45 [Qemu-devel] [PULL v2 00/27] ivshmem deprecation, qtests, typedefs and gnu99 Thomas Huth
2019-01-14 17:45 ` [Qemu-devel] [PULL v2 20/27] ui/console: Remove MouseTransformInfo from qemu/typedefs.h Thomas Huth
2019-01-14 17:45 ` [Qemu-devel] [PULL v2 21/27] ui/console: Remove PixelFormat " Thomas Huth
2019-01-14 17:45 ` [Qemu-devel] [PULL v2 25/27] block: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode Thomas Huth
2019-01-15 13:16 ` [Qemu-devel] [PULL v2 00/27] ivshmem deprecation, qtests, typedefs and gnu99 Peter Maydell
2019-01-15 14:32   ` Thomas Huth
2019-01-15 14:58     ` Daniel P. Berrangé [this message]
2019-01-15 17:10       ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190115145820.GB16157@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=liq3ea@163.com \
    --cc=otubo@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.