From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04301C433EF for ; Thu, 7 Oct 2021 20:48:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75C45603E5 for ; Thu, 7 Oct 2021 20:48:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 75C45603E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:44036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYaJV-0007J0-Km for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 16:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYaCz-0004MH-I2 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 16:41:41 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:33523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYaCw-0005eO-FO for qemu-devel@nongnu.org; Thu, 07 Oct 2021 16:41:41 -0400 Received: by mail-wr1-x433.google.com with SMTP id m22so22984444wrb.0 for ; Thu, 07 Oct 2021 13:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yxTMSdYUkIz0F8F1REqTepgEFWUQFT8qIHZ9tZDEILo=; b=YhsVAlUBMqC3pYw/KsEae+v0Cgy0HahpoaodfR1jJErEBJ6M1zQoOgCKh1LuO3/ur5 hMKK1Gk+e4Of8Jot3314gFSrN0uHShWVa7C34uziKgNnNH915kbN2xnLcFzmBrhiXWRI 8M06tCmzO33tkn1YIi8VN7MHql9E6y1sQg8yTyQfFxCO50lGo7Q0OcWMO2O2Cvpc80Kx 3BK3Wlyf5wOm1evrsIYxI9NNurFFrIZS4nVzXYS5dVltg1Y1NdifUGMIz+6OuwODQuEW lGLK32BeAH7pJ292hwuyvby0Zr2JE4H/iMXDy70XvoMsfW6bgnzKaBfIDUjliHA9mvsb V1kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yxTMSdYUkIz0F8F1REqTepgEFWUQFT8qIHZ9tZDEILo=; b=2rQEn5tDDMd0AQvujbZj99NO9gtOLUNlM+SS1zdgA4ayrqvix/MVeki4jv90RHP9TK TJhdOF1ih+9m2bvO1Ux6LP7boXoevlTTTlp/6ds3zibuzibNI7R4uz7BvDJj4ihzLxCf hg7Ej0EEuzkuUWy0dbPGlV8NI1PL8hMVMEViBzM5PfVoJb5fML+w0a9gdjqiH/Tn8Tf+ UE8sbCNtceicOhD2J300+97gUfnCHWMhR4noEW4pqDKgZ77saLXRqr743MzHxCJb83jJ /YjULN/BixfxXxYMRhhczfP7u0xKyurdrYjJ24Zo/bs9rutpcTEPOn3oLIjIAvEnoxJi ingA== X-Gm-Message-State: AOAM533xzFWb6E4/Ti6gxZzFR/kRizstLniEsUQww7NdstxY7NOMKUjq 7YE+x2QrrpOacOyyXv5bUu64aDFsj1skT3PvZ52R4dCR X-Google-Smtp-Source: ABdhPJy7NQbRvMDcEGs6UlF8m2DkZf877G5UMamAH53vyv5+ckH+kNi4CjEmBQm8h1O61CWhQCh8iWLuMQbnzKsAlPM= X-Received: by 2002:adf:a209:: with SMTP id p9mr8098832wra.70.1633639297121; Thu, 07 Oct 2021 13:41:37 -0700 (PDT) MIME-Version: 1.0 References: <20211007130630.632028-1-pbonzini@redhat.com> <20211007130829.632254-15-pbonzini@redhat.com> In-Reply-To: <20211007130829.632254-15-pbonzini@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Fri, 8 Oct 2021 00:41:23 +0400 Message-ID: Subject: Re: [PATCH 20/24] configure, meson: move more compiler checks to Meson To: Paolo Bonzini Content-Type: multipart/alternative; boundary="000000000000ff03c105cdc94995" Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=marcandre.lureau@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000ff03c105cdc94995 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 7, 2021 at 5:24 PM Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > lgtm Reviewed-by: Marc-Andr=C3=A9 Lureau > --- > configure | 91 ----------------------------------------------------- > meson.build | 45 ++++++++++++++++++++++++++ > 2 files changed, 45 insertions(+), 91 deletions(-) > > diff --git a/configure b/configure > index 2091844ad6..33d330dcc9 100755 > --- a/configure > +++ b/configure > @@ -3108,19 +3108,6 @@ elif test "$tpm" =3D "yes"; then > fi > fi > > -########################################## > -# iovec probe > -cat > $TMPC < -#include > -#include > -#include > -int main(void) { return sizeof(struct iovec); } > -EOF > -iovec=3Dno > -if compile_prog "" "" ; then > - iovec=3Dyes > -fi > - > ########################################## > # fdt probe > > @@ -3562,42 +3549,6 @@ EOF > fi > fi > > -######################################### > -# See if 64-bit atomic operations are supported. > -# Note that without __atomic builtins, we can only > -# assume atomic loads/stores max at pointer size. > - > -cat > $TMPC << EOF > -#include > -int main(void) > -{ > - uint64_t x =3D 0, y =3D 0; > - y =3D __atomic_load_n(&x, __ATOMIC_RELAXED); > - __atomic_store_n(&x, y, __ATOMIC_RELAXED); > - __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, > __ATOMIC_RELAXED); > - __atomic_exchange_n(&x, y, __ATOMIC_RELAXED); > - __atomic_fetch_add(&x, y, __ATOMIC_RELAXED); > - return 0; > -} > -EOF > -if compile_prog "" "" ; then > - atomic64=3Dyes > -fi > - > -######################################## > -# check if getauxval is available. > - > -getauxval=3Dno > -cat > $TMPC << EOF > -#include > -int main(void) { > - return getauxval(AT_HWCAP) =3D=3D 0; > -} > -EOF > -if compile_prog "" "" ; then > - getauxval=3Dyes > -fi > - > ######################################## > # check if ccache is interfering with > # semantic analysis of macros > @@ -3671,33 +3622,6 @@ else > membarrier=3Dno > fi > > -########################################## > -# check for usable AF_VSOCK environment > -have_af_vsock=3Dno > -cat > $TMPC << EOF > -#include > -#include > -#include > -#if !defined(AF_VSOCK) > -# error missing AF_VSOCK flag > -#endif > -#include > -int main(void) { > - int sock, ret; > - struct sockaddr_vm svm; > - socklen_t len =3D sizeof(svm); > - sock =3D socket(AF_VSOCK, SOCK_STREAM, 0); > - ret =3D getpeername(sock, (struct sockaddr *)&svm, &len); > - if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { > - return 0; > - } > - return -1; > -} > -EOF > -if compile_prog "" "" ; then > - have_af_vsock=3Dyes > -fi > - > ########################################## > # check for usable AF_ALG environment > have_afalg=3Dno > @@ -4173,9 +4097,6 @@ fi > if test "$vhost_user_fs" =3D "yes" ; then > echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak > fi > -if test "$iovec" =3D "yes" ; then > - echo "CONFIG_IOVEC=3Dy" >> $config_host_mak > -fi > if test "$membarrier" =3D "yes" ; then > echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_mak > fi > @@ -4245,14 +4166,6 @@ if test "$cmpxchg128" =3D "yes" ; then > echo "CONFIG_CMPXCHG128=3Dy" >> $config_host_mak > fi > > -if test "$atomic64" =3D "yes" ; then > - echo "CONFIG_ATOMIC64=3Dy" >> $config_host_mak > -fi > - > -if test "$getauxval" =3D "yes" ; then > - echo "CONFIG_GETAUXVAL=3Dy" >> $config_host_mak > -fi > - > if test "$libssh" =3D "yes" ; then > echo "CONFIG_LIBSSH=3Dy" >> $config_host_mak > echo "LIBSSH_CFLAGS=3D$libssh_cflags" >> $config_host_mak > @@ -4280,10 +4193,6 @@ if test "$replication" =3D "yes" ; then > echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak > fi > > -if test "$have_af_vsock" =3D "yes" ; then > - echo "CONFIG_AF_VSOCK=3Dy" >> $config_host_mak > -fi > - > if test "$debug_mutex" =3D "yes" ; then > echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak > fi > diff --git a/meson.build b/meson.build > index 0721309ed1..f08f364c90 100644 > --- a/meson.build > +++ b/meson.build > @@ -1552,6 +1552,8 @@ config_host_data.set('CONFIG_INOTIFY', > cc.has_header_symbol('sys/inotify.h', > 'inotify_init')) > config_host_data.set('CONFIG_INOTIFY1', > cc.has_header_symbol('sys/inotify.h', > 'inotify_init1')) > +config_host_data.set('CONFIG_IOVEC', > + cc.has_header_symbol('sys/uio.h', 'struct iovec')) > config_host_data.set('CONFIG_MACHINE_BSWAP_H', > cc.has_header_symbol('machine/bswap.h', 'bswap32', > prefix: '''#include > > @@ -1700,6 +1702,49 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not > cc.compiles(''' > return printf("%zu", SIZE_MAX); > }''', args: ['-Werror'])) > > +# See if 64-bit atomic operations are supported. > +# Note that without __atomic builtins, we can only > +# assume atomic loads/stores max at pointer size. > +config_host_data.set('CONFIG_ATOMIC64', cc.links(''' > + cat > $TMPC << EOF > + #include > + int main(void) > + { > + uint64_t x =3D 0, y =3D 0; > + y =3D __atomic_load_n(&x, __ATOMIC_RELAXED); > + __atomic_store_n(&x, y, __ATOMIC_RELAXED); > + __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, > __ATOMIC_RELAXED); > + __atomic_exchange_n(&x, y, __ATOMIC_RELAXED); > + __atomic_fetch_add(&x, y, __ATOMIC_RELAXED); > + return 0; > + }''')) > + > +config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + ''= ' > + #include > + int main(void) { > + return getauxval(AT_HWCAP) =3D=3D 0; > + }''')) > + > +config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + > ''' > + #include > + #include > + #include > + #if !defined(AF_VSOCK) > + # error missing AF_VSOCK flag > + #endif > + #include > + int main(void) { > + int sock, ret; > + struct sockaddr_vm svm; > + socklen_t len =3D sizeof(svm); > + sock =3D socket(AF_VSOCK, SOCK_STREAM, 0); > + ret =3D getpeername(sock, (struct sockaddr *)&svm, &len); > + if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { > + return 0; > + } > + return -1; > + }''')) > + > ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target > 'HAVE_GDB_BIN'] > arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] > -- > 2.31.1 > > > > --=20 Marc-Andr=C3=A9 Lureau --000000000000ff03c105cdc94995 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 7, 2021 at 5:24 PM Paolo = Bonzini <pbonzi= ni@redhat.com> wrote:
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

