From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKvJ4-000318-Nr for qemu-devel@nongnu.org; Sun, 07 Oct 2012 14:10:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKvJ3-0001zT-E1 for qemu-devel@nongnu.org; Sun, 07 Oct 2012 14:10:26 -0400 Received: from hall.aurel32.net ([88.191.126.93]:55405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKvJ3-0001xU-7s for qemu-devel@nongnu.org; Sun, 07 Oct 2012 14:10:25 -0400 Date: Sun, 7 Oct 2012 20:10:16 +0200 From: Aurelien Jarno Message-ID: <20121007181016.GD4055@ohm.aurel32.net> References: <1349520375-9853-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] qemu-barrier: Fix compilation on i386 hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Stefan Weil , Anthony Liguori , qemu-devel@nongnu.org On Sun, Oct 07, 2012 at 04:10:41PM +0000, Blue Swirl wrote: > On Sat, Oct 6, 2012 at 10:46 AM, 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. > > 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 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 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