Il 20/10/2013 17:20, Peter Maydell ha scritto:
>   CC    util/qemu-thread-posix.o
> util/qemu-thread-posix.c:351:13: warning: implicit declaration of
> function '__sync_exchange' is invalid in
>       C99 [-Wimplicit-function-declaration]
>         if (atomic_xchg(&ev->value, EV_SET) == EV_BUSY) {
>             ^
> /Users/pm215/src/qemu/include/qemu/atomic.h:179:32: note: expanded
> from macro 'atomic_xchg'
> #define atomic_xchg(ptr, i)    __sync_exchange(ptr, i)
>                                ^

That's a typo/thinko, it should be __sync_swap according to the
documentation.

> 1 warning generated.
>   LINK  qemu-nbd
> Undefined symbols for architecture x86_64:
>   "___sync_exchange", referenced from:
>       _qemu_event_set in libqemuutil.a(qemu-thread-posix.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> make: *** [qemu-nbd] Error 1
> 
> It looks like we need to select the '#else' case for MacOSX...
> any suggestions about how best to do that?

Or just the #elif if __sync_swap works.

Paolo

Reply via email to