lgtm
Reviewed-by: Marc-Andr=C3=A9 Lurea= u <marc= andre.lureau@redhat.com>
=C2=A0
---
=C2=A0configure=C2=A0 =C2=A0| 91 ------------------------------------------= -----------
=C2=A0meson.build | 45 ++++++++++++++++++++++++++
=C2=A02 files changed, 45 insertions(+), 91 deletions(-)

diff --git a/configure b/configure
index 2091844ad6..33d330dcc9 100755
--- a/configure
+++ b/configure
@@ -3108,19 +3108,6 @@ elif test "$tpm" =3D "yes"; then=
=C2=A0 =C2=A0fi
=C2=A0fi

-##########################################
-# iovec probe
-cat > $TMPC <<EOF
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-int main(void) { return sizeof(struct iovec); }
-EOF
-iovec=3Dno
-if compile_prog "" "" ; then
-=C2=A0 iovec=3Dyes
-fi
-
=C2=A0##########################################
=C2=A0# fdt probe

@@ -3562,42 +3549,6 @@ EOF
=C2=A0 =C2=A0fi
=C2=A0fi

-#########################################
-# See if 64-bit atomic operations are supported.
-# Note that without __atomic builtins, we can only
-# assume atomic loads/stores max at pointer size.
-
-cat > $TMPC << EOF
-#include <stdint.h>
-int main(void)
-{
-=C2=A0 uint64_t x =3D 0, y =3D 0;
-=C2=A0 y =3D __atomic_load_n(&x, __ATOMIC_RELAXED);
-=C2=A0 __atomic_store_n(&x, y, __ATOMIC_RELAXED);
-=C2=A0 __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED,= __ATOMIC_RELAXED);
-=C2=A0 __atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
-=C2=A0 __atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
-=C2=A0 return 0;
-}
-EOF
-if compile_prog "" "" ; then
-=C2=A0 atomic64=3Dyes
-fi
-
-########################################
-# check if getauxval is available.
-
-getauxval=3Dno
-cat > $TMPC << EOF
-#include <sys/auxv.h>
-int main(void) {
-=C2=A0 return getauxval(AT_HWCAP) =3D=3D 0;
-}
-EOF
-if compile_prog "" "" ; then
-=C2=A0 =C2=A0 getauxval=3Dyes
-fi
-
=C2=A0########################################
=C2=A0# check if ccache is interfering with
=C2=A0# semantic analysis of macros
@@ -3671,33 +3622,6 @@ else
=C2=A0 =C2=A0 =C2=A0membarrier=3Dno
=C2=A0fi

