From patchwork Mon Apr 22 12:32:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 238503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 147992C00AA for ; Mon, 22 Apr 2013 22:33:34 +1000 (EST) Received: from localhost ([::1]:42876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUFw3-0005Ed-6J for incoming@patchwork.ozlabs.org; Mon, 22 Apr 2013 08:33:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUFvB-0004MD-9K for qemu-devel@nongnu.org; Mon, 22 Apr 2013 08:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUFvA-0007VQ-2N for qemu-devel@nongnu.org; Mon, 22 Apr 2013 08:32:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUFv9-0007VG-QW for qemu-devel@nongnu.org; Mon, 22 Apr 2013 08:32:36 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MCWXin019000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Apr 2013 08:32:33 -0400 Received: from yakj.usersys.redhat.com (ovpn-112-45.ams2.redhat.com [10.36.112.45]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3MCWTpk025255; Mon, 22 Apr 2013 08:32:29 -0400 Message-ID: <51752DD3.3070302@redhat.com> Date: Mon, 22 Apr 2013 14:32:19 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Peter Maydell References: <1366226195-10668-1-git-send-email-peter.maydell@linaro.org> <51747056.6080803@web.de> In-Reply-To: X-Enigmail-Version: 1.5.1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3MCWXin019000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , patches@linaro.org, Stefan Hajnoczi , qemu-devel@nongnu.org, Blue Swirl , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Gerd Hoffmann Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Fix recent compile breakage X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Il 22/04/2013 13:51, Peter Maydell ha scritto: > On 22 April 2013 00:03, Andreas Färber wrote: >> Even after this has been applied, things are still not building for me. >> >> I'm seeing CC trace/generated-events.o failing with "error: parameter >> name omitted" for trace_apic_local_deliver, trace_usb_xhci_queue_event, >> trace_megasas_msix_raise and trace_spapr_pci_msi_setup, plus a warning >> that trace_event_count is being declared twice. > > I suspect that whatever compiler you're using here treats 'vector' > as a magic word, so when it sees a prototype like > static inline void trace_megasas_msix_raise(int vector) > > it's expecting that 'vector' is an attribute of the type and > it wants "int vector foo", hence the error message. > > You could test this theory by changing all the 'vector's in > trace-events to 'vec' instead and rebuilding. The culprit is likely altivec.h. Something like this should fix it: Paolo diff --git a/include/qemu-common.h b/include/qemu-common.h index 2cfb1f0..6c23b1b 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -436,12 +436,18 @@ /* vector definitions */ #ifdef __ALTIVEC__ #include -#define VECTYPE vector unsigned char +/* The altivec.h header says we're allowed to undef these for + * C++ compatibility. Here we don't care about C++, but we + * undef them anyway to avoid namespace pollution. + */ +#undef vector +#undef pixel +#undef bool +#define VECTYPE __vector unsigned char #define SPLAT(p) vec_splat(vec_ld(0, p), 0) #define ALL_EQ(v1, v2) vec_all_eq(v1, v2) /* altivec.h may redefine the bool macro as vector type. * Reset it to POSIX semantics. */ -#undef bool #define bool _Bool #elif defined __SSE2__ #include