From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501031331888.0459922515518; Mon, 5 Jul 2021 09:03:51 -0700 (PDT) Received: from localhost ([::1]:54732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R4X-0004Mz-KY for importer@patchew.org; Mon, 05 Jul 2021 12:03:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1F-0001At-PK for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:25 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:47061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1D-0003Zf-QM for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:25 -0400 Received: by mail-wr1-x42e.google.com with SMTP id n9so5307514wrs.13 for ; Mon, 05 Jul 2021 09:00:22 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EBf1XxvnjwHyACj8LDHAse0MRy1NY8enHUr2qaJuunM=; b=eAEbdettcHmaLY0E4YyDPbonTw8gf94saVK04tIcxJReYt1IOciR9UGxw1GgP0aeFV jm9e4bjIYTdZU6wQSSFM9SvxMGsiMSzzEbuuhQuNCqOVoDKq08ksMuDgPn9V+FVCf3kU VtulXhff1kdbtq3Ilv7qXTzwS1ocSY0t3uzxIN1TEgSG0tYpbhfCNVEUEOpDWTXmWSox 9HAcvaOcpkSze9nmyMR26kL5C51vn2NZ6G0YeGCnf5p6TH8eB5bCV5jYdcQYpJ0TQjGW t4gyroVTXgv8SHyo+BwXcCXwOtPTkQgsjS8DD/smgHcXGfDyKDkwZCcxtE2u9BUxIbRr G8qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EBf1XxvnjwHyACj8LDHAse0MRy1NY8enHUr2qaJuunM=; b=jN6lDyHE0ov0DQW4KSUpoMtc/uj0f4QN6EWpc4eSzARuSv0sBRASyQxDVcVVGy7l4R 2yPtLZv+2EsVVGc+WWkUwBpEj1TewQdFbYtk0MeDfaNp2dD3a89Lv/XgDy4rDrIzdZNu zeP9zdqOZ6gPYxJtAUyEydVN+ZzwiEowMZhCka9458Tc2Tw1BLBUPODOZIm2ib/pTIs2 2u1RCtm1Vs32Cu3WPb2fd62cjn9n4hvqFhMWGmzc/OPP3xthlyjebyB8yiIL08jjTCri eu+4hR8vWWS11SK0EsLzRL24XxQFx/glNu+DUIo2eY7It1A8yaArd/EyoVfyOJdYshRq XphA== X-Gm-Message-State: AOAM531rE2TXtaoNaBRM5dcwvv/i1qDnfyHS1F59VQuEm3PPWrWTC9PM sr5JUPBCoQQtXFwbR2x8Rced8HHPaSo= X-Google-Smtp-Source: ABdhPJxa7CSfTiGvV7ET4OI4cvha/aBEoS/8Zo7lesHEHGXyZr2Q2LL5V5msXRysIV9gMo4FMW2tSw== X-Received: by 2002:adf:e8cc:: with SMTP id k12mr16400897wrn.163.1625500820992; Mon, 05 Jul 2021 09:00:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/17] configure: drop vte-2.90 check Date: Mon, 5 Jul 2021 18:00:02 +0200 Message-Id: <20210705160018.241397-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501039908100001 All currently supported distros have vte 0.37 or newer, which is where the ABI changed from 2.90 to 2.91. So drop support for the older ABI. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/configure b/configure index e799d908a3..27841f82ed 100755 --- a/configure +++ b/configure @@ -2803,19 +2803,13 @@ fi # VTE probe =20 if test "$vte" !=3D "no"; then - vteminversion=3D"0.32.0" if $pkg_config --exists "vte-2.91"; then - vtepackage=3D"vte-2.91" - else - vtepackage=3D"vte-2.90" - fi - if $pkg_config --exists "$vtepackage >=3D $vteminversion"; then - vte_cflags=3D$($pkg_config --cflags $vtepackage) - vte_libs=3D$($pkg_config --libs $vtepackage) - vteversion=3D$($pkg_config --modversion $vtepackage) + vte_cflags=3D$($pkg_config --cflags vte-2.91) + vte_libs=3D$($pkg_config --libs vte-2.91) + vteversion=3D$($pkg_config --modversion vte-2.91) vte=3D"yes" elif test "$vte" =3D "yes"; then - feature_not_found "vte" "Install libvte-2.90/2.91 devel" + feature_not_found "vte" "Install libvte-2.91 devel" else vte=3D"no" fi --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501449693148.45779644554534; Mon, 5 Jul 2021 09:10:49 -0700 (PDT) Received: from localhost ([::1]:45400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RBI-00009s-CN for importer@patchew.org; Mon, 05 Jul 2021 12:10:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0001Du-Qk for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:47063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1E-0003Zx-EP for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: by mail-wr1-x430.google.com with SMTP id n9so5307566wrs.13 for ; Mon, 05 Jul 2021 09:00:22 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=03obOzQzFKxxGK58An9x0R6rMsF9scgR64kQ9BUIJJE=; b=MDZN7UNIt+agyCv8SQsPZTJ/kOWhD2XUYEsmpMvlKy1FQd4JDy3gUXYXVXu6v3RMCP LVgc3TAXWyHSREX1WX+orVeMUkQXSr5EJ1Y5Tu5RdTFlEUQnfvn6L4VZWXVgchM6Vr6c 2n0ASNSdaC+f3fnho6tZs422v7+Tmpp9tfljj9pEJgUeBIxdDK8UYHweN2cyAA6VlYMt G+K+b5edAvMPUkOEhCxjvrKMfis6sCWD1AsLr0f0IGBrdo7geTm2Poxa/EAwVeNndwB9 awzUQQP5kJ2ix7ysjpxBHi4plA//Tc7ICwIEvVeV8KtOenJvLa4uTOtsDoQ1ZdNPti9P khNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=03obOzQzFKxxGK58An9x0R6rMsF9scgR64kQ9BUIJJE=; b=YtnDFWL+4bbhIgN7oFPmswycs7CW64ghU21WFX4fc91kJSJVEvxWnA54/hKMCk8eNd v5TpbtKDG9i1s5vQIHjaxX8sk4jSsHLmkGbxq8zQO9kTw6wUSxSqOxgjAXxJgbcu85of iveI4B9rbW5ozBjOETUh5jNYCyHXQy8KoHsfCMTMVoExZ+Pr+DnozAUf3MEojon2a9b0 kG+QbjN03F9E/1EpAyLVYlb1rFbXneqqcYoeJQk/BNGP5AmLPrq+JltyyWnqsIvhGS31 nXdbOZJjswPJFLdXvR9aX2D8wi8bL6AGC2bvyMhsON9/1ycAeC0WISNYDnciA89tVu3Z x2aw== X-Gm-Message-State: AOAM532e63aLrFhoyQ2zL4Y7hTq6g/uorb7OEh/V9cpjywF2muEJ5fKv AxWE8XBT9hxCHZvFgQCRhhWf3bbc4Vc= X-Google-Smtp-Source: ABdhPJzhJjfX9wFdLYLggSfXjXxPZ6YP6WgvZOucx9t4EtGskA3rdSMkh5IhaHzWDe7xo9lOLnFAsg== X-Received: by 2002:adf:ee10:: with SMTP id y16mr16520991wrn.99.1625500821679; Mon, 05 Jul 2021 09:00:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/17] configure, meson: convert vte detection to meson Date: Mon, 5 Jul 2021 18:00:03 +0200 Message-Id: <20210705160018.241397-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501455531100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 29 ++++------------------------- meson.build | 16 ++++++++++------ meson_options.txt | 2 ++ 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 27841f82ed..fe86da4fdd 100755 --- a/configure +++ b/configure @@ -408,7 +408,7 @@ gnutls=3D"auto" nettle=3D"auto" gcrypt=3D"auto" auth_pam=3D"auto" -vte=3D"$default_feature" +vte=3D"auto" virglrenderer=3D"$default_feature" tpm=3D"$default_feature" libssh=3D"$default_feature" @@ -1395,9 +1395,9 @@ for opt do ;; --disable-pvrdma) pvrdma=3D"no" ;; - --disable-vte) vte=3D"no" + --disable-vte) vte=3D"disabled" ;; - --enable-vte) vte=3D"yes" + --enable-vte) vte=3D"enabled" ;; --disable-virglrenderer) virglrenderer=3D"no" ;; @@ -2799,22 +2799,6 @@ EOF fi fi =20 -########################################## -# VTE probe - -if test "$vte" !=3D "no"; then - if $pkg_config --exists "vte-2.91"; then - vte_cflags=3D$($pkg_config --cflags vte-2.91) - vte_libs=3D$($pkg_config --libs vte-2.91) - vteversion=3D$($pkg_config --modversion vte-2.91) - vte=3D"yes" - elif test "$vte" =3D "yes"; then - feature_not_found "vte" "Install libvte-2.91 devel" - else - vte=3D"no" - fi -fi - ########################################## # RDMA needs OpenFabrics libraries if test "$rdma" !=3D "no" ; then @@ -5482,11 +5466,6 @@ fi if test "$have_copy_file_range" =3D "yes" ; then echo "HAVE_COPY_FILE_RANGE=3Dy" >> $config_host_mak fi -if test "$vte" =3D "yes" ; then - echo "CONFIG_VTE=3Dy" >> $config_host_mak - echo "VTE_CFLAGS=3D$vte_cflags" >> $config_host_mak - echo "VTE_LIBS=3D$vte_libs" >> $config_host_mak -fi if test "$virglrenderer" =3D "yes" ; then echo "CONFIG_VIRGL=3Dy" >> $config_host_mak echo "VIRGL_CFLAGS=3D$virgl_cflags" >> $config_host_mak @@ -6149,7 +6128,7 @@ if test "$skip_meson" =3D no; then -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf -Dnvmm=3D$nv= mm \ -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ -Dcocoa=3D$cocoa -Dgtk=3D$gtk -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_= image=3D$sdl_image \ - -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard -Dusb_redir=3D$usb_red= ir \ + -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard -Dusb_redir=3D$usb_red= ir -Dvte=3D$vte \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ diff --git a/meson.build b/meson.build index db6789af9c..b15c1ee4fd 100644 --- a/meson.build +++ b/meson.build @@ -860,6 +860,7 @@ endif =20 gtk =3D not_found gtkx11 =3D not_found +vte =3D not_found if not get_option('gtk').auto() or (have_system and not cocoa.found()) gtk =3D dependency('gtk+-3.0', version: '>=3D3.22.0', method: 'pkg-config', @@ -871,14 +872,16 @@ if not get_option('gtk').auto() or (have_system and n= ot cocoa.found()) required: false, kwargs: static_kwargs) gtk =3D declare_dependency(dependencies: [gtk, gtkx11]) + + if not get_option('vte').auto() or have_system + vte =3D dependency('vte-2.91', + method: 'pkg-config', + required: get_option('vte'), + kwargs: static_kwargs) + endif endif endif =20 -vte =3D not_found -if 'CONFIG_VTE' in config_host - vte =3D declare_dependency(compile_args: config_host['VTE_CFLAGS'].split= (), - link_args: config_host['VTE_LIBS'].split()) -endif x11 =3D not_found if gtkx11.found() x11 =3D dependency('x11', method: 'pkg-config', required: gtkx11.found(), @@ -1208,6 +1211,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_ha= s_stat) endif config_host_data.set('CONFIG_GTK', gtk.found()) +config_host_data.set('CONFIG_VTE', vte.found()) config_host_data.set('CONFIG_LIBATTR', have_old_libattr) config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found()) config_host_data.set('CONFIG_EBPF', libbpf.found()) @@ -2756,7 +2760,7 @@ summary_info +=3D {'SDL image support': sdl_image.fou= nd()} summary_info +=3D {'GTK support': gtk.found()} summary_info +=3D {'pixman': pixman.found()} # TODO: add back version -summary_info +=3D {'VTE support': config_host.has_key('CONFIG_VTE')} +summary_info +=3D {'VTE support': vte.found()} # TODO: add back version summary_info +=3D {'slirp support': slirp_opt =3D=3D 'disabled' ? fals= e : slirp_opt} summary_info +=3D {'libtasn1': tasn1.found()} diff --git a/meson_options.txt b/meson_options.txt index f7ec9bee27..8af42987f4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -118,6 +118,8 @@ option('vnc_png', type : 'feature', value : 'auto', description: 'PNG compression for VNC server') option('vnc_sasl', type : 'feature', value : 'auto', description: 'SASL authentication for VNC server') +option('vte', type : 'feature', value : 'auto', + description: 'vte support for the gtk UI') option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') option('zstd', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501624590712.7175723527581; Mon, 5 Jul 2021 09:13:44 -0700 (PDT) Received: from localhost ([::1]:53736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RE7-0005ys-F0 for importer@patchew.org; Mon, 05 Jul 2021 12:13:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0001Dy-Tn for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1E-0003aG-M8 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: by mail-wm1-x335.google.com with SMTP id l1so11702230wme.4 for ; Mon, 05 Jul 2021 09:00:24 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SK7FknGsSrVgBMFyN/dZ8ttg0HVj9/0z08oXPSrO+gU=; b=M8Zi8ZLI+hn/Lu2eoOKlPm9HsLDGFrb1E1NPEQTgmKlxl1Y0f4b10xkNtypkrT1zhz ZmzLs8xXpUHHkO4a7Xn05RJIjWFpkjpHjyJF9MdagzsRqimvTqmmVhnxeA+u9LhRm8Ov YuvRX8F+BzcsMfltND3ZXgJUWg5AxSBy8yw8M6i0Euq7qrVHWOgs3OqYkG+ydqzSMw16 x+bIo8Y3FjnbKono8soO6oQ35E6jS3kM9DIkb/PzHwptrFETEeoD7sSDboqIewj2hDMD KNW/XANmwybc6WUJYFe6sVZNFsK7zD5zeJCkcDUqYk2AH3ZBmmupSH8OI6lVAWLqph7l jsLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SK7FknGsSrVgBMFyN/dZ8ttg0HVj9/0z08oXPSrO+gU=; b=pRU3umrQIPCg20r4fxFs4Er127vlYsPJZ0fmbHxugUyC4j8+8irLBp3kRvlUALhxGw VjcK2Bb0zeP7Bfk7l29w5bCOhSW+wXX2tWZFtXcjO4K/gM/CdLyry2DbLHH8HyKDaV3p cgchSgySP3hEBG9j+VjVtDWC4UX/VPm8h1CzRL44jlMRT55SS85xqDo9AFjuaut7bcyc hGlVJzXBewZuLCXfou+vsucsaJUwnAqrfk1EzHP5+o6mqKxAya0i/5HwxUQbWATe3Dk5 +HQmVhPwAGHj6NxDcYC77v0fNIGnEfwHlHwgoUk/iZ76BO4c0+eOitQ1S4ioDv8o7zcP ISGw== X-Gm-Message-State: AOAM533eV5WKd3pziGdODfOQCN3+qui1i+61SY5S6FAuw7XH7DY3pMv1 LpfAfeau2tglHBPKuxUwteMLamLWNh0= X-Google-Smtp-Source: ABdhPJy4b6lHT5ZO8emJoAe9GKpAN0PIbCgxZVtA8NaKaHQbmkd6e5qosbW6Q7hM3Wp2ks+6T4Zg9g== X-Received: by 2002:a1c:b485:: with SMTP id d127mr16201341wmf.82.1625500822298; Mon, 05 Jul 2021 09:00:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/17] configure, meson: convert virgl detection to meson Date: Mon, 5 Jul 2021 18:00:04 +0200 Message-Id: <20210705160018.241397-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501629313100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 35 ++++------------------------------- hw/display/meson.build | 6 +++--- meson.build | 10 ++++++---- meson_options.txt | 2 ++ 4 files changed, 15 insertions(+), 38 deletions(-) diff --git a/configure b/configure index fe86da4fdd..895192e0de 100755 --- a/configure +++ b/configure @@ -409,7 +409,7 @@ nettle=3D"auto" gcrypt=3D"auto" auth_pam=3D"auto" vte=3D"auto" -virglrenderer=3D"$default_feature" +virglrenderer=3D"auto" tpm=3D"$default_feature" libssh=3D"$default_feature" live_block_migration=3D${default_feature:-yes} @@ -1399,9 +1399,9 @@ for opt do ;; --enable-vte) vte=3D"enabled" ;; - --disable-virglrenderer) virglrenderer=3D"no" + --disable-virglrenderer) virglrenderer=3D"disabled" ;; - --enable-virglrenderer) virglrenderer=3D"yes" + --enable-virglrenderer) virglrenderer=3D"enabled" ;; --disable-tpm) tpm=3D"no" ;; @@ -4036,28 +4036,6 @@ EOF fi fi =20 -########################################## -# virgl renderer probe - -if test "$virglrenderer" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { virgl_renderer_poll(); return 0; } -EOF - virgl_cflags=3D$($pkg_config --cflags virglrenderer 2>/dev/null) - virgl_libs=3D$($pkg_config --libs virglrenderer 2>/dev/null) - virgl_version=3D$($pkg_config --modversion virglrenderer 2>/dev/null) - if $pkg_config virglrenderer >/dev/null 2>&1 && \ - compile_prog "$virgl_cflags" "$virgl_libs" ; then - virglrenderer=3D"yes" - else - if test "$virglrenderer" =3D "yes" ; then - feature_not_found "virglrenderer" - fi - virglrenderer=3D"no" - fi -fi - ########################################## # capstone =20 @@ -5466,11 +5444,6 @@ fi if test "$have_copy_file_range" =3D "yes" ; then echo "HAVE_COPY_FILE_RANGE=3Dy" >> $config_host_mak fi -if test "$virglrenderer" =3D "yes" ; then - echo "CONFIG_VIRGL=3Dy" >> $config_host_mak - echo "VIRGL_CFLAGS=3D$virgl_cflags" >> $config_host_mak - echo "VIRGL_LIBS=3D$virgl_libs" >> $config_host_mak -fi if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak @@ -6137,7 +6110,7 @@ if test "$skip_meson" =3D no; then -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ - -Dattr=3D$attr -Ddefault_devices=3D$default_devices \ + -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ diff --git a/hw/display/meson.build b/hw/display/meson.build index e1f473c1df..1e6b707d3c 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -61,7 +61,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_GPU') hw_display_modules +=3D {'virtio-gpu': virtio_gpu_ss} =20 virtio_gpu_gl_ss =3D ss.source_set() - virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL', opengl], + virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', virgl, opengl], if_true: [files('virtio-gpu-gl.c', 'virtio-gpu-virg= l.c'), pixman, virgl]) hw_display_modules +=3D {'virtio-gpu-gl': virtio_gpu_gl_ss} endif @@ -75,7 +75,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_PCI') hw_display_modules +=3D {'virtio-gpu-pci': virtio_gpu_pci_ss} =20 virtio_gpu_pci_gl_ss =3D ss.source_set() - virtio_gpu_pci_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'= , 'CONFIG_VIRGL', opengl], + virtio_gpu_pci_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'= , virgl, opengl], if_true: [files('virtio-gpu-pci-gl.c'), pixman]) hw_display_modules +=3D {'virtio-gpu-pci-gl': virtio_gpu_pci_gl_ss} endif @@ -89,7 +89,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_VGA') hw_display_modules +=3D {'virtio-vga': virtio_vga_ss} =20 virtio_vga_gl_ss =3D ss.source_set() - virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', 'CONFIG_VIRGL', opengl], + virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl], if_true: [files('virtio-vga-gl.c'), pixman]) hw_display_modules +=3D {'virtio-vga-gl': virtio_vga_gl_ss} endif diff --git a/meson.build b/meson.build index b15c1ee4fd..84ffdb4599 100644 --- a/meson.build +++ b/meson.build @@ -471,9 +471,11 @@ if 'CONFIG_GBM' in config_host link_args: config_host['GBM_LIBS'].split()) endif virgl =3D not_found -if 'CONFIG_VIRGL' in config_host - virgl =3D declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].s= plit(), - link_args: config_host['VIRGL_LIBS'].split()) +if not get_option('virglrenderer').auto() or have_system + virgl =3D dependency('virglrenderer', + method: 'pkg-config', + required: get_option('virglrenderer'), + kwargs: static_kwargs) endif curl =3D not_found if not get_option('curl').auto() or have_block @@ -2768,7 +2770,7 @@ summary_info +=3D {'PAM': pam.found()} summary_info +=3D {'iconv support': iconv.found()} summary_info +=3D {'curses support': curses.found()} # TODO: add back version -summary_info +=3D {'virgl support': config_host.has_key('CONFIG_VIRGL'= )} +summary_info +=3D {'virgl support': virgl.found()} summary_info +=3D {'curl support': curl.found()} summary_info +=3D {'Multipath support': mpathpersist.found()} summary_info +=3D {'VNC support': vnc.found()} diff --git a/meson_options.txt b/meson_options.txt index 8af42987f4..a70aedb0eb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -110,6 +110,8 @@ option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', description: 'libusbredir support') +option('virglrenderer', type : 'feature', value : 'auto', + description: 'virgl rendering support') option('vnc', type : 'feature', value : 'enabled', description: 'VNC server') option('vnc_jpeg', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501203252600.7534488757813; Mon, 5 Jul 2021 09:06:43 -0700 (PDT) Received: from localhost ([::1]:36322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R7K-0002XJ-6I for importer@patchew.org; Mon, 05 Jul 2021 12:06:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1G-0001CY-GO for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:26 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1E-0003aE-Dt for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:26 -0400 Received: by mail-wr1-x431.google.com with SMTP id i8so22713413wrc.0 for ; Mon, 05 Jul 2021 09:00:23 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/MVRv4+jx3llq16RDcVRAyicy4Ay5QfckD+dpn3sjS4=; b=S4LHvcyBqkvCx91D0JaPZ8kVh4S5GMSE/M02y4Ushgy6+937EqDsuQUJfXSLUwpmr5 LYq5TvCLW+1JhVMhunjwA1FzcAkgN1L9+o3JgFFicWFXEybFox0mEccA4G478Jtizv0I A+xW1EJIkh0IL4TqP7nlhlc5kBzJdR7xEZlK8Anoy4WprsTxbemnffWwAJEfvvRESgWP M020caudgDUaKdq/48s+dpebUaZf1JbS/+qrdBKZ41wXQwbQHGMVqT56vgtJpSuCG0c2 xlGfBoVjOYUzfRlHS7a7c+6UU8dYjZERnN66K6HBQ7gyvWv14pMh3eqjPB+TvWGTVwtW YTMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/MVRv4+jx3llq16RDcVRAyicy4Ay5QfckD+dpn3sjS4=; b=HXZD5TRTaEF+svD6De7fx0Di/BEALgJAIdn+O9nfhLGDUSneqPSGe5HeFcAz3u3At7 jjUn49Jva29A08k/ANFSCmeaE7ZJ7eqwfvZcAmQVoHgocdcC02yU7Wun0cnXnIXN60kh vGSA6DisM7PvetupH25dGAPIBnuZN6gL/R+ejzCntzKeaq7vWCp7KOzNOrpgJmeakqcK SC2LpqW7ERioD7tQVyTCaN64dp1P3qqCTJvvbsld3DmxY62kws7G76eixRt06jJBo+ul eet31VCmzI5vg4PMP+NDUIQ0TgUPgW+ciTZI+tBLXG3+ek8W6EktBDW2uILw9C4HFlDN hS5Q== X-Gm-Message-State: AOAM532btA8yBT0Vi3tJSk5eqOAwMdKnw+WGKVG68slYt+2u4MsF7Iq7 JN00pXV3casSgimhr7tjM09KMWZYUII= X-Google-Smtp-Source: ABdhPJxiIpX7X7qlOxXExnpqI+y56pwzeTGmtB4ICluWR4T073CnXAVckI0AnFcypcEjD9VC0dv2Ng== X-Received: by 2002:a5d:5307:: with SMTP id e7mr16650522wrv.353.1625500823063; Mon, 05 Jul 2021 09:00:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/17] configure, meson: convert libdaxctl detection to meson Date: Mon, 5 Jul 2021 18:00:05 +0200 Message-Id: <20210705160018.241397-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501208350100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 28 ++++------------------------ meson.build | 8 +++++--- meson_options.txt | 2 ++ 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 895192e0de..5b18f4fac3 100755 --- a/configure +++ b/configure @@ -433,7 +433,7 @@ plugins=3D"no" fuzzing=3D"no" rng_none=3D"no" secret_keyring=3D"$default_feature" -libdaxctl=3D"$default_feature" +libdaxctl=3D"auto" meson=3D"" ninja=3D"" skip_meson=3Dno @@ -1534,9 +1534,9 @@ for opt do ;; --disable-keyring) secret_keyring=3D"no" ;; - --enable-libdaxctl) libdaxctl=3Dyes + --enable-libdaxctl) libdaxctl=3Ddisabled ;; - --disable-libdaxctl) libdaxctl=3Dno + --disable-libdaxctl) libdaxctl=3Denabled ;; --enable-fuse) fuse=3D"enabled" ;; @@ -4949,22 +4949,6 @@ if test "$libpmem" !=3D "no"; then fi fi =20 -########################################## -# check for libdaxctl - -if test "$libdaxctl" !=3D "no"; then - if $pkg_config --atleast-version=3D57 "libdaxctl"; then - libdaxctl=3D"yes" - libdaxctl_libs=3D$($pkg_config --libs libdaxctl) - libdaxctl_cflags=3D$($pkg_config --cflags libdaxctl) - else - if test "$libdaxctl" =3D "yes" ; then - feature_not_found "libdaxctl" "Install libdaxctl" - fi - libdaxctl=3D"no" - fi -fi - ########################################## # check for slirp =20 @@ -5738,11 +5722,6 @@ if test "$libpmem" =3D "yes" ; then echo "LIBPMEM_CFLAGS=3D$libpmem_cflags" >> $config_host_mak fi =20 -if test "$libdaxctl" =3D "yes" ; then - echo "CONFIG_LIBDAXCTL=3Dy" >> $config_host_mak - echo "LIBDAXCTL_LIBS=3D$libdaxctl_libs" >> $config_host_mak -fi - if test "$bochs" =3D "yes" ; then echo "CONFIG_BOCHS=3Dy" >> $config_host_mak fi @@ -6108,6 +6087,7 @@ if test "$skip_meson" =3D no; then -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ + -Dlibdaxctl=3D$libdaxctl \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ diff --git a/meson.build b/meson.build index 84ffdb4599..e530829105 100644 --- a/meson.build +++ b/meson.build @@ -1011,8 +1011,10 @@ if 'CONFIG_LIBPMEM' in config_host link_args: config_host['LIBPMEM_LIBS'].spli= t()) endif libdaxctl =3D not_found -if 'CONFIG_LIBDAXCTL' in config_host - libdaxctl =3D declare_dependency(link_args: config_host['LIBDAXCTL_LIBS'= ].split()) +if not get_option('libdaxctl').auto() or have_system + libdaxctl =3D dependency('libdaxctl', required: get_option('libdaxctl'), + version: '>=3D57', method: 'pkg-config', + kwargs: static_kwargs) endif tasn1 =3D not_found if gnutls.found() @@ -2821,7 +2823,7 @@ summary_info +=3D {'NUMA host support': config_host.h= as_key('CONFIG_NUMA')} summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} summary_info +=3D {'capstone': capstone_opt =3D=3D 'disabled' ? f= alse : capstone_opt} summary_info +=3D {'libpmem support': config_host.has_key('CONFIG_LIBPME= M')} -summary_info +=3D {'libdaxctl support': config_host.has_key('CONFIG_LIBDAX= CTL')} +summary_info +=3D {'libdaxctl support': libdaxctl.found()} summary_info +=3D {'libudev': libudev.found()} summary_info +=3D {'FUSE lseek': fuse_lseek.found()} summary(summary_info, bool_yn: true, section: 'Dependencies') diff --git a/meson_options.txt b/meson_options.txt index a70aedb0eb..46180000fd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -84,6 +84,8 @@ option('nettle', type : 'feature', value : 'auto', description: 'nettle cryptography support') option('gcrypt', type : 'feature', value : 'auto', description: 'libgcrypt cryptography support') +option('libdaxctl', type : 'feature', value : 'auto', + description: 'libdaxctl support') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501193055603.9397650960117; Mon, 5 Jul 2021 09:06:33 -0700 (PDT) Received: from localhost ([::1]:35520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R79-00020k-Vp for importer@patchew.org; Mon, 05 Jul 2021 12:06:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0001Dv-QZ for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:40613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1F-0003aW-5M for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: by mail-wm1-x32d.google.com with SMTP id h18-20020a05600c3512b029020e4ceb9588so1138823wmq.5 for ; Mon, 05 Jul 2021 09:00:24 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NOvdFt+RLlKN0qQm+dvftDb9ngUzv7CJ6xbSDTj8gq0=; b=n1k3kt0cjvN9K9CqSgThl3DdjVlXqpitRw591yhycKHi1MSHu9KoU4P8mTLn7Fiy9b 1oT7+vQbOB6IaIBfxd9U+RngfIMiFYjphiyeT0/X5CKKPNEYMxg+4oiss3l3K4v6Di32 W9QeC1J2/T3X1OMZVPyRKVh2Rdqe/RVZi2vi7Sf1BwMtHdFZufhcYHpnMTGhjBjzTRa6 oGghweyDrreTatvbacWveLt15TJKG18xipXjbcZodigoaTIqW0XJ2ZZr6FarKLwd9dbv B/nFuCTtvXU8uKKo3ONp0siZF/xOwzl83ahntsJn3VgKoCOo8KPkjg7WfjhZo7DBUrid 4PqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NOvdFt+RLlKN0qQm+dvftDb9ngUzv7CJ6xbSDTj8gq0=; b=B2mACxATc0iBEEXgR3MddTQshuAZwq/iwBaF5WLqcWc9Ov78BeAgB2sjLZ0sWj2GWp GQDwHZ7vfUOAjLGf6hrM0ZkpPh863uzLIIejaDvczrs5UCB/itYJFh0fyvBmDcHcOU+1 cFNuO3RnsSc3ZNFDNJy5l8Fy3ZfQN5kQlEG6DnExz2ljjbz706a2XD0AeoDp650d2P52 3SDKqbPQyJCk0NMv7KjrfNn8at+sL/fFok4hCywa+qtlmNH/fVo+gcaTTWnqsuB0OnEs JHAdZzAB8AjIenOMQ5Uo2/ZYQMbD8dt9i60LXBDLaiCBdyh+UnwOnN50tDBtG7+/7EZx XQIg== X-Gm-Message-State: AOAM5315NyL+Xktj1f6cAMYk+1Rq21k5djfwLkHhCN1MJye1WbauaJDD ldOV90o9vnkMx57I3qGO1VQ7Qiyvk8c= X-Google-Smtp-Source: ABdhPJz3C6zhKyHYdKouzXEOLDYM8r7Hf3phMqaQy8lT/9MdOlnQF8t8CD48OnInXqIXdbbg6Os3NQ== X-Received: by 2002:a05:600c:a04:: with SMTP id z4mr15458200wmp.103.1625500823918; Mon, 05 Jul 2021 09:00:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/17] configure, meson: convert libpmem detection to meson Date: Mon, 5 Jul 2021 18:00:06 +0200 Message-Id: <20210705160018.241397-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501199284100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 24 ++++-------------------- meson.build | 8 ++++---- meson_options.txt | 2 ++ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 5b18f4fac3..51b8c3290a 100755 --- a/configure +++ b/configure @@ -427,7 +427,7 @@ qed=3D${default_feature:-yes} parallels=3D${default_feature:-yes} libxml2=3D"$default_feature" debug_mutex=3D"no" -libpmem=3D"$default_feature" +libpmem=3D"auto" default_devices=3D"true" plugins=3D"no" fuzzing=3D"no" @@ -1504,9 +1504,9 @@ for opt do ;; --disable-debug-mutex) debug_mutex=3Dno ;; - --enable-libpmem) libpmem=3Dyes + --enable-libpmem) libpmem=3Ddisabled ;; - --disable-libpmem) libpmem=3Dno + --disable-libpmem) libpmem=3Denabled ;; --enable-xkbcommon) xkbcommon=3D"enabled" ;; @@ -4933,22 +4933,6 @@ EOF fi fi =20 -########################################## -# check for libpmem - -if test "$libpmem" !=3D "no"; then - if $pkg_config --exists "libpmem"; then - libpmem=3D"yes" - libpmem_libs=3D$($pkg_config --libs libpmem) - libpmem_cflags=3D$($pkg_config --cflags libpmem) - else - if test "$libpmem" =3D "yes" ; then - feature_not_found "libpmem" "Install nvml or pmdk" - fi - libpmem=3D"no" - fi -fi - ########################################## # check for slirp =20 @@ -6087,7 +6071,7 @@ if test "$skip_meson" =3D no; then -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ - -Dlibdaxctl=3D$libdaxctl \ + -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ diff --git a/meson.build b/meson.build index e530829105..e301eda3a5 100644 --- a/meson.build +++ b/meson.build @@ -1006,9 +1006,9 @@ if not get_option('libusb').auto() or have_system endif =20 libpmem =3D not_found -if 'CONFIG_LIBPMEM' in config_host - libpmem =3D declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS= '].split(), - link_args: config_host['LIBPMEM_LIBS'].spli= t()) +if not get_option('libpmem').auto() or have_system + libpmem =3D dependency('libpmem', required: get_option('libpmem'), + method: 'pkg-config', kwargs: static_kwargs) endif libdaxctl =3D not_found if not get_option('libdaxctl').auto() or have_system @@ -2822,7 +2822,7 @@ summary_info +=3D {'zstd support': zstd.found()} summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} summary_info +=3D {'capstone': capstone_opt =3D=3D 'disabled' ? f= alse : capstone_opt} -summary_info +=3D {'libpmem support': config_host.has_key('CONFIG_LIBPME= M')} +summary_info +=3D {'libpmem support': libpmem.found()} summary_info +=3D {'libdaxctl support': libdaxctl.found()} summary_info +=3D {'libudev': libudev.found()} summary_info +=3D {'FUSE lseek': fuse_lseek.found()} diff --git a/meson_options.txt b/meson_options.txt index 46180000fd..b23174d0a1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -86,6 +86,8 @@ option('gcrypt', type : 'feature', value : 'auto', description: 'libgcrypt cryptography support') option('libdaxctl', type : 'feature', value : 'auto', description: 'libdaxctl support') +option('libpmem', type : 'feature', value : 'auto', + description: 'libpmem support') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501356463756.8319668069998; Mon, 5 Jul 2021 09:09:16 -0700 (PDT) Received: from localhost ([::1]:44062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R9n-0007gc-5c for importer@patchew.org; Mon, 05 Jul 2021 12:09:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1I-0001F7-AO for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:28 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:37833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1G-0003ba-DC for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:27 -0400 Received: by mail-wr1-x42e.google.com with SMTP id i94so22671830wri.4 for ; Mon, 05 Jul 2021 09:00:25 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kaaZWJiitdvOZB1EKQidwztAXzBPA1xDA7Q+V1EEpW4=; b=VtbJyV3iLB/zIxfZSIKPhIIq2I7NCGVe63TfJ7Y7VM6mc+1uqsksKvLoUpsdrJC5V0 FtTePkgdXvceYoUgHENHhQrPbChPDH4GQ9R3/c8ER1FVxeM63VEOq796+7iTv3li8dLw ygZXuiMWj+5KchwsQhlKiQSkHz3C2f34TmJnaCnW+MvuAIsZcsZl8EsbCnQS91L75n7t Dog8qhDlbD2bR2IlpCyAKLU2tSuShylfBeCJAwhh8v/oEPFj6P/ci5p5uMNogPOBU2Hj 08iO+tZ2rbsVSHL5kBoQM1CziWvPEqpOEeYzLt/S9K72CvCES1uKls4rIGnFse6X+KDI 0Hww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kaaZWJiitdvOZB1EKQidwztAXzBPA1xDA7Q+V1EEpW4=; b=tYJNdeCracK7pQCc6IBDua7EQH7CxUSs2dz9cuM9Av+Sd52xxas87nep+AfMYFbH6l KRsCZlxpJa45BLVoEXoJumFJvTjEGK8OB85RVHazHM6oyE969ScyiegQkUDePV7gkTHv px+Lz0P/pNEs1FGkmaYRlHjGUByciX3MzrZ3mcMcS3OgmTqvLzp8RSMCiQhnJqya0jhZ 2BZB7cjrjFhE00kHCBifjg869hvehUxIMFO0V6+/BEOeDf84QhRHa8JV3TyCdoEuFM0t l19DA4WB4oYycXaFTMksmD1jRcvwznsZJblVVZdB6XhjzfQ5Wuqu6sM/lg+bZNghJ75V S9Pw== X-Gm-Message-State: AOAM532ZKiQI48tp00znLbanRrGmZCXmM194m2VOheFy82PXtfbHHhwM JQFRK2435vj/8PDQVkjSnMLsAG+/PtA= X-Google-Smtp-Source: ABdhPJwG1Q+uiWeUMJPcToWqVHLZ1xiWNwz5Pg7OsULWECJANOPquD4ZXHz1wl2ml/wqwkY2Zta9MA== X-Received: by 2002:a5d:6485:: with SMTP id o5mr17099664wri.286.1625500824595; Mon, 05 Jul 2021 09:00:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/17] configure, meson: convert liburing detection to meson Date: Mon, 5 Jul 2021 18:00:07 +0200 Message-Id: <20210705160018.241397-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501360547100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 28 ++++------------------------ meson.build | 9 +++++---- meson_options.txt | 2 ++ 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 51b8c3290a..4e016f671c 100755 --- a/configure +++ b/configure @@ -315,7 +315,7 @@ xen=3D"$default_feature" xen_ctrl_version=3D"$default_feature" xen_pci_passthrough=3D"auto" linux_aio=3D"$default_feature" -linux_io_uring=3D"$default_feature" +linux_io_uring=3D"auto" cap_ng=3D"auto" attr=3D"auto" xfs=3D"$default_feature" @@ -1205,9 +1205,9 @@ for opt do ;; --enable-linux-aio) linux_aio=3D"yes" ;; - --disable-linux-io-uring) linux_io_uring=3D"no" + --disable-linux-io-uring) linux_io_uring=3D"disabled" ;; - --enable-linux-io-uring) linux_io_uring=3D"yes" + --enable-linux-io-uring) linux_io_uring=3D"enabled" ;; --disable-attr) attr=3D"disabled" ;; @@ -3334,21 +3334,6 @@ EOF linux_aio=3Dno fi fi -########################################## -# linux-io-uring probe - -if test "$linux_io_uring" !=3D "no" ; then - if $pkg_config liburing; then - linux_io_uring_cflags=3D$($pkg_config --cflags liburing) - linux_io_uring_libs=3D$($pkg_config --libs liburing) - linux_io_uring=3Dyes - else - if test "$linux_io_uring" =3D "yes" ; then - feature_not_found "linux io_uring" "Install liburing devel" - fi - linux_io_uring=3Dno - fi -fi =20 ########################################## # TPM emulation is only on POSIX @@ -5421,11 +5406,6 @@ fi if test "$linux_aio" =3D "yes" ; then echo "CONFIG_LINUX_AIO=3Dy" >> $config_host_mak fi -if test "$linux_io_uring" =3D "yes" ; then - echo "CONFIG_LINUX_IO_URING=3Dy" >> $config_host_mak - echo "LINUX_IO_URING_CFLAGS=3D$linux_io_uring_cflags" >> $config_host_mak - echo "LINUX_IO_URING_LIBS=3D$linux_io_uring_libs" >> $config_host_mak -fi if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak fi @@ -6071,7 +6051,7 @@ if test "$skip_meson" =3D no; then -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ - -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem \ + -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem -Dlinux_io_uring=3D$= linux_io_uring \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ diff --git a/meson.build b/meson.build index e301eda3a5..5304744f2e 100644 --- a/meson.build +++ b/meson.build @@ -327,10 +327,11 @@ if have_system or have_tools endif libaio =3D cc.find_library('aio', required: false) zlib =3D dependency('zlib', required: true, kwargs: static_kwargs) + linux_io_uring =3D not_found -if 'CONFIG_LINUX_IO_URING' in config_host - linux_io_uring =3D declare_dependency(compile_args: config_host['LINUX_I= O_URING_CFLAGS'].split(), - link_args: config_host['LINUX_IO_URI= NG_LIBS'].split()) +if not get_option('linux_io_uring').auto() or have_block + linux_io_uring =3D dependency('liburing', required: get_option('linux_io= _uring'), + method: 'pkg-config', kwargs: static_kwargs) endif libxml2 =3D not_found if 'CONFIG_LIBXML2' in config_host @@ -2785,7 +2786,7 @@ summary_info +=3D {'brlapi support': brlapi.found(= )} summary_info +=3D {'vde support': config_host.has_key('CONFIG_VDE')} summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} summary_info +=3D {'Linux AIO support': config_host.has_key('CONFIG_LINUX_= AIO')} -summary_info +=3D {'Linux io_uring support': config_host.has_key('CONFIG_L= INUX_IO_URING')} +summary_info +=3D {'Linux io_uring support': linux_io_uring.found()} summary_info +=3D {'ATTR/XATTR support': libattr.found()} summary_info +=3D {'RDMA support': config_host.has_key('CONFIG_RDMA')} summary_info +=3D {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA= ')} diff --git a/meson_options.txt b/meson_options.txt index b23174d0a1..6610c4dc64 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -92,6 +92,8 @@ option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', description: 'libusb support for USB passthrough') +option('linux_io_uring', type : 'feature', value : 'auto', + description: 'Linux io_uring support') option('lzfse', type : 'feature', value : 'auto', description: 'lzfse support for DMG images') option('lzo', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16255011286631004.6342082297792; Mon, 5 Jul 2021 09:05:28 -0700 (PDT) Received: from localhost ([::1]:59396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R66-0007Tc-Kr for importer@patchew.org; Mon, 05 Jul 2021 12:05:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1J-0001Hx-FT for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:29 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:37836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0003c5-G4 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:29 -0400 Received: by mail-wr1-x431.google.com with SMTP id i94so22671871wri.4 for ; Mon, 05 Jul 2021 09:00:26 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hEd6aN+rbZ1x2CIJyx9n+fGMegRkSbQEApN0YpiBx2I=; b=nkaIohX3R1SFnoPIP871KRlvw9fs50BM+//wVTSPwRN3jJwvI2zWMF3ygj0lvUlP5z xfteNb1zfxJM6vu0CIyh76iwE94t/1deD9Yg0NJyWlB0/Rm6NcaTqVPoJRPTE47ALBrz s2n6lw0+vLz3Bz7jX1Iu/F78kG1NEEJSzXzsxphNxSxpzWls8CCbtV+nxi+Ev1YTewO5 kOgCoCLy6+30s23PhYjU9PnH6cAxduaT/uQ3i+zwmV69780DbBcBRYh/sVIcZ+xfOWhR QCNAXBjLmcbWYePoAa6ipad4kazKNFQ9ZboP2Cth4Sg7/hZNuixDsZPiiVuQgXYN/ukQ alCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hEd6aN+rbZ1x2CIJyx9n+fGMegRkSbQEApN0YpiBx2I=; b=bJEwRnxlk6yPEIFSM5BL1jSt7/Z0czbRhBXkrsWnh9RiQgDjRTknUmZeFU2OoEwsnU byCPt64/Kg6XZvowr5E7K/nYpJ2EMcewq93KimN6UPDQU9JQhBl5WDWu/SaBXZWm72qY 9NfzhRD7S/uai8WgXMG35wEPZHry4d+/kzRanVQzmT6zI9F05F5NL37yUAvW+Qi4SLAt GMJ++3/Ng5j/RbHNMnPCX0n+ZeafAorU5EJ+sd7M5IqLBXrd0MgeWQR5H0jOqkdvQLDQ NICF3cYqjVwsB0q12pD1qwAtE2hIrQfEekArkvITJ/+GLXePoh5zOkKHtDcc2yO4VCUi ZFtg== X-Gm-Message-State: AOAM533Q9oc8JH1Y8cr9CzdZRtw+ELAbJ7W9217+Lf/grb4XOLxcVdZ7 eTuICgA1LHs4uQ/3Jvl6Mw8qbsdTjgA= X-Google-Smtp-Source: ABdhPJzo5VD5LRpmVoM8wKXXlAqbg5zenROEgaA3MlGuXyaMdFLDq8U1IhuPKq0Ry9hbzjrJDfg0Mw== X-Received: by 2002:adf:fa92:: with SMTP id h18mr16852970wrr.57.1625500825292; Mon, 05 Jul 2021 09:00:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/17] configure, meson: convert libxml2 detection to meson Date: Mon, 5 Jul 2021 18:00:08 +0200 Message-Id: <20210705160018.241397-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501133586100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 29 ++++------------------------- meson.build | 8 ++++---- meson_options.txt | 2 ++ 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 4e016f671c..341b74dd5e 100755 --- a/configure +++ b/configure @@ -425,7 +425,7 @@ vdi=3D${default_feature:-yes} vvfat=3D${default_feature:-yes} qed=3D${default_feature:-yes} parallels=3D${default_feature:-yes} -libxml2=3D"$default_feature" +libxml2=3D"auto" debug_mutex=3D"no" libpmem=3D"auto" default_devices=3D"true" @@ -1419,9 +1419,9 @@ for opt do ;; --enable-numa) numa=3D"yes" ;; - --disable-libxml2) libxml2=3D"no" + --disable-libxml2) libxml2=3D"disabled" ;; - --enable-libxml2) libxml2=3D"yes" + --enable-libxml2) libxml2=3D"enabled" ;; --disable-tcmalloc) tcmalloc=3D"no" ;; @@ -3409,21 +3409,6 @@ EOF fi fi =20 -########################################## -# libxml2 probe -if test "$libxml2" !=3D "no" ; then - if $pkg_config --exists libxml-2.0; then - libxml2=3D"yes" - libxml2_cflags=3D$($pkg_config --cflags libxml-2.0) - libxml2_libs=3D$($pkg_config --libs libxml-2.0) - else - if test "$libxml2" =3D "yes"; then - feature_not_found "libxml2" "Install libxml2 devel" - fi - libxml2=3D"no" - fi -fi - # Check for inotify functions when we are building linux-user # emulator. This is done because older glibc versions don't # have syscall stubs for these implemented. In that case we @@ -5636,12 +5621,6 @@ if test "$have_rtnetlink" =3D "yes" ; then echo "CONFIG_RTNETLINK=3Dy" >> $config_host_mak fi =20 -if test "$libxml2" =3D "yes" ; then - echo "CONFIG_LIBXML2=3Dy" >> $config_host_mak - echo "LIBXML2_CFLAGS=3D$libxml2_cflags" >> $config_host_mak - echo "LIBXML2_LIBS=3D$libxml2_libs" >> $config_host_mak -fi - if test "$replication" =3D "yes" ; then echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak fi @@ -6050,7 +6029,7 @@ if test "$skip_meson" =3D no; then -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ - -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ + -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse -Dli= bxml2=3D$libxml2 \ -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem -Dlinux_io_uring=3D$= linux_io_uring \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ diff --git a/meson.build b/meson.build index 5304744f2e..1216ac8f72 100644 --- a/meson.build +++ b/meson.build @@ -334,9 +334,9 @@ if not get_option('linux_io_uring').auto() or have_block method: 'pkg-config', kwargs: static_kwargs) endif libxml2 =3D not_found -if 'CONFIG_LIBXML2' in config_host - libxml2 =3D declare_dependency(compile_args: config_host['LIBXML2_CFLAGS= '].split(), - link_args: config_host['LIBXML2_LIBS'].spli= t()) +if not get_option('libxml2').auto() or have_block + libxml2 =3D dependency('libxml-2.0', required: get_option('libxml2'), + method: 'pkg-config', kwargs: static_kwargs) endif libnfs =3D not_found if not get_option('libnfs').auto() or have_block @@ -2821,7 +2821,7 @@ summary_info +=3D {'bzip2 support': libbzip2.foun= d()} summary_info +=3D {'lzfse support': liblzfse.found()} summary_info +=3D {'zstd support': zstd.found()} summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} -summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} +summary_info +=3D {'libxml2': libxml2.found()} summary_info +=3D {'capstone': capstone_opt =3D=3D 'disabled' ? f= alse : capstone_opt} summary_info +=3D {'libpmem support': libpmem.found()} summary_info +=3D {'libdaxctl support': libdaxctl.found()} diff --git a/meson_options.txt b/meson_options.txt index 6610c4dc64..a9a9b8f4c6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -92,6 +92,8 @@ option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', description: 'libusb support for USB passthrough') +option('libxml2', type : 'feature', value : 'auto', + description: 'libxml2 support for Parallels image format') option('linux_io_uring', type : 'feature', value : 'auto', description: 'Linux io_uring support') option('lzfse', type : 'feature', value : 'auto', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501261215804.9518289219141; Mon, 5 Jul 2021 09:07:41 -0700 (PDT) Received: from localhost ([::1]:39412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R8G-0004bM-6R for importer@patchew.org; Mon, 05 Jul 2021 12:07:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1J-0001Gr-8I for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:29 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:35667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0003cX-GK for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:28 -0400 Received: by mail-wr1-x430.google.com with SMTP id q17so2255980wrv.2 for ; Mon, 05 Jul 2021 09:00:26 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mzo6AeYrmpZuyjeUL5LIfWrr9x9Cyyuphnxq1KvcFvQ=; b=uqq3oSmZxHvZeez8MjE30f1tyDa3eA1vwlMo2KCkuz+QOct0PMhf/YU0fKO8oCMgHb sp4PP6O5iBoH+ppxOqShsDvu3u4yWvFbDaTzKnzUb32LM6dwM/uBhQH+GUODQfTblm2o etnAqOozBZLvhnk6UxuiWVoeQbDv4eGnQpt1jtnPODwzdvrL8O7s/o3fz9tJ3Qs7EsA2 xmQuA8IhzwyCAiJk3tR5CUn02sJxNkGKfKzAP63pG9mDBjVlqpAhZZBhplOoRJsxyeEh CATBhlT2j//kx4MihO2Vzb9jEIruhqQipOLebwDYHKE9mrxXx8FEH67eV37/uImrKIHw L/QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Mzo6AeYrmpZuyjeUL5LIfWrr9x9Cyyuphnxq1KvcFvQ=; b=jhsINd79wf99BJVD4HBB/Smn2pSSP19+CHsEM4qNLpE7OGA1kLUrvPezxbi29BDCPj fLguZ6g2QOnhCjeDnG/ywJIpJBA+nHQMpOnDBs9La1zP9n1ANAF/Lnm6eMS4k4aHt1f2 QJA0/uqsPBauddYUlu+i7kdh54/mEHpADBRBk13WTur2J4Q8f2M0ZmSSSUN0V4JnmUTE flvG5Qg81ci9M9K9GWIBSBzBwUuewErejT4SZfGwGJ428WjdmILInRQjVuZnSlq1W/cc VLI6FwBdMqpib61Y6s8wrvclTnDbr4aUlSa7myiZRF1jcR74MtJGWYDxyzdE+86OHLeD 8c0A== X-Gm-Message-State: AOAM533fMkbKNl/4ZtaW0BJr2nPZqi8RhaYVTYIQC5NGtK+UX25gJ1ts 0VoEmawzZSws9DxYrZjldQCMOoSfJGY= X-Google-Smtp-Source: ABdhPJw+SGvd2C33CFlKAntsv2Mk21QyxRbi+0VWGttUSOkMXGpDRh8wmKLvnDjZusBYx/DQ/MG1QQ== X-Received: by 2002:a05:6000:184b:: with SMTP id c11mr16663772wri.122.1625500825926; Mon, 05 Jul 2021 09:00:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/17] meson: sort existing compiler tests Date: Mon, 5 Jul 2021 18:00:09 +0200 Message-Id: <20210705160018.241397-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501266844100001 The next patches will add more compiler tests. Sort and group the existing tests, keeping similar cc.has_* tests together and sorting them alphabetically by macro name. This should make it easier to look for examples when adding new tests to meson.build. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 1216ac8f72..53dfc2b4c6 100644 --- a/meson.build +++ b/meson.build @@ -1253,16 +1253,19 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.pr= oject_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('= .')[2]) =20 +config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) + +# has_header config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) +config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) -config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) -config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) -config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h')) =20 +# has_function config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) +config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501265758803.259634297908; Mon, 5 Jul 2021 09:07:45 -0700 (PDT) Received: from localhost ([::1]:39726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0R8K-0004o5-Ed for importer@patchew.org; Mon, 05 Jul 2021 12:07:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1J-0001IF-Io for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:29 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:42566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1H-0003d2-V8 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:29 -0400 Received: by mail-wr1-x435.google.com with SMTP id t6so12727596wrm.9 for ; Mon, 05 Jul 2021 09:00:27 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fDz5tkFjEMWh1jGsn5Uv286sF3P/RJ6lk3yQfzYfsNw=; b=mrJbchMfqHFi46ClnHhABEfAY9MzibNznPdIKtoPgJr3VnD7WdK33E8WfcpmkBjtHB n3x3TR30k84pbZ+kxhcrhjv5MgtyzgbZGDOctttgMjcdVznwDkljydifgdmZ59I9QOpz a1CppqjuL20ae7m8ezuUprIqZlsymBscIjaTYnhW7YzyrtlsIDK6nN6x5zIz4l8LPOnm N2qUs2NnAJjBiLTtYlwQ9Oa4LQx7hLzwZHh3uTRutIjds91UnbgR0SCAk5ebDtg+63RL MeKtd2YPQzEY6tGC2M8iMBzE3N5HHEIdIUIhBDNKBhg2AY+O83mYvkb8HEWwy8ddzndy 1stw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fDz5tkFjEMWh1jGsn5Uv286sF3P/RJ6lk3yQfzYfsNw=; b=XbSHPKc1wu9NqtoG2a7p2YQix/6Oi/FE2Dy/4iTCalHkWVH2z1GVk0M2vqTILkBwBw 6l/p/Rvz6Jtu7NuDIExpeRxy7mq10B9D8IAambJbcON3lfsh8pYkxaMBt7SqiddxfRJL Gs+cdsi8l+lKycRf4WGPl53ptDAE5FzryRfORy2RrTfikEtZRXzISortudGCOOrBinWX wJVC7pI3CUfiOiSZWgQOYn52Nl8YiYahZEbiqj7W+s211PtnBBq5yubvLJWAmgamK/em RBNnXgWsZGdJVSh/fFxfyZr5wvcfEloif2ynhXw5hD0cnmyThhWthikxr2C+BcZKUzvu Hv9A== X-Gm-Message-State: AOAM530Lq3WCFcB46md1DRu4bhDIGarTcJgdxJ4OI1cxhXdOVpnd3gdW vnz6ytdmwQaW9leHcwbslurX01ku3eI= X-Google-Smtp-Source: ABdhPJziSe0rQ0Ijvnob/3IGxQVeLivjhXDExd8p7lD7o593qs/Q2IpenYdSHxwnkSV8hFDbQBWa2w== X-Received: by 2002:a5d:6d0b:: with SMTP id e11mr3718248wrq.50.1625500826578; Mon, 05 Jul 2021 09:00:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/17] meson: store dependency('threads') in a variable Date: Mon, 5 Jul 2021 18:00:10 +0200 Message-Id: <20210705160018.241397-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501271310100001 It can be useful for has_function checks. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- util/meson.build | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 53dfc2b4c6..e288e4c21c 100644 --- a/meson.build +++ b/meson.build @@ -164,6 +164,7 @@ endif multiprocess_allowed =3D targetos =3D=3D 'linux' and not get_option('multi= process').disabled() =20 libm =3D cc.find_library('m', required: false) +threads =3D dependency('threads') util =3D cc.find_library('util', required: false) winmm =3D [] socket =3D [] @@ -1999,7 +2000,7 @@ util_ss.add_all(trace_ss) util_ss =3D util_ss.apply(config_all, strict: false) libqemuutil =3D static_library('qemuutil', sources: util_ss.sources() + stub_ss.sources(= ) + genh, - dependencies: [util_ss.dependencies(), libm, = glib, socket, malloc, pixman]) + dependencies: [util_ss.dependencies(), libm, = threads, glib, socket, malloc, pixman]) qemuutil =3D declare_dependency(link_with: libqemuutil, sources: genh + version_res) =20 diff --git a/util/meson.build b/util/meson.build index 97fad44105..6af05a5716 100644 --- a/util/meson.build +++ b/util/meson.build @@ -1,4 +1,3 @@ -util_ss.add(dependency('threads')) util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu-timer-common.c= ')) util_ss.add(when: 'CONFIG_ATOMIC64', if_false: files('atomic64.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c')) --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501527365305.5065296618236; Mon, 5 Jul 2021 09:12:07 -0700 (PDT) Received: from localhost ([::1]:48412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RCY-0002Gn-D3 for importer@patchew.org; Mon, 05 Jul 2021 12:12:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1K-0001K5-B3 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:30 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1I-0003dB-JD for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:30 -0400 Received: by mail-wr1-x429.google.com with SMTP id t15so19293852wry.11 for ; Mon, 05 Jul 2021 09:00:28 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sHXNM04uxEiAbDswn208ExLFOlINybso2tUyXQRPesg=; b=EKHUsMGWxHmS8RNQeQIj13TXJABJzWfSy7I1GD6IR6sth52XgK2sS3VHn63EQAE29v 1vCuiSIUU7feOmHL6mFG6iJm5bOzCdXLAHf43Rk1+vP9t8ouO72HVxkzyAv5kMCDDiNg byQybmBb30+6+ZwqnHbMRYgX3ly3bPhliFwJP13KT/Tx4fJFVpbIHOaon4b+BXAA8BdZ 06jPhUVr+/paDv3o93cSo59iS0E4dzk7l9eLb9DCuyyC38VFZpKJbPLpxehsPbVfqtq7 MKCZOuX5Hcxw0GpHKTNDS2TjqmXcXpK81N651Kxpo4NEyq8QvYpVUQozIWRA8AfnyAFd Am4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sHXNM04uxEiAbDswn208ExLFOlINybso2tUyXQRPesg=; b=T+LmNfLtvuTIDUXKDLRO7ZFq9dhtatJiDFVsSbkD7P0ARuUGkE2A/U6YHBxoZzCMr0 p6zE4Rs0yWRjwK3IUR5C2xz83h64nAgK0TNIQJg+qfY/ANf480w1pRY0ozgUfqofx9dB 5DpB4TIzEtJ5lDPbNuMxXXzwDd99c2kKtCyNLC4TCznvnw+7byynuIirwRemHMgKZCzl Rq+B2caDvm5dbkLxUU1pTAnzR49Ii/u22oSMijwsX6ateisTJmEVmENXX5wYF5iPDaTo ieScGVAlAXPkL+PSbd8KP1DJIdMmygt9pCd6N8e8aPXa8YFrKXXEauhhX70wtXZV/W2i VtOw== X-Gm-Message-State: AOAM530NVfNXp64HKP921I9bTmx50ggHJuj9dw5wSEgItW1GggXt3dCp aD1ICyj6Py0m6wH1DpJBmo6Z6SjG7og= X-Google-Smtp-Source: ABdhPJzv8/DMgMd9xq4C4rw741IrXFXTnLZL3R/CNGlX3xCJgURQoPV7pQ1wuz3994Z3C4WO/gkTww== X-Received: by 2002:a5d:5609:: with SMTP id l9mr16468268wrv.123.1625500827278; Mon, 05 Jul 2021 09:00:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/17] configure, meson: move CONFIG_IVSHMEM to meson Date: Mon, 5 Jul 2021 18:00:11 +0200 Message-Id: <20210705160018.241397-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501531977100001 This is a duplicate of CONFIG_EVENTFD, handle it directly in meson.build. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 8 -------- docs/devel/kconfig.rst | 2 +- meson.build | 5 +++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 341b74dd5e..a524104120 100755 --- a/configure +++ b/configure @@ -5037,11 +5037,6 @@ if test "$mingw32" =3D "yes" ; then done fi =20 -# We can only support ivshmem if we have eventfd -if [ "$eventfd" =3D "yes" ]; then - ivshmem=3Dyes -fi - # Probe for guest agent support/options =20 if [ "$guest_agent" !=3D "no" ]; then @@ -5639,9 +5634,6 @@ fi if test "$have_getrandom" =3D "yes" ; then echo "CONFIG_GETRANDOM=3Dy" >> $config_host_mak fi -if test "$ivshmem" =3D "yes" ; then - echo "CONFIG_IVSHMEM=3Dy" >> $config_host_mak -fi if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak fi diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index cb2d7ffac0..a1cdbec751 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -303,5 +303,5 @@ variable:: host_kconfig =3D \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ - ('CONFIG_IVSHMEM' in config_host ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ + (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ... diff --git a/meson.build b/meson.build index e288e4c21c..b5dcc3d70e 100644 --- a/meson.build +++ b/meson.build @@ -1335,10 +1335,11 @@ if link_language =3D=3D 'cpp' } endif =20 +have_ivshmem =3D config_host.has_key('CONFIG_EVENTFD') host_kconfig =3D \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ - ('CONFIG_IVSHMEM' in config_host ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ + (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ @@ -2489,7 +2490,7 @@ if have_tools install: true) endif =20 - if 'CONFIG_IVSHMEM' in config_host + if have_ivshmem subdir('contrib/ivshmem-client') subdir('contrib/ivshmem-server') endif --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501517208659.7134082132553; Mon, 5 Jul 2021 09:11:57 -0700 (PDT) Received: from localhost ([::1]:47982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RCN-0001yG-Sl for importer@patchew.org; Mon, 05 Jul 2021 12:11:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1L-0001LM-35 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:31 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:33663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1J-0003dq-Ds for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:30 -0400 Received: by mail-wr1-x432.google.com with SMTP id i8so22713701wrc.0 for ; Mon, 05 Jul 2021 09:00:28 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7IOWB9L8C5ZVMJR0h6DK/2DFyq1pG83qdF6FgW1CUf0=; b=AOHMSYtRJpZrlu2PsiFlhQPPAxVLfxqg0ykkiv6cTouT8PoOYu0qcF7Jdu8VTjucIF OP5k6qZnEDL0rusI/3lZk/o/QRBNiAi9mJgw+yD11R8Gb539oy+S6tx8iTMqDrtPn4bC 6JPRK3WDVqnFysIcp02HKS5AQvfsuw5UTk9PEfIlwGmWqxV190nDEIlFYUlweMzagv32 oEFa3nkFfW7/FxdSyo9iQpQFzmzxqV9FNUs4D4V08jZhE/fbb6St09V314wH8xSuYSKr Dbo4c7FO1SndWqKPgX+lGN8Nsp4t/GctqBAcvTwkNo0E6EfGgdqU9eb50sXrt5TlZE0s ABBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7IOWB9L8C5ZVMJR0h6DK/2DFyq1pG83qdF6FgW1CUf0=; b=Yl1VllZUAPtbf99tRJI/bTp+eVVot9DOYbjFsb9P8pnspES8ho3ReNj++d/mKDP8hn AW+ptvItIT94E8TuhHApyB/8WLqv7Nen6efRV92Lzjto447ROw4krdFL0zV1YBIx8tb7 SppgQFokcTJOKH9Xq51NUow021wF+7tHlZbMh4wnLvCjjAkx0BHMwvRop4JaXfLUbZb6 khMcvww5UI8p4Xy5gUHcg7C3zJragt9WtYZ0CDycnAYbC+OaIgFq29dqQtx1auyi5Dh0 Ae+MxOLKBoICldUsHhzc8SZioCf8u5biWA/8XKCg88pqZQHNgqXD8/zJO1IQ7xlYMHgS kfzg== X-Gm-Message-State: AOAM533S/uy4Du3LfWGqsqRk4Tb6Sgw7+A7pBF/ekrsZ/zoTQSeAIpQt eOobr5BmmAQZ1CA0x8buD88NodaFGtQ= X-Google-Smtp-Source: ABdhPJy0qzXRsjmK7rNmtrqlf/NW01k5ciTSj5tUN2SCr64BiiKxnJ/erTgDmL6QqwkkO8tznb/hKw== X-Received: by 2002:a5d:5189:: with SMTP id k9mr17062870wrv.250.1625500828087; Mon, 05 Jul 2021 09:00:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/17] configure: convert HAVE_BROKEN_SIZE_MAX to meson Date: Mon, 5 Jul 2021 18:00:12 +0200 Message-Id: <20210705160018.241397-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501521160100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 17 ----------------- meson.build | 9 +++++++++ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/configure b/configure index a524104120..98d6068941 100755 --- a/configure +++ b/configure @@ -2375,20 +2375,6 @@ if test "$softmmu" =3D "no"; then audio_drv_list=3D"" fi =20 -########################################## -# Some versions of Mac OS X incorrectly define SIZE_MAX -cat > $TMPC << EOF -#include -#include -int main(int argc, char *argv[]) { - return printf("%zu", SIZE_MAX); -} -EOF -have_broken_size_max=3Dno -if ! compile_object -Werror ; then - have_broken_size_max=3Dyes -fi - ########################################## # L2TPV3 probe =20 @@ -5360,9 +5346,6 @@ if test "$gdbus_codegen" !=3D "" ; then echo "GDBUS_CODEGEN=3D$gdbus_codegen" >> $config_host_mak fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak -if test "$have_broken_size_max" =3D "yes" ; then - echo "HAVE_BROKEN_SIZE_MAX=3Dy" >> $config_host_mak -fi if test "$have_openpty" =3D "yes" ; then echo "HAVE_OPENPTY=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index b5dcc3d70e..79b5834266 100644 --- a/meson.build +++ b/meson.build @@ -1268,6 +1268,15 @@ config_host_data.set('HAVE_SYS_KCOV_H', cc.has_heade= r('sys/kcov.h')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =20 +# Some versions of Mac OS X incorrectly define SIZE_MAX +config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' + #include + #include + int main(int argc, char *argv[]) { + return printf("%zu", SIZE_MAX); + }''', args: ['-Werror'])) + + ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] strings =3D ['HOST_DSOSUF', 'CONFIG_IASL'] --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501657010970.5717065901631; Mon, 5 Jul 2021 09:14:17 -0700 (PDT) Received: from localhost ([::1]:56352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0REd-0007pS-V2 for importer@patchew.org; Mon, 05 Jul 2021 12:14:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0001Nb-HP for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:53074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1K-0003eO-49 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:32 -0400 Received: by mail-wm1-x336.google.com with SMTP id g10so5883845wmh.2 for ; Mon, 05 Jul 2021 09:00:29 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o2sbamB03YBQ163qe5Ssm2R2pfOK+BpRw1DgAyIXrkw=; b=B/oDkON1KpnrTb3gJyLzOmP5/rSDnQt+3F0T/fBz7zSSeH+7FHlsD522j6VGiLKJRU eS1kOnRXltj2wMq8dFoIxJGVwqtsmPmAQKz+wxY5OKnu2E7v+6rMwPcyPmK9lMJRlXFn 9t4DOphlhxeIVQFblXVD9KyqTIYjH9gu7g4fze1+yxiTBTKeYwFGE17XCugOX6CL0NN8 yYmoaUHHcHuk9c/N4g2bd7jqllKfGi/q9RA4IvUuo7p0OUit6KU1hK0MgpEl1UVWezUZ pi465YfcbKNzhfPCBh4BkYSO6rs2NQWT+paX1BXj5wCxzFIlLud79v0uI/W757j/BFPU +TZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=o2sbamB03YBQ163qe5Ssm2R2pfOK+BpRw1DgAyIXrkw=; b=GvGH3x68O6L8jtJdXAsqD/Mt5owDRNJTR5mbBkbnZ35bc58JL14eIw1AkbAkJNGntn PIs+UXGfbc9BDvu8txb69qasM+cxWR5kJ2YpIbmR61+vnY1LTkGsskNlmQsbVhvf5P5i PWzx8PPIBWfb6nNwsoc0VokCCxlVzYnnMc0CixhYxwOOKMQp2T/oronvyX30C5NaR7rb bsUYMZqxg2KbinqyxlXGzcG4qgQP6faitTYMo8zHP1iVzmrN/1fThEjavDBRANVfWzS9 TIx3Y5coYFOXIIqb29KfUBaHCborZWbwN8X5cQeDgIm/yhJHOV/VVHhiYpLCVi5jn7DZ qriw== X-Gm-Message-State: AOAM533je3J2EviecWrmWLDnuN7mPMWOG8jCao7YW7Kag5jHGro8W8FS cpLYGhF3ekkOUCnsvQpCPpmvaySXWpM= X-Google-Smtp-Source: ABdhPJzEkffkugn+xxX9buyQO2eCXop9mXhwUXuGCaUpkgKbwqtMF7UE6U4QIcQMZbWALHDlCmjvUg== X-Received: by 2002:a1c:1b87:: with SMTP id b129mr15795847wmb.189.1625500828749; Mon, 05 Jul 2021 09:00:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/17] configure: convert compiler tests to meson, part 1 Date: Mon, 5 Jul 2021 18:00:13 +0200 Message-Id: <20210705160018.241397-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501662085100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 364 ----------------------------------------------- meson.build | 41 +++++- util/meson.build | 4 +- 3 files changed, 43 insertions(+), 366 deletions(-) diff --git a/configure b/configure index 98d6068941..e2bf77f55d 100755 --- a/configure +++ b/configure @@ -3588,297 +3588,6 @@ EOF fi fi =20 -# check for fallocate -fallocate=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - fallocate(0, 0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - fallocate=3Dyes -fi - -# check for fallocate hole punching -fallocate_punch_hole=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - fallocate(0, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - fallocate_punch_hole=3Dyes -fi - -# check that fallocate supports range zeroing inside the file -fallocate_zero_range=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - fallocate(0, FALLOC_FL_ZERO_RANGE, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - fallocate_zero_range=3Dyes -fi - -# check for posix_fallocate -posix_fallocate=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - posix_fallocate(0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - posix_fallocate=3Dyes -fi - -# check for sync_file_range -sync_file_range=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - sync_file_range(0, 0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - sync_file_range=3Dyes -fi - -# check for linux/fiemap.h and FS_IOC_FIEMAP -fiemap=3Dno -cat > $TMPC << EOF -#include -#include -#include - -int main(void) -{ - ioctl(0, FS_IOC_FIEMAP, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - fiemap=3Dyes -fi - -# check for dup3 -dup3=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - dup3(0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - dup3=3Dyes -fi - -# check for ppoll support -ppoll=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - struct pollfd pfd =3D { .fd =3D 0, .events =3D 0, .revents =3D 0 }; - ppoll(&pfd, 1, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - ppoll=3Dyes -fi - -# check for prctl(PR_SET_TIMERSLACK , ... ) support -prctl_pr_set_timerslack=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - prctl_pr_set_timerslack=3Dyes -fi - -# check for epoll support -epoll=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - epoll_create(0); - return 0; -} -EOF -if compile_prog "" "" ; then - epoll=3Dyes -fi - -# epoll_create1 is a later addition -# so we must check separately for its presence -epoll_create1=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - /* Note that we use epoll_create1 as a value, not as - * a function being called. This is necessary so that on - * old SPARC glibc versions where the function was present in - * the library but not declared in the header file we will - * fail the configure check. (Otherwise we will get a compiler - * warning but not an error, and will proceed to fail the - * qemu compile where we compile with -Werror.) - */ - return (int)(uintptr_t)&epoll_create1; -} -EOF -if compile_prog "" "" ; then - epoll_create1=3Dyes -fi - -# check for sendfile support -sendfile=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return sendfile(0, 0, 0, 0); -} -EOF -if compile_prog "" "" ; then - sendfile=3Dyes -fi - -# check for timerfd support (glibc 2.8 and newer) -timerfd=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return(timerfd_create(CLOCK_REALTIME, 0)); -} -EOF -if compile_prog "" "" ; then - timerfd=3Dyes -fi - -# check for setns and unshare support -setns=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - int ret; - ret =3D setns(0, 0); - ret =3D unshare(0); - return ret; -} -EOF -if compile_prog "" "" ; then - setns=3Dyes -fi - -# clock_adjtime probe -clock_adjtime=3Dno -cat > $TMPC < -#include - -int main(void) -{ - return clock_adjtime(0, 0); -} -EOF -clock_adjtime=3Dno -if compile_prog "" "" ; then - clock_adjtime=3Dyes -fi - -# syncfs probe -syncfs=3Dno -cat > $TMPC < - -int main(void) -{ - return syncfs(0); -} -EOF -syncfs=3Dno -if compile_prog "" "" ; then - syncfs=3Dyes -fi - -# Search for bswap_32 function -byteswap_h=3Dno -cat > $TMPC << EOF -#include -int main(void) { return bswap_32(0); } -EOF -if compile_prog "" "" ; then - byteswap_h=3Dyes -fi - -# Search for bswap32 function -bswap_h=3Dno -cat > $TMPC << EOF -#include -#include -#include -int main(void) { return bswap32(0); } -EOF -if compile_prog "" "" ; then - bswap_h=3Dyes -fi - -# Check whether we have openpty() in either libc or libutil -cat > $TMPC << EOF -extern int openpty(int *am, int *as, char *name, void *termp, void *winp); -int main(void) { return openpty(0, 0, 0, 0, 0); } -EOF - -have_openpty=3D"no" -if compile_prog "" "" ; then - have_openpty=3D"yes" -else - if compile_prog "" "-lutil" ; then - have_openpty=3D"yes" - fi -fi - ########################################## # spice probe if test "$spice_protocol" !=3D "no" ; then @@ -4114,19 +3823,6 @@ if compile_prog "" "" ; then st_atim=3Dyes fi =20 -########################################## -# check if we have sigev_notify_thread_id - -sigev_notify_thread_id=3Dno -cat > $TMPC << EOF -#include -#include -int main(void) { return offsetof(struct sigevent, sigev_notify_thread_id);= } -EOF -if compile_prog "" "" ; then - sigev_notify_thread_id=3Dyes -fi - ########################################## # check if trace backend exists =20 @@ -5265,54 +4961,6 @@ fi if test "$have_usbfs" =3D "yes" ; then echo "CONFIG_USBFS=3Dy" >> $config_host_mak fi -if test "$fallocate" =3D "yes" ; then - echo "CONFIG_FALLOCATE=3Dy" >> $config_host_mak -fi -if test "$fallocate_punch_hole" =3D "yes" ; then - echo "CONFIG_FALLOCATE_PUNCH_HOLE=3Dy" >> $config_host_mak -fi -if test "$fallocate_zero_range" =3D "yes" ; then - echo "CONFIG_FALLOCATE_ZERO_RANGE=3Dy" >> $config_host_mak -fi -if test "$posix_fallocate" =3D "yes" ; then - echo "CONFIG_POSIX_FALLOCATE=3Dy" >> $config_host_mak -fi -if test "$sync_file_range" =3D "yes" ; then - echo "CONFIG_SYNC_FILE_RANGE=3Dy" >> $config_host_mak -fi -if test "$fiemap" =3D "yes" ; then - echo "CONFIG_FIEMAP=3Dy" >> $config_host_mak -fi -if test "$dup3" =3D "yes" ; then - echo "CONFIG_DUP3=3Dy" >> $config_host_mak -fi -if test "$ppoll" =3D "yes" ; then - echo "CONFIG_PPOLL=3Dy" >> $config_host_mak -fi -if test "$prctl_pr_set_timerslack" =3D "yes" ; then - echo "CONFIG_PRCTL_PR_SET_TIMERSLACK=3Dy" >> $config_host_mak -fi -if test "$epoll" =3D "yes" ; then - echo "CONFIG_EPOLL=3Dy" >> $config_host_mak -fi -if test "$epoll_create1" =3D "yes" ; then - echo "CONFIG_EPOLL_CREATE1=3Dy" >> $config_host_mak -fi -if test "$sendfile" =3D "yes" ; then - echo "CONFIG_SENDFILE=3Dy" >> $config_host_mak -fi -if test "$timerfd" =3D "yes" ; then - echo "CONFIG_TIMERFD=3Dy" >> $config_host_mak -fi -if test "$setns" =3D "yes" ; then - echo "CONFIG_SETNS=3Dy" >> $config_host_mak -fi -if test "$clock_adjtime" =3D "yes" ; then - echo "CONFIG_CLOCK_ADJTIME=3Dy" >> $config_host_mak -fi -if test "$syncfs" =3D "yes" ; then - echo "CONFIG_SYNCFS=3Dy" >> $config_host_mak -fi if test "$inotify" =3D "yes" ; then echo "CONFIG_INOTIFY=3Dy" >> $config_host_mak fi @@ -5328,15 +4976,6 @@ fi if test "$st_atim" =3D "yes" ; then echo "HAVE_STRUCT_STAT_ST_ATIM=3Dy" >> $config_host_mak fi -if test "$sigev_notify_thread_id" =3D "yes" ; then - echo "HAVE_SIGEV_NOTIFY_THREAD_ID=3Dy" >> $config_host_mak -fi -if test "$byteswap_h" =3D "yes" ; then - echo "CONFIG_BYTESWAP_H=3Dy" >> $config_host_mak -fi -if test "$bswap_h" =3D "yes" ; then - echo "CONFIG_MACHINE_BSWAP_H=3Dy" >> $config_host_mak -fi if test "$gio" =3D "yes" ; then echo "CONFIG_GIO=3Dy" >> $config_host_mak echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak @@ -5346,9 +4985,6 @@ if test "$gdbus_codegen" !=3D "" ; then echo "GDBUS_CODEGEN=3D$gdbus_codegen" >> $config_host_mak fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak -if test "$have_openpty" =3D "yes" ; then - echo "HAVE_OPENPTY=3Dy" >> $config_host_mak -fi =20 # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr': diff --git a/meson.build b/meson.build index 79b5834266..29a050066e 100644 --- a/meson.build +++ b/meson.build @@ -1051,10 +1051,12 @@ endif =20 # Check whether the glibc provides statx() =20 -statx_test =3D ''' +gnu_source_prefix =3D ''' #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +''' +statx_test =3D gnu_source_prefix + ''' #include int main(void) { struct statx statxbuf; @@ -1257,6 +1259,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.proj= ect_version().split('.')[2] config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) =20 # has_header +config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) @@ -1265,9 +1268,45 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_hea= der('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) =20 # has_function +config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_function('clock_adjtim= e')) +config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) +config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) +config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) +config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) +config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile')) +config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_f= unction('unshare')) +config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs')) +config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_= range')) +config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create')) +config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependenci= es: util)) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =20 +# has_header_symbol +config_host_data.set('CONFIG_BYTESWAP_H', + cc.has_header_symbol('byteswap.h', 'bswap_32')) +config_host_data.set('CONFIG_EPOLL_CREATE1', + cc.has_header_symbol('sys/epoll.h', 'epoll_create1')) +config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE', + cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUN= CH_HOLE') and + cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_KEE= P_SIZE')) +config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE', + cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_ZER= O_RANGE')) +config_host_data.set('CONFIG_FIEMAP', + cc.has_header('linux/fiemap.h') and + cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) +config_host_data.set('CONFIG_MACHINE_BSWAP_H', + cc.has_header_symbol('machine/bswap.h', 'bswap32', + prefix: '''#include + #include ''')) +config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', + cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLAC= K')) + +# has_member +config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', + cc.has_member('struct sigevent', 'sigev_notify_thread= _id', + prefix: '#include ')) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include diff --git a/util/meson.build b/util/meson.build index 6af05a5716..0ffd7f4bde 100644 --- a/util/meson.build +++ b/util/meson.build @@ -2,7 +2,9 @@ util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu= -timer-common.c')) util_ss.add(when: 'CONFIG_ATOMIC64', if_false: files('atomic64.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c')) -util_ss.add(when: 'CONFIG_EPOLL_CREATE1', if_true: files('fdmon-epoll.c')) +if config_host_data.get('CONFIG_EPOLL_CREATE1') + util_ss.add(files('fdmon-epoll.c')) +endif util_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true: file= s('fdmon-io_uring.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('compatfd.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('event_notifier-posix.c')) --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501614073999.0774513065606; Mon, 5 Jul 2021 09:13:34 -0700 (PDT) Received: from localhost ([::1]:52788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RDw-0005ME-Nd for importer@patchew.org; Mon, 05 Jul 2021 12:13:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0001NY-Et for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:33510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1K-0003fk-Rk for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:32 -0400 Received: by mail-wm1-x330.google.com with SMTP id g8-20020a1c9d080000b02901f13dd1672aso185739wme.0 for ; Mon, 05 Jul 2021 09:00:30 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vY3VbBmrVZM9YYm9NAx6C9SJhnw2mI1KKJt0obRhixo=; b=SKA1to0VNTNgAr7jCff2tRcApVY0QrbBSSoYsC1hwrcNggTEEwtR0zAtc9jI8OoRE6 n/bKF0Z7jUg9M3bZDswhYRf7RBN3zS9IudQGOQQJSAGO0KYmaVv7rOXIJvT0NSDh8YZG 0qGIBT4a275tLLOWSwh9/ic3dRRlMmwKMFRhlRqIQFp1PD2kWaYRL6Hv4IPu4Z+nWkyd L2arqksW+wHmch3zX70px8+3c1+Pa8YOeXPvYUZ5DvN8ol3TVL/BxeVFOIg643PZKKWy WHmz5NU59D+LeTSNUMp8HdrcawfEVrJ1ZuKeuvD7nsBLb6XhF5DdPWbYz0eYYoCnGbQV wu9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vY3VbBmrVZM9YYm9NAx6C9SJhnw2mI1KKJt0obRhixo=; b=cxX0SjkVQ3tfV5jMsgWJSuf/wyvMTRlMrYMUveBcwXVyJP9rn3yGhD+NdZ3wl3YRVl ZUcoTK3y91odHx+6Soj5ObRUON2zFnO1gPmbFY8oUKX1m6UFGONVt3lkSQZTHpCWoyzH oOkJi9KQ9pJ584cKHPqw8q3aTKfgOdbuSeOBGmU/3N7qSLbmTyeNOtkapo5ft4MeKS1B w3l0SPGJJ7ziFnm9phDSkGan1WG/QcX7TiBDlQuZprh8MlEFeAiEA5CSWgO3xn+Xq6J4 eBiAU1tChJ+hDhIllxo5kejfpzuFXuFyBP126AwRotdVGyC6TRJ5QdGFv8Q199DFXbhV OpFw== X-Gm-Message-State: AOAM531Gw7O6236oHBwH2DmgmhLkxAshNMD0XqeyDmNPo2j13mab5pWM UsiUz1lioZIV8/Mwd9d7CtdOOlYgExg= X-Google-Smtp-Source: ABdhPJx9b64sJ4y6s0I3kt1O4X8OUjjkXgI/MWstF7fxvQ2+zAE0z8iJ26voAr4ZVMsgDlglyt/2eQ== X-Received: by 2002:a05:600c:198c:: with SMTP id t12mr15226964wmq.140.1625500829418; Mon, 05 Jul 2021 09:00:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/17] configure: convert compiler tests to meson, part 2 Date: Mon, 5 Jul 2021 18:00:14 +0200 Message-Id: <20210705160018.241397-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501618714100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 49 ------------------------------------------------- meson.build | 5 +++++ 2 files changed, 5 insertions(+), 49 deletions(-) diff --git a/configure b/configure index e2bf77f55d..78f4a351d9 100755 --- a/configure +++ b/configure @@ -3783,46 +3783,6 @@ if compile_prog "" "" ; then posix_syslog=3Dyes fi =20 -########################################## -# check if we have sem_timedwait - -sem_timedwait=3Dno -cat > $TMPC << EOF -#include -int main(void) { sem_t s; struct timespec t =3D {0}; return sem_timedwait(= &s, &t); } -EOF -if compile_prog "" "" ; then - sem_timedwait=3Dyes -fi - -########################################## -# check if we have strchrnul - -strchrnul=3Dno -cat > $TMPC << EOF -#include -int main(void); -// Use a haystack that the compiler shouldn't be able to constant fold -char *haystack =3D (char*)&main; -int main(void) { return strchrnul(haystack, 'x') !=3D &haystack[6]; } -EOF -if compile_prog "" "" ; then - strchrnul=3Dyes -fi - -######################################### -# check if we have st_atim - -st_atim=3Dno -cat > $TMPC << EOF -#include -#include -int main(void) { return offsetof(struct stat, st_atim); } -EOF -if compile_prog "" "" ; then - st_atim=3Dyes -fi - ########################################## # check if trace backend exists =20 @@ -4967,15 +4927,6 @@ fi if test "$inotify1" =3D "yes" ; then echo "CONFIG_INOTIFY1=3Dy" >> $config_host_mak fi -if test "$sem_timedwait" =3D "yes" ; then - echo "CONFIG_SEM_TIMEDWAIT=3Dy" >> $config_host_mak -fi -if test "$strchrnul" =3D "yes" ; then - echo "HAVE_STRCHRNUL=3Dy" >> $config_host_mak -fi -if test "$st_atim" =3D "yes" ; then - echo "HAVE_STRUCT_STAT_ST_ATIM=3Dy" >> $config_host_mak -fi if test "$gio" =3D "yes" ; then echo "CONFIG_GIO=3Dy" >> $config_host_mak echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index 29a050066e..4314b9b4c5 100644 --- a/meson.build +++ b/meson.build @@ -1274,12 +1274,14 @@ config_host_data.set('CONFIG_FALLOCATE', cc.has_fun= ction('fallocate')) config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) +config_host_data.set('CONFIG_SEM_TIMEDWAIT', cc.has_function('sem_timedwai= t', dependencies: threads)) config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile')) config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_f= unction('unshare')) config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs')) config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_= range')) config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create')) config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependenci= es: util)) +config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul')) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =20 # has_header_symbol @@ -1306,6 +1308,9 @@ config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', cc.has_member('struct sigevent', 'sigev_notify_thread= _id', prefix: '#include ')) +config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', + cc.has_member('struct stat', 'st_atim', + prefix: '#include ')) =20 # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501807740895.3497460168658; Mon, 5 Jul 2021 09:16:47 -0700 (PDT) Received: from localhost ([::1]:35230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RH4-0004Ey-O7 for importer@patchew.org; Mon, 05 Jul 2021 12:16:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0001Na-Gg for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1L-0003g3-SW for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:33 -0400 Received: by mail-wr1-x42f.google.com with SMTP id q17so2256207wrv.2 for ; Mon, 05 Jul 2021 09:00:31 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4BdD6jxidGfMEq7c7dSE3OTNZydmwQIYhRWbOc8EIzE=; b=SWmwTdj6aghSlHeZni5phdv2bCA0450eCRCI3uzDJNwxBpU+kfhFmc8MXrppjwG957 2BhqEckkZ2Lqqo/gQDa+c6mCnSKBvz3gAoQi1HR0hgf1ylnubTP42HPQ7bf71+ddi4Cq Xfxx11nnO8BtXebklr2n5dAtMmIbePYblZO02Wjvsv2eph2yqYYztBZS9BldWIa1sY3V gtq8YRNrF6VT68R3Y1cK9YAJkWvz1/QsG7RcvR4wgDaO8M7t1EkxQP03lrGIkhMyDLRw dgMbdopyLRgHh0e5ZnD1JiZSB7bTutrKiOJtlhRq06BH3onKKNKZ8ghiRBoGc2xo+Doe c66Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4BdD6jxidGfMEq7c7dSE3OTNZydmwQIYhRWbOc8EIzE=; b=rjBXPZcyG27fZBelEJZ6T6Wpp1p6JStMWeetUzCAjgnkGpY5Tr6LmWIb1HQiIw7iox FKnkY0IZq9eRQxhR46S9L7NYhUu6njHBsyChPpwSD1HcViTmvTd6Yw5F+D8Cf1fuotjB lhUMkr62GgSO7gDCbWtlstKkvCXa56anqOxa3bSUTnFXWBeGDBYfyeL73aa9+HdF9YX4 X7LSfC9wAjvV+GUI+5Mxbi1lO37sXSAzn+pE/mDmRweE3UsyWhNyGMP3Nx7qHySfZgSA bWH67QCCY4OmScL0HHWBkssNQ0Rw19lOF54vde/oyNM4EhQBCCGL/25QduRNwiDLzdWU ti8w== X-Gm-Message-State: AOAM530Yzii7fJYCIGBcRiCXSAE6+e9rTG+vGvGe9liP7u3ZjWebRy4Y qv2AHDdI+g8ZG089flkqJpNqDIcexu8= X-Google-Smtp-Source: ABdhPJx9My16x+VbSLmnYuq9E9h8gGFPlEXiAajzL35EpFdwctp72bhtAXjqZVLik426r52/U+mtOw== X-Received: by 2002:adf:d203:: with SMTP id j3mr16632893wrh.292.1625500830138; Mon, 05 Jul 2021 09:00:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/17] configure: convert compiler tests to meson, part 3 Date: Mon, 5 Jul 2021 18:00:15 +0200 Message-Id: <20210705160018.241397-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501811926100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 87 ----------------------------------------------------- meson.build | 10 ++++++ 2 files changed, 10 insertions(+), 87 deletions(-) diff --git a/configure b/configure index 78f4a351d9..cf7f71fe40 100755 --- a/configure +++ b/configure @@ -4293,20 +4293,6 @@ if test "$fortify_source" !=3D "no"; then fi fi =20 -############################################### -# Check if copy_file_range is provided by glibc -have_copy_file_range=3Dno -cat > $TMPC << EOF -#include -int main(void) { - copy_file_range(0, NULL, 0, NULL, 0, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - have_copy_file_range=3Dyes -fi - ########################################## # check if struct fsxattr is available via linux/fs.h =20 @@ -4353,19 +4339,6 @@ else membarrier=3Dno fi =20 -########################################## -# check if rtnetlink.h exists and is useful -have_rtnetlink=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return IFLA_PROTO_DOWN; -} -EOF -if compile_prog "" "" ; then - have_rtnetlink=3Dyes -fi - ########################################## # check for usable AF_VSOCK environment have_af_vsock=3Dno @@ -4419,49 +4392,6 @@ then fi =20 =20 -################################################# -# check for sysmacros.h - -have_sysmacros=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return makedev(0, 0); -} -EOF -if compile_prog "" "" ; then - have_sysmacros=3Dyes -fi - -########################################## -# check for utmpx.h, it is missing e.g. on OpenBSD - -have_utmpx=3Dno -cat > $TMPC << EOF -#include -struct utmpx user_info; -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - have_utmpx=3Dyes -fi - -########################################## -# check for getrandom() - -have_getrandom=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return getrandom(0, 0, GRND_NONBLOCK); -} -EOF -if compile_prog "" "" ; then - have_getrandom=3Dyes -fi - ########################################## # checks for sanitizers =20 @@ -4944,9 +4874,6 @@ echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $co= nfig_host_mak if test "$have_fsxattr" =3D "yes" ; then echo "HAVE_FSXATTR=3Dy" >> $config_host_mak fi -if test "$have_copy_file_range" =3D "yes" ; then - echo "HAVE_COPY_FILE_RANGE=3Dy" >> $config_host_mak -fi if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak @@ -5182,10 +5109,6 @@ if test "$pvrdma" =3D "yes" ; then echo "CONFIG_PVRDMA=3Dy" >> $config_host_mak fi =20 -if test "$have_rtnetlink" =3D "yes" ; then - echo "CONFIG_RTNETLINK=3Dy" >> $config_host_mak -fi - if test "$replication" =3D "yes" ; then echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak fi @@ -5194,16 +5117,6 @@ if test "$have_af_vsock" =3D "yes" ; then echo "CONFIG_AF_VSOCK=3Dy" >> $config_host_mak fi =20 -if test "$have_sysmacros" =3D "yes" ; then - echo "CONFIG_SYSMACROS=3Dy" >> $config_host_mak -fi - -if test "$have_utmpx" =3D "yes" ; then - echo "HAVE_UTMPX=3Dy" >> $config_host_mak -fi -if test "$have_getrandom" =3D "yes" ; then - echo "CONFIG_GETRANDOM=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 4314b9b4c5..5fec46bb65 100644 --- a/meson.build +++ b/meson.build @@ -1280,6 +1280,7 @@ config_host_data.set('CONFIG_SETNS', cc.has_function(= 'setns') and cc.has_functio config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs')) config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_= range')) config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create')) +config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_ra= nge')) config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependenci= es: util)) config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul')) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) @@ -1297,12 +1298,21 @@ config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE', config_host_data.set('CONFIG_FIEMAP', cc.has_header('linux/fiemap.h') and cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) +config_host_data.set('CONFIG_GETRANDOM', + cc.has_function('getrandom') and + cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) config_host_data.set('CONFIG_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include #include ''')) config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLAC= K')) +config_host_data.set('CONFIG_RTNETLINK', + cc.has_header_symbol('linux/rtnetlink.h', 'IFLA_PROTO= _DOWN')) +config_host_data.set('CONFIG_SYSMACROS', + cc.has_header_symbol('sys/sysmacros.h', 'makedev')) +config_host_data.set('HAVE_UTMPX', + cc.has_header_symbol('utmpx.h', 'struct utmpx')) =20 # has_member config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501752500895.5557607671515; Mon, 5 Jul 2021 09:15:52 -0700 (PDT) Received: from localhost ([::1]:32968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RGB-0002es-2U for importer@patchew.org; Mon, 05 Jul 2021 12:15:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0001NZ-F9 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:37836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1M-0003gL-3Z for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:34 -0400 Received: by mail-wr1-x430.google.com with SMTP id i94so22672225wri.4 for ; Mon, 05 Jul 2021 09:00:31 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dWfQhBashspj92n3O9gjSje6wEHhYNIVjiIMVmNraZU=; b=indDN2xPtvoL8pX2tOGJCPO3L2TAO3oKO3is7jpXKGCjc856Ex8BSKrbF3u1HZyAYF 6Dqf+rk4VG8AFdiKm1Lzx1eSZ8dKHaAWB8KeIvZ1XEpwI+xcYJp7UFIl8gJeIWun3DXN JrCNegb4/NCxJ3+TLW199U6hn+qlO7xdtcXFsSdetUJdg8+chxE5/MMN6jiz7/6pVVZg gYmhIKOrOUA43aR59StfibKqXAWCMgxOQlblZCHy5amsvdX2kifqrL3f4F3da6PBjFF+ 7snkavco0FNbhgrnTOoN5Zh/9qtcTrWvT1445esVtBK1+nfczu4ZAVUDAEBQf0tLQkhZ Faiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dWfQhBashspj92n3O9gjSje6wEHhYNIVjiIMVmNraZU=; b=uEMgdpd2YosLuHkbz8PdbrpHYJ6d1dJ3JFYAzdVcVWiFVEOFRI1dlP6KOb8tfjFN/N 85LEWB8/kij4AnJH/obDRnB75pLyrv/T1KEXdiAOYrA/sihL+CidDXu0hXUTwuHVXJ// siqUI5FwJVvNDxCWRhY1ON2wvJwnUGSL3MKJWmzXj+vf9M2lNKiXupgwqMf3wvlBiqIH KZV8stBJ/UKPR8VpViA6WruWJFGcvFgI8xaoIfqJo8l5c8RMyq+1gvEd6/E9Bq5vk1jD c5Q+Em3BA+ff7Ux+y1kLbMMl9RL1mKmmBoAskFSPzTsnaaKNnL2quoHNtB9MVrVolVIr SAcg== X-Gm-Message-State: AOAM531qF5ZG0Euk+nVBXewKqT4qivzhHaJnY/QSLD9MWgEPUPy4/ZTY qWQz8aFbb5apC1IzQpqKY81u3vCBXVw= X-Google-Smtp-Source: ABdhPJz5Jc991yM6L2Hn3WrGjGSosSmD7ZIZHl5KxKQwFEQq/M2vjHj1crGkvMMzdfqstAkv/Dy5Yw== X-Received: by 2002:a05:6000:511:: with SMTP id a17mr16577550wrf.351.1625500830815; Mon, 05 Jul 2021 09:00:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/17] configure: convert compiler tests to meson, part 4 Date: Mon, 5 Jul 2021 18:00:16 +0200 Message-Id: <20210705160018.241397-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501757979100001 And remove them from the summary, since now their outcome is verbosely included in the meson output. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 137 ---------------------------------------------------- meson.build | 39 +++++++++++++-- 2 files changed, 34 insertions(+), 142 deletions(-) diff --git a/configure b/configure index cf7f71fe40..83168ceb52 100755 --- a/configure +++ b/configure @@ -3511,59 +3511,6 @@ elif test "$jemalloc" =3D "yes" ; then malloc=3Djemalloc fi =20 -########################################## -# signalfd probe -signalfd=3D"no" -cat > $TMPC << EOF -#include -#include -#include -int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); } -EOF - -if compile_prog "" "" ; then - signalfd=3Dyes -fi - -# check if optreset global is declared by -optreset=3D"no" -cat > $TMPC << EOF -#include -int main(void) { return optreset; } -EOF - -if compile_prog "" "" ; then - optreset=3Dyes -fi - -# check if eventfd is supported -eventfd=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); -} -EOF -if compile_prog "" "" ; then - eventfd=3Dyes -fi - -# check if memfd is supported -memfd=3Dno -cat > $TMPC << EOF -#include - -int main(void) -{ - return memfd_create("foo", MFD_ALLOW_SEALING); -} -EOF -if compile_prog "" "" ; then - memfd=3Dyes -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -3711,66 +3658,6 @@ case "$capstone" in ;; esac =20 -########################################## -# check if we have fdatasync - -fdatasync=3Dno -cat > $TMPC << EOF -#include -int main(void) { -#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 -return fdatasync(0); -#else -#error Not supported -#endif -} -EOF -if compile_prog "" "" ; then - fdatasync=3Dyes -fi - -########################################## -# check if we have madvise - -madvise=3Dno -cat > $TMPC << EOF -#include -#include -#include -int main(void) { return madvise(NULL, 0, MADV_DONTNEED); } -EOF -if compile_prog "" "" ; then - madvise=3Dyes -fi - -########################################## -# check if we have posix_madvise - -posix_madvise=3Dno -cat > $TMPC << EOF -#include -#include -int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); } -EOF -if compile_prog "" "" ; then - posix_madvise=3Dyes -fi - -########################################## -# check if we have posix_memalign() - -posix_memalign=3Dno -cat > $TMPC << EOF -#include -int main(void) { - void *p; - return posix_memalign(&p, 8, 8); -} -EOF -if compile_prog "" "" ; then - posix_memalign=3Dyes -fi - ########################################## # check if we have posix_syslog =20 @@ -4842,12 +4729,6 @@ fi if test "$splice" =3D "yes" ; then echo "CONFIG_SPLICE=3Dy" >> $config_host_mak fi -if test "$eventfd" =3D "yes" ; then - echo "CONFIG_EVENTFD=3Dy" >> $config_host_mak -fi -if test "$memfd" =3D "yes" ; then - echo "CONFIG_MEMFD=3Dy" >> $config_host_mak -fi if test "$have_usbfs" =3D "yes" ; then echo "CONFIG_USBFS=3Dy" >> $config_host_mak fi @@ -4922,27 +4803,9 @@ fi if test "$membarrier" =3D "yes" ; then echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_mak fi -if test "$signalfd" =3D "yes" ; then - echo "CONFIG_SIGNALFD=3Dy" >> $config_host_mak -fi -if test "$optreset" =3D "yes" ; then - echo "HAVE_OPTRESET=3Dy" >> $config_host_mak -fi if test "$tcg" =3D "enabled" -a "$tcg_interpreter" =3D "true" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak fi -if test "$fdatasync" =3D "yes" ; then - echo "CONFIG_FDATASYNC=3Dy" >> $config_host_mak -fi -if test "$madvise" =3D "yes" ; then - echo "CONFIG_MADVISE=3Dy" >> $config_host_mak -fi -if test "$posix_madvise" =3D "yes" ; then - echo "CONFIG_POSIX_MADVISE=3Dy" >> $config_host_mak -fi -if test "$posix_memalign" =3D "yes" ; then - echo "CONFIG_POSIX_MEMALIGN=3Dy" >> $config_host_mak -fi =20 if test "$spice_protocol" =3D "yes" ; then echo "CONFIG_SPICE_PROTOCOL=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 5fec46bb65..cb50a2e473 100644 --- a/meson.build +++ b/meson.build @@ -1272,6 +1272,7 @@ config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_f= unction('clock_adjtime')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) +config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memal= ign')) config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) config_host_data.set('CONFIG_SEM_TIMEDWAIT', cc.has_function('sem_timedwai= t', dependencies: threads)) @@ -1311,6 +1312,8 @@ config_host_data.set('CONFIG_RTNETLINK', cc.has_header_symbol('linux/rtnetlink.h', 'IFLA_PROTO= _DOWN')) config_host_data.set('CONFIG_SYSMACROS', cc.has_header_symbol('sys/sysmacros.h', 'makedev')) +config_host_data.set('HAVE_OPTRESET', + cc.has_header_symbol('getopt.h', 'optreset')) config_host_data.set('HAVE_UTMPX', cc.has_header_symbol('utmpx.h', 'struct utmpx')) =20 @@ -1322,6 +1325,36 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', cc.has_member('struct stat', 'st_atim', prefix: '#include ')) =20 +config_host_data.set('CONFIG_EVENTFD', cc.compiles(''' + #include + int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) +config_host_data.set('CONFIG_FDATASYNC', cc.compiles(gnu_source_prefix + '= '' + #include + int main(void) { + #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 + return fdatasync(0); + #else + #error Not supported + #endif + }''')) +config_host_data.set('CONFIG_MADVISE', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + int main(void) { return madvise(NULL, 0, MADV_DONTNEED); }''')) +config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' + #include + int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) +config_host_data.set('CONFIG_POSIX_MADVISE', cc.compiles(gnu_source_prefix= + ''' + #include + #include + int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }''= ')) +config_host_data.set('CONFIG_SIGNALFD', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }'''= )) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include @@ -1398,7 +1431,7 @@ if link_language =3D=3D 'cpp' } endif =20 -have_ivshmem =3D config_host.has_key('CONFIG_EVENTFD') +have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') host_kconfig =3D \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ @@ -2711,10 +2744,6 @@ summary_info +=3D {'PIE': get_option('= b_pie')} summary_info +=3D {'static build': config_host.has_key('CONFIG_STATIC= ')} summary_info +=3D {'malloc trim support': has_malloc_trim} summary_info +=3D {'membarrier': config_host.has_key('CONFIG_MEMBAR= RIER')} -summary_info +=3D {'fdatasync': config_host.has_key('CONFIG_FDATAS= YNC')} -summary_info +=3D {'madvise': config_host.has_key('CONFIG_MADVIS= E')} -summary_info +=3D {'posix_madvise': config_host.has_key('CONFIG_POSIX_= MADVISE')} -summary_info +=3D {'posix_memalign': config_host.has_key('CONFIG_POSIX_= MEMALIGN')} summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} summary_info +=3D {'mutex debugging': config_host.has_key('CONFIG_DEBUG_= MUTEX')} summary_info +=3D {'memory allocator': get_option('malloc')} --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162550197804722.8107024791949; Mon, 5 Jul 2021 09:19:38 -0700 (PDT) Received: from localhost ([::1]:41758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0RJp-0000NB-0X for importer@patchew.org; Mon, 05 Jul 2021 12:19:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1S-0001Ou-2l for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:38 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0003gP-5S for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: by mail-wr1-x433.google.com with SMTP id u8so22622598wrq.8 for ; Mon, 05 Jul 2021 09:00:32 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0skwyYzRx8lw1Lptcw6cX8ImdqPgrLgTWanS4XnbGr4=; b=tYctCtxnpL+oioJbWglLMDYDztY/fQnoHN/EpaG/dgqn8JiI1hfNSeP60NTGteIlrT yDYJiSvlXSMNu1idDUceTztQmXqt7WmdnrdGjZjQkGjiVx1MeqGDfQ6n8wyekkBRVjE3 KG3RhiUFsOxFHVuaWjtLdtzw56XrEur0jlvWm7zN0A+CgT0Aaw3s1H5Y/1ugcrz5Tiim Iw1qd/WwZuzxT/L8JKF/r2i/PS7uqU73xTaLA2H6KP0PyCTQV55oE2KyYR5SZwKlESq8 56yRzKG68KFVthmp0ufepKTkAAMpqxOJ1xcciLX2c5vLJtg2cY7f0cn8tuO/xRcW9rqe aQbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0skwyYzRx8lw1Lptcw6cX8ImdqPgrLgTWanS4XnbGr4=; b=oNdMpxe4Hur/9OZBYtnRo144QyGmnXmNmv6m8jD2ZNz4DZGyMk1jYjC987su9GsuMl bPFkvcqBimBO8O5eothM9tCAivi+3nO4bEQw8F9L5Z4yItsw9jxr0YRiHqNZf4RuIE6o tA9m4Z7WMd82PK5jw76ic+QgHMvzppMiIOXYXKJcbV0jSrj0SinRmhpD1pAvaIUMhzSW vT/w7If6XTvBrin6rWpBNxh4A1YWSQw3XK/xTN7AyGwTjcxd13OXZNRsu+5euJB2lLOA 0BWz/q/af40qzKi+gv3/0f93hdQTYbEGbKqtHC7wPUarDAzlJoEml4+aAhTSLbjEGVvB cDRA== X-Gm-Message-State: AOAM530qzD7F1nklKnOx9bupim90gShhSGSWPHzfZCAFAFXDfZGgF1zv eH2/e7vABBFY+V6wuAA4zSF/ieN+gXE= X-Google-Smtp-Source: ABdhPJwWCtni8FtbupdqamfsAIrMwMedT3gkg6tgvMgQFUNxxj3b8INtD5FkDXASjvV9Ndud8RHmMA== X-Received: by 2002:a5d:4f01:: with SMTP id c1mr17037239wru.266.1625500831470; Mon, 05 Jul 2021 09:00:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/17] configure: convert compiler tests to meson, part 5 Date: Mon, 5 Jul 2021 18:00:17 +0200 Message-Id: <20210705160018.241397-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501983760100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 101 ---------------------------------------------------- meson.build | 26 ++++++++++++++ 2 files changed, 26 insertions(+), 101 deletions(-) diff --git a/configure b/configure index 83168ceb52..1cac47399d 100755 --- a/configure +++ b/configure @@ -3395,92 +3395,6 @@ EOF fi fi =20 -# Check for inotify functions when we are building linux-user -# emulator. This is done because older glibc versions don't -# have syscall stubs for these implemented. In that case we -# don't provide them even if kernel supports them. -# -inotify=3Dno -cat > $TMPC << EOF -#include - -int -main(void) -{ - /* try to start inotify */ - return inotify_init(); -} -EOF -if compile_prog "" "" ; then - inotify=3Dyes -fi - -inotify1=3Dno -cat > $TMPC << EOF -#include - -int -main(void) -{ - /* try to start inotify */ - return inotify_init1(0); -} -EOF -if compile_prog "" "" ; then - inotify1=3Dyes -fi - -# check if pipe2 is there -pipe2=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - int pipefd[2]; - return pipe2(pipefd, O_CLOEXEC); -} -EOF -if compile_prog "" "" ; then - pipe2=3Dyes -fi - -# check if accept4 is there -accept4=3Dno -cat > $TMPC << EOF -#include -#include - -int main(void) -{ - accept4(0, NULL, NULL, SOCK_CLOEXEC); - return 0; -} -EOF -if compile_prog "" "" ; then - accept4=3Dyes -fi - -# check if tee/splice is there. vmsplice was added same time. -splice=3Dno -cat > $TMPC << EOF -#include -#include -#include - -int main(void) -{ - int len, fd =3D 0; - len =3D tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); - splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); - return 0; -} -EOF -if compile_prog "" "" ; then - splice=3Dyes -fi - ########################################## # libnuma probe =20 @@ -4720,24 +4634,9 @@ fi if test "$module_upgrades" =3D "yes"; then echo "CONFIG_MODULE_UPGRADES=3Dy" >> $config_host_mak fi -if test "$pipe2" =3D "yes" ; then - echo "CONFIG_PIPE2=3Dy" >> $config_host_mak -fi -if test "$accept4" =3D "yes" ; then - echo "CONFIG_ACCEPT4=3Dy" >> $config_host_mak -fi -if test "$splice" =3D "yes" ; then - echo "CONFIG_SPLICE=3Dy" >> $config_host_mak -fi if test "$have_usbfs" =3D "yes" ; then echo "CONFIG_USBFS=3Dy" >> $config_host_mak fi -if test "$inotify" =3D "yes" ; then - echo "CONFIG_INOTIFY=3Dy" >> $config_host_mak -fi -if test "$inotify1" =3D "yes" ; then - echo "CONFIG_INOTIFY1=3Dy" >> $config_host_mak -fi if test "$gio" =3D "yes" ; then echo "CONFIG_GIO=3Dy" >> $config_host_mak echo "GIO_CFLAGS=3D$gio_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index cb50a2e473..12162264db 100644 --- a/meson.build +++ b/meson.build @@ -1268,6 +1268,7 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_head= er('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) =20 # has_function +config_host_data.set('CONFIG_ACCEPT4', cc.has_function('accept4')) config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_function('clock_adjtim= e')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) @@ -1302,6 +1303,10 @@ config_host_data.set('CONFIG_FIEMAP', config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) +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_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include @@ -1345,6 +1350,15 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles(g= nu_source_prefix + ''' config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' #include int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) +config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' + #include + #include + + int main(void) + { + int pipefd[2]; + return pipe2(pipefd, O_CLOEXEC); + }''')) config_host_data.set('CONFIG_POSIX_MADVISE', cc.compiles(gnu_source_prefix= + ''' #include #include @@ -1354,6 +1368,18 @@ config_host_data.set('CONFIG_SIGNALFD', cc.compiles(= gnu_source_prefix + ''' #include #include int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }'''= )) +config_host_data.set('CONFIG_SPLICE', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + + int main(void) + { + int len, fd =3D 0; + len =3D tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); + splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); + return 0; + }''')) =20 # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' --=20 2.31.1 From nobody Fri May 17 05:54:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625501670880700.0702097928489; Mon, 5 Jul 2021 09:14:30 -0700 (PDT) Received: from localhost ([::1]:56928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0REr-0008DK-NI for importer@patchew.org; Mon, 05 Jul 2021 12:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0R1S-0001Or-29 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:38 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:37841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0R1Q-0003gp-85 for qemu-devel@nongnu.org; Mon, 05 Jul 2021 12:00:37 -0400 Received: by mail-wr1-x435.google.com with SMTP id i94so22672312wri.4 for ; Mon, 05 Jul 2021 09:00:33 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id b12sm1217063wrt.78.2021.07.05.09.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 09:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wsCVXQaLB1KXZv6TQRlcL157BoPpd+++508LQhtC4LY=; b=F9MGNorVKhwh2pOebQRu9oj3YUKTyLyFNYPFJhHmrTKXrEGij8UB/dW3SoqyQrrFj6 aYpHoILWJUlipIsCrDgbyAqLN6rkNLjsXd8wMKA2F1V5R5CVw8XgS+CeD5jMb98Dxt0x wJRoVeUlUwTU2GwCWdwvJY4BiAh/3wsxtScPymJkNmBpWQ33QNR8YqvaGzQnkrZx5gxZ dw6d49UMiCyotlZMnNHOzwLct2oMqAxMiatOknTrB2wKm4rbhP5jORCz1S56bCXJ3R4F BijVM4y6vkWeWUfjG1QOMsiaq66UEkPUChpcrjockCNLg6aluoQRTMYJtczBGU/DYBqn 8Ccg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wsCVXQaLB1KXZv6TQRlcL157BoPpd+++508LQhtC4LY=; b=WXeTzFPxd1vMeGRTi5CQMSXbMawtckgpln/+LS9MnUeDXfT9uAETC11VV5+icSpSLQ QkAwSvhiMKNGDF48v6YWVfQcAA/WUAJ2mbNlxQTFXVOP26zD+2MBEQb9QxjMMZ270bXt CdcBHjnhPcvui3++faKn7z6ldVDI5tiyR8YmraB9OAd9WzcX5I4/GoBi824vpefFYVJY rkIJu3aoAyBwfW1Pi8rrGpb3bvWRO1Din8XExgsBifKyom9G5uka1q0FUEY7TGegwlmD SVKhvftBgJfH9sCbpuAvmhpLIV5ybGV/MBc3z9uVGSagJ8t03A/DnjZL4O0VASQcCT1c 4QfQ== X-Gm-Message-State: AOAM533kI7l0Q9hJ2K6Wg1g7T8BRpGw4hXEzJA8AAT9S7DbRGTSXvmjn K4fVfS4edR+I9M1kOn/eTLzINMNag9I= X-Google-Smtp-Source: ABdhPJy9M3nvhDGoF5TRglJGhmL777hTo63TO6mR7JM2dVyfkDyhAL9o/jVNhXMcen1W4s8Dot7EKQ== X-Received: by 2002:a5d:4c50:: with SMTP id n16mr16598298wrt.249.1625500832156; Mon, 05 Jul 2021 09:00:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 17/17] configure: convert compiler tests to meson, part 6 Date: Mon, 5 Jul 2021 18:00:18 +0200 Message-Id: <20210705160018.241397-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705160018.241397-1-pbonzini@redhat.com> References: <20210705160018.241397-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625501677090100001 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Paolo Bonzini --- configure | 75 ----------------------------------------------------- meson.build | 11 ++++++++ 2 files changed, 11 insertions(+), 75 deletions(-) diff --git a/configure b/configure index 1cac47399d..0e487ae091 100755 --- a/configure +++ b/configure @@ -3763,65 +3763,6 @@ else # "$safe_stack" =3D "" fi fi =20 -########################################## -# check if we have open_by_handle_at - -open_by_handle_at=3Dno -cat > $TMPC << EOF -#include -#if !defined(AT_EMPTY_PATH) -# error missing definition -#else -int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0= ); } -#endif -EOF -if compile_prog "" "" ; then - open_by_handle_at=3Dyes -fi - -######################################## -# check if we have linux/magic.h - -linux_magic_h=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - linux_magic_h=3Dyes -fi - -######################################## -# check if we have valgrind/valgrind.h - -valgrind_h=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - valgrind_h=3Dyes -fi - -######################################## -# check if environ is declared - -has_environ=3Dno -cat > $TMPC << EOF -#include -int main(void) { - environ =3D 0; - return 0; -} -EOF -if compile_prog "" "" ; then - has_environ=3Dyes -fi - ######################################## # check if cpuid.h is usable. =20 @@ -4761,18 +4702,6 @@ if test "$crypto_afalg" =3D "yes" ; then echo "CONFIG_AF_ALG=3Dy" >> $config_host_mak fi =20 -if test "$open_by_handle_at" =3D "yes" ; then - echo "CONFIG_OPEN_BY_HANDLE=3Dy" >> $config_host_mak -fi - -if test "$linux_magic_h" =3D "yes" ; then - echo "CONFIG_LINUX_MAGIC_H=3Dy" >> $config_host_mak -fi - -if test "$valgrind_h" =3D "yes" ; then - echo "CONFIG_VALGRIND_H=3Dy" >> $config_host_mak -fi - if test "$have_asan_iface_fiber" =3D "yes" ; then echo "CONFIG_ASAN_IFACE_FIBER=3Dy" >> $config_host_mak fi @@ -4781,10 +4710,6 @@ if test "$have_tsan" =3D "yes" && test "$have_tsan_i= face_fiber" =3D "yes" ; then echo "CONFIG_TSAN=3Dy" >> $config_host_mak fi =20 -if test "$has_environ" =3D "yes" ; then - echo "CONFIG_HAS_ENVIRON=3Dy" >> $config_host_mak -fi - if test "$cpuid_h" =3D "yes" ; then echo "CONFIG_CPUID_H=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 12162264db..1651496800 100644 --- a/meson.build +++ b/meson.build @@ -1260,6 +1260,8 @@ config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_h= ost_block_device) =20 # has_header config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) +config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'= )) +config_host_data.set('CONFIG_VALGRIND_H', cc.has_header('valgrind/valgrind= .h')) config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) @@ -1292,6 +1294,8 @@ config_host_data.set('CONFIG_BYTESWAP_H', cc.has_header_symbol('byteswap.h', 'bswap_32')) config_host_data.set('CONFIG_EPOLL_CREATE1', cc.has_header_symbol('sys/epoll.h', 'epoll_create1')) +config_host_data.set('CONFIG_HAS_ENVIRON', + cc.has_header_symbol('unistd.h', 'environ', prefix: g= nu_source_prefix)) config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE', cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUN= CH_HOLE') and cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_KEE= P_SIZE')) @@ -1350,6 +1354,13 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles(g= nu_source_prefix + ''' config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' #include int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) +config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.compiles(gnu_source_prefi= x + ''' + #include + #if !defined(AT_EMPTY_PATH) + # error missing definition + #else + int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh,= 0); } + #endif''')) config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' #include #include --=20 2.31.1