-##########################################
-# check for usable AF_VSOCK environment
-have_af_vsock=3Dno
-cat > $TMPC << EOF
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#if !defined(AF_VSOCK)
-# error missing AF_VSOCK flag
-#endif
-#include <linux/vm_sockets.h>
-int main(void) {
-=C2=A0 =C2=A0 int sock, ret;
-=C2=A0 =C2=A0 struct sockaddr_vm svm;
-=C2=A0 =C2=A0 socklen_t len =3D sizeof(svm);
-=C2=A0 =C2=A0 sock =3D socket(AF_VSOCK, SOCK_STREAM, 0);
-=C2=A0 =C2=A0 ret =3D getpeername(sock, (struct sockaddr *)&svm, &= len);
-=C2=A0 =C2=A0 if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { -=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
-=C2=A0 =C2=A0 }
-=C2=A0 =C2=A0 return -1;
-}
-EOF
-if compile_prog "" "" ; then
-=C2=A0 =C2=A0 have_af_vsock=3Dyes
-fi
-
=C2=A0##########################################
=C2=A0# check for usable AF_ALG environment
=C2=A0have_afalg=3Dno
@@ -4173,9 +4097,6 @@ fi
=C2=A0if test "$vhost_user_fs" =3D "yes" ; then
=C2=A0 =C2=A0echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_hos= t_mak
=C2=A0fi
-if test "$iovec" =3D "yes" ; then
-=C2=A0 echo "CONFIG_IOVEC=3Dy" >> $config_host_mak
-fi
=C2=A0if test "$membarrier" =3D "yes" ; then
=C2=A0 =C2=A0echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_m= ak
=C2=A0fi
@@ -4245,14 +4166,6 @@ if test "$cmpxchg128" =3D "yes" = ; then
=C2=A0 =C2=A0echo "CONFIG_CMPXCHG128=3Dy" >> $config_host_m= ak
=C2=A0fi

