* [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts
@ 2012-10-06 10:46 Stefan Weil
2012-10-06 18:35 ` Aurelien Jarno
2012-10-07 16:10 ` Blue Swirl
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Weil @ 2012-10-06 10:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori
Commit 610b823ef66b993660f1ab1447a769f190e4f3b3 uses QEMU_GNUC_PREREQ
on i386 hosts.
That macro is defined in qemu-common.h which is not always included
before qemu-barrier.h, so compilation on i386 hosts was broken.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
This patch fixes broken compilation for i386 hosts which
was reported by the buildbot:
http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/396
Regards
Stefan Weil
qemu-barrier.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-barrier.h b/qemu-barrier.h
index 16f0942..1de914e 100644
--- a/qemu-barrier.h
+++ b/qemu-barrier.h
@@ -6,6 +6,8 @@
#if defined(__i386__)
+#include "qemu-common.h" /* QEMU_GNUC_PREREQ */
+
/*
* Because of the strongly ordered x86 storage model, wmb() and rmb() are nops
* on x86(well, a compiler barrier only). Well, at least as long as
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts
2012-10-06 10:46 [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts Stefan Weil
@ 2012-10-06 18:35 ` Aurelien Jarno
2012-10-07 16:10 ` Blue Swirl
1 sibling, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2012-10-06 18:35 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel
On Sat, Oct 06, 2012 at 12:46:15PM +0200, Stefan Weil wrote:
> Commit 610b823ef66b993660f1ab1447a769f190e4f3b3 uses QEMU_GNUC_PREREQ
> on i386 hosts.
>
> That macro is defined in qemu-common.h which is not always included
> before qemu-barrier.h, so compilation on i386 hosts was broken.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> This patch fixes broken compilation for i386 hosts which
> was reported by the buildbot:
>
> http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/396
>
> Regards
>
> Stefan Weil
>
> qemu-barrier.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/qemu-barrier.h b/qemu-barrier.h
> index 16f0942..1de914e 100644
> --- a/qemu-barrier.h
> +++ b/qemu-barrier.h
> @@ -6,6 +6,8 @@
>
> #if defined(__i386__)
>
> +#include "qemu-common.h" /* QEMU_GNUC_PREREQ */
> +
> /*
> * Because of the strongly ordered x86 storage model, wmb() and rmb() are nops
> * on x86(well, a compiler barrier only). Well, at least as long as
> --
> 1.7.10
>
Thanks, applied.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts
2012-10-06 10:46 [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts Stefan Weil
2012-10-06 18:35 ` Aurelien Jarno
@ 2012-10-07 16:10 ` Blue Swirl
2012-10-07 18:10 ` Aurelien Jarno
1 sibling, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2012-10-07 16:10 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel, Aurelien Jarno
On Sat, Oct 6, 2012 at 10:46 AM, Stefan Weil <sw@weilnetz.de> wrote:
> Commit 610b823ef66b993660f1ab1447a769f190e4f3b3 uses QEMU_GNUC_PREREQ
> on i386 hosts.
>
> That macro is defined in qemu-common.h which is not always included
> before qemu-barrier.h, so compilation on i386 hosts was broken.
This broke sparc-softmmu build on i386:
CC sparc-softmmu/hw/vhost_net.o
In file included from /src/qemu/target-sparc/cpu.h:28,
from /src/qemu/qemu-common.h:128,
from /src/qemu/qemu-barrier.h:9,
from /src/qemu/qemu-queue.h:81,
from /src/qemu/net.h:4,
from /src/qemu/hw/vhost_net.c:16:
/src/qemu/cpu-defs.h:144: error: expected specifier-qualifier-list
before 'QTAILQ_ENTRY'
/src/qemu/cpu-defs.h:151: error: expected specifier-qualifier-list
before 'QTAILQ_ENTRY'
I think the correct fix is to include compiler.h instead.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> This patch fixes broken compilation for i386 hosts which
> was reported by the buildbot:
>
> http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/396
>
> Regards
>
> Stefan Weil
>
> qemu-barrier.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/qemu-barrier.h b/qemu-barrier.h
> index 16f0942..1de914e 100644
> --- a/qemu-barrier.h
> +++ b/qemu-barrier.h
> @@ -6,6 +6,8 @@
>
> #if defined(__i386__)
>
> +#include "qemu-common.h" /* QEMU_GNUC_PREREQ */
> +
> /*
> * Because of the strongly ordered x86 storage model, wmb() and rmb() are nops
> * on x86(well, a compiler barrier only). Well, at least as long as
> --
> 1.7.10
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts
2012-10-07 16:10 ` Blue Swirl
@ 2012-10-07 18:10 ` Aurelien Jarno
0 siblings, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2012-10-07 18:10 UTC (permalink / raw)
To: Blue Swirl; +Cc: Stefan Weil, Anthony Liguori, qemu-devel
On Sun, Oct 07, 2012 at 04:10:41PM +0000, Blue Swirl wrote:
> On Sat, Oct 6, 2012 at 10:46 AM, Stefan Weil <sw@weilnetz.de> wrote:
> > Commit 610b823ef66b993660f1ab1447a769f190e4f3b3 uses QEMU_GNUC_PREREQ
> > on i386 hosts.
> >
> > That macro is defined in qemu-common.h which is not always included
> > before qemu-barrier.h, so compilation on i386 hosts was broken.
>
> This broke sparc-softmmu build on i386:
> CC sparc-softmmu/hw/vhost_net.o
> In file included from /src/qemu/target-sparc/cpu.h:28,
> from /src/qemu/qemu-common.h:128,
> from /src/qemu/qemu-barrier.h:9,
> from /src/qemu/qemu-queue.h:81,
> from /src/qemu/net.h:4,
> from /src/qemu/hw/vhost_net.c:16:
> /src/qemu/cpu-defs.h:144: error: expected specifier-qualifier-list
> before 'QTAILQ_ENTRY'
> /src/qemu/cpu-defs.h:151: error: expected specifier-qualifier-list
> before 'QTAILQ_ENTRY'
>
> I think the correct fix is to include compiler.h instead.
>
Correct, I have been able to build QEMU on an i386 host that way. I have
therefore committed the following patch:
commit f1829782d6cb931973d71649f8ad1dad66188c34
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Sun Oct 7 20:07:11 2012 +0200
qemu-barrier: Fix compilation on i386 hosts
Commit 1d31fca470648ec66afd8743491bfb5846306341 tried to fix bug
introduced by 610b823ef66b993660f1ab1447a769f190e4f3b3 by including
qemu-common.h, which breaks the build further.
Include compiler.h instead, as suggested by Blue Swirl.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
diff --git a/qemu-barrier.h b/qemu-barrier.h
index 1de914e..faa83d2 100644
--- a/qemu-barrier.h
+++ b/qemu-barrier.h
@@ -6,7 +6,7 @@
#if defined(__i386__)
-#include "qemu-common.h" /* QEMU_GNUC_PREREQ */
+#include "compiler.h" /* QEMU_GNUC_PREREQ */
/*
* Because of the strongly ordered x86 storage model, wmb() and rmb() are nops
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-07 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-06 10:46 [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts Stefan Weil
2012-10-06 18:35 ` Aurelien Jarno
2012-10-07 16:10 ` Blue Swirl
2012-10-07 18:10 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).