qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v3 00/33] Misc patches for 2016-02-08


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL v3 00/33] Misc patches for 2016-02-08
Date: Wed, 10 Feb 2016 22:33:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0


On 10/02/2016 20:16, John Snow wrote:
> 
> address@hidden ((977a82a...)) ~/s/q/b/git> ../../configure --cxx=clang++
> --cc=clang --host-cc=clang --extra-cflags=-Werror
> --extra-cflags=-fsanitize=undefined
> --extra-cflags=-Wno-deprecated-declarations
> --extra-cflags=-fno-sanitize=float-divide-by-zero
> --target-list="x86_64-softmmu"
> 
> ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
>        You probably need to set PKG_CONFIG_LIBDIR
>        to point to the right pkg-config files for your
>        build target
> 
> 
> 
> Problem appears to be this:
> 
> /usr/include/glib-2.0/glib/gmem.h:76:58: error: unknown attribute
> '__alloc_size__' ignored [-Werror,-Wunknown-attributes]
> gpointer g_malloc         (gsize         n_bytes) G_GNUC_MALLOC
> G_GNUC_ALLOC_SIZE(1);
>                                                                 ^
> /usr/include/glib-2.0/glib/gmacros.h:67:45: note: expanded from macro
> 'G_GNUC_ALLOC_SIZE'
> #define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))

F23 wraps it like this:

/* Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html 
*/
#ifndef __has_feature
#define __has_feature(x) 0
#endif

#if     (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINO
R__ >= 3))) || \
        (defined(__clang__) && __has_feature(__alloc_size__))
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
#else
#define G_GNUC_ALLOC_SIZE(x)
#define G_GNUC_ALLOC_SIZE2(x,y)
#endif

Please open a bug on the distro to backport this fix.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]