-if test "$atomic64" =3D "yes" ; then
-=C2=A0 echo "CONFIG_ATOMIC64=3Dy" >> $config_host_mak
-fi
-
-if test "$getauxval" =3D "yes" ; then
-=C2=A0 echo "CONFIG_GETAUXVAL=3Dy" >> $config_host_mak
-fi
-
=C2=A0if test "$libssh" =3D "yes" ; then
=C2=A0 =C2=A0echo "CONFIG_LIBSSH=3Dy" >> $config_host_mak =C2=A0 =C2=A0echo "LIBSSH_CFLAGS=3D$libssh_cflags" >> $conf= ig_host_mak
@@ -4280,10 +4193,6 @@ if test "$replication" =3D "yes"= ; then
=C2=A0 =C2=A0echo "CONFIG_REPLICATION=3Dy" >> $config_host_= mak
=C2=A0fi

-if test "$have_af_vsock" =3D "yes" ; then
-=C2=A0 echo "CONFIG_AF_VSOCK=3Dy" >> $config_host_mak
-fi
-
=C2=A0if test "$debug_mutex" =3D "yes" ; then
=C2=A0 =C2=A0echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_= mak
=C2=A0fi
diff --git a/meson.build b/meson.build
index 0721309ed1..f08f364c90 100644
--- a/meson.build
+++ b/meson.build
@@ -1552,6 +1552,8 @@ config_host_data.set('CONFIG_INOTIFY',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 cc.has_header_symbol('sys/inotify.h', 'inotify_init'))<= br> =C2=A0config_host_data.set('CONFIG_INOTIFY1',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 cc.has_header_symbol('sys/inotify.h', 'inotify_init1'))=
+config_host_data.set('CONFIG_IOVEC',
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0cc.has_header_symbol('sys/uio.h', 'struct iovec'))
=C2=A0config_host_data.set('CONFIG_MACHINE_BSWAP_H',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 cc.has_header_symbol('machine/bswap.h', 'bswap32',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0prefix: '''#include <sys/endian.h>
@@ -1700,6 +1702,49 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX',= not cc.compiles('''
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return printf("%zu", SIZE_MAX);=
=C2=A0 =C2=A0 =C2=A0}''', args: ['-Werror']))

+# See if 64-bit atomic operations are supported.
+# Note that without __atomic builtins, we can only
+# assume atomic loads/stores max at pointer size.
+config_host_data.set('CONFIG_ATOMIC64', cc.links(''' +=C2=A0 cat > $TMPC << EOF
+=C2=A0 #include <stdint.h>
+=C2=A0 int main(void)
+=C2=A0 {
+=C2=A0 =C2=A0 uint64_t x =3D 0, y =3D 0;
+=C2=A0 =C2=A0 y =3D __atomic_load_n(&x, __ATOMIC_RELAXED);
+=C2=A0 =C2=A0 __atomic_store_n(&x, y, __ATOMIC_RELAXED);
+=C2=A0 =C2=A0 __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_R= ELAXED, __ATOMIC_RELAXED);
+=C2=A0 =C2=A0 __atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
+=C2=A0 =C2=A0 __atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
+=C2=A0 =C2=A0 return 0;
+=C2=A0 }'''))
+
+config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefi= x + '''
+=C2=A0 #include <sys/auxv.h>
+=C2=A0 int main(void) {
+=C2=A0 =C2=A0 return getauxval(AT_HWCAP) =3D=3D 0;
+=C2=A0 }'''))
+
+config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_pre= fix + '''
+=C2=A0 #include <errno.h>
+=C2=A0 #include <sys/types.h>
+=C2=A0 #include <sys/socket.h>
+=C2=A0 #if !defined(AF_VSOCK)
+=C2=A0 # error missing AF_VSOCK flag
+=C2=A0 #endif
+=C2=A0 #include <linux/vm_sockets.h>
+=C2=A0 int main(void) {
+=C2=A0 =C2=A0 int sock, ret;
+=C2=A0 =C2=A0 struct sockaddr_vm svm;
+=C2=A0 =C2=A0 socklen_t len =3D sizeof(svm);
+=C2=A0 =C2=A0 sock =3D socket(AF_VSOCK, SOCK_STREAM, 0);
+=C2=A0 =C2=A0 ret =3D getpeername(sock, (struct sockaddr *)&svm, &= len);
+=C2=A0 =C2=A0 if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
+=C2=A0 =C2=A0 }
+=C2=A0 =C2=A0 return -1;
+=C2=A0 }'''))
+
=C2=A0ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-targ= et
=C2=A0 =C2=A0 =C2=A0'HAVE_GDB_BIN']
=C2=A0arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_W= HITELIST']
--
2.31.1





--
Marc-Andr= =C3=A9 Lureau
--000000000000ff03c105cdc94995--