All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Juan Quintela <quintela@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Fix recent compile breakage
Date: Sun, 05 May 2013 18:29:56 +0200	[thread overview]
Message-ID: <51868904.9080203@web.de> (raw)
In-Reply-To: <51752DD3.3070302@redhat.com>

Am 22.04.2013 14:32, schrieb Paolo Bonzini:
> Il 22/04/2013 13:51, Peter Maydell ha scritto:
>> On 22 April 2013 00:03, Andreas Färber <andreas.faerber@web.de> 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:

That works fine, but one error remains:

  LINK  i386-softmmu/qemu-system-i386
Undefined symbols:
  "___sync_val_compare_and_swap", referenced from:
      _migrate_finish_set_state in migration.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [qemu-system-i386] Error 1
make: *** [subdir-i386-softmmu] Error 2

That seems unrelated, so I'll send out this patch later.

Thanks,
Andreas

> 
> 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 <altivec.h>
> -#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 <emmintrin.h>
> 
> Paolo
> 

  reply	other threads:[~2013-05-05 16:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 19:16 [Qemu-devel] [PATCH] ui/cocoa.m: Fix recent compile breakage Peter Maydell
2013-04-18  6:44 ` Gerd Hoffmann
2013-04-21  9:54 ` Peter Maydell
2013-04-21 18:15   ` Blue Swirl
2013-04-21 23:03   ` Andreas Färber
2013-04-22 11:51     ` Peter Maydell
2013-04-22 12:32       ` Paolo Bonzini
2013-05-05 16:29         ` Andreas Färber [this message]
2013-05-05 16:47           ` Peter Maydell
2013-05-05 17:03             ` Andreas Färber

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=51868904.9080203@web.de \
    --to=andreas.faerber@web.de \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.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.