From patchwork Thu Dec 17 09:40:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58111C4361B for ; Thu, 17 Dec 2020 09:43:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8DF7233FB for ; Thu, 17 Dec 2020 09:43:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8DF7233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppp0-0007Y7-Q7 for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:43:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmF-0004fg-F9 for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:52 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:43526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmD-0007i0-Mi for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:51 -0500 Received: by mail-ed1-x529.google.com with SMTP id q16so27921462edv.10 for ; Thu, 17 Dec 2020 01:40:49 -0800 (PST) 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=t+Y7UFYFTZ7LLffq17YS+EHmwTw0jFbFP2FYxjrbxAs=; b=NQAAXx8gYuS5CsLgK92IlTPoLEaKaBBncwA0LpD3ysSPvP7Bb1RMpwAaqfHMpyZQht vxmw7i7EBBLDk69Ae4bdPaTlW3YRcoMsB67Ytc5oRYYFRiOXwsunVpOObOx6B0z8bY5O NCTCEk4155KE9QqDHhbn91yQ5QPIzjPtXBQqfqW51c1qUfbSZR9G5eFuAXOIWiSILXwv joKDNBrFaRnBIg0pQ8dZgK5cpQC07iaDtEb1YM67LDkfHyCGqMfomQ4vaXkhz6tlYMVi pXBbR+WGT42GEmnHsMqKKt7oAR99s68c4NY98AVpSododI3rtcpd6YqWq5N+Ldm581vZ chlQ== 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=t+Y7UFYFTZ7LLffq17YS+EHmwTw0jFbFP2FYxjrbxAs=; b=DS5nv0mlEIewvgLeI4hcRoeiYds+wWmnJsk4ABregAVRbYW/7OZ0h6+8bPhE7EsEcD Ffmhk1zmgRTQpAPy58syElqnhg9azcYjwkaSLwoXWPmQcNuAV9sp89GzfHT5NLnVkI0G SRLQH9SAMX2PtTuzuneQ4MLgxbxuOIcJWZDmadT/JqQ7wGTQcmmbrNDvfozQO0nqWWzB 6C275XcRZyHp/h/HZnzxic+Qp0UkRQ/Awdbsr9aik6ijEhM8Ege8LJtJPel01tTFaHWE 8m7AEYEl/yHjbwWsI6Sf+/0D6ePOCvj7t5cf3iN/bl3rvhCyK0LnctSBAT4Aropil1Uw zx/Q== X-Gm-Message-State: AOAM532+EIG2dF94wNHd77ymQkoCcgzO6xkMQVRhOlo9vbZ57sq/aIFH qXvlaCcJh+AoawGkBZE4su9w8ndN9Ac= X-Google-Smtp-Source: ABdhPJy0w8rB5W6OP21OZURf61bbtf2hocaulLP0fDBV3hS7Gh+N80bNx3HogUw8Gs2iOXQUehbsRg== X-Received: by 2002:a50:bacb:: with SMTP id x69mr22169835ede.39.1608198048251; Thu, 17 Dec 2020 01:40:48 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:47 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/18] brlapi: convert to meson Date: Thu, 17 Dec 2020 10:40:27 +0100 Message-Id: <20201217094044.46462-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- chardev/meson.build | 2 +- configure | 32 ++++---------------------------- meson.build | 20 +++++++++++++++++--- meson_options.txt | 2 ++ 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/chardev/meson.build b/chardev/meson.build index 4e19722c5e..32377af383 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -29,7 +29,7 @@ softmmu_ss.add(files('msmouse.c', 'wctablet.c', 'testdev.c')) chardev_modules = {} -if config_host.has_key('CONFIG_BRLAPI') +if brlapi.found() module_ss = ss.source_set() module_ss.add(when: [brlapi], if_true: [files('baum.c'), pixman]) chardev_modules += { 'baum': module_ss } diff --git a/configure b/configure index 74eebfd692..42b39544d4 100755 --- a/configure +++ b/configure @@ -306,7 +306,7 @@ for opt do esac done -brlapi="$default_feature" +brlapi="auto" curl="$default_feature" iconv="auto" curses="auto" @@ -1105,9 +1105,9 @@ for opt do ;; --enable-xen-pci-passthrough) xen_pci_passthrough="enabled" ;; - --disable-brlapi) brlapi="no" + --disable-brlapi) brlapi="disabled" ;; - --enable-brlapi) brlapi="yes" + --enable-brlapi) brlapi="enabled" ;; --disable-kvm) kvm="disabled" ;; @@ -3425,26 +3425,6 @@ for drv in $audio_drv_list; do esac done -########################################## -# BrlAPI probe - -if test "$brlapi" != "no" ; then - brlapi_libs="-lbrlapi" - cat > $TMPC << EOF -#include -#include -int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } -EOF - if compile_prog "" "$brlapi_libs" ; then - brlapi=yes - else - if test "$brlapi" = "yes" ; then - feature_not_found "brlapi" "Install brlapi devel" - fi - brlapi=no - fi -fi - ########################################## # curl probe if test "$curl" != "no" ; then @@ -6134,10 +6114,6 @@ if test "$curl" = "yes" ; then echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak echo "CURL_LIBS=$curl_libs" >> $config_host_mak fi -if test "$brlapi" = "yes" ; then - echo "CONFIG_BRLAPI=y" >> $config_host_mak - echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak -fi if test "$gtk" = "yes" ; then echo "CONFIG_GTK=y" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak @@ -6971,7 +6947,7 @@ NINJA=$ninja $meson setup \ -Dcocoa=$cocoa -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ - -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \ + -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index bb198f792a..70f81121d7 100644 --- a/meson.build +++ b/meson.build @@ -570,8 +570,21 @@ if have_system and not get_option('curses').disabled() endif brlapi = not_found -if 'CONFIG_BRLAPI' in config_host - brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) +if not get_option('brlapi').auto() or have_system + brlapi = cc.find_library('brlapi', has_headers: ['brlapi.h'], + required: get_option('brlapi'), + static: enable_static) + if brlapi.found() and not cc.links(''' + #include + #include + int main(void) { return brlapi__openConnection (NULL, NULL, NULL); }''', dependencies: brlapi) + brlapi = not_found + if get_option('brlapi').enabled() + error('could not link brlapi') + else + warning('could not link brlapi, disabling') + endif + endif endif sdl = not_found @@ -854,6 +867,7 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir')) +config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) @@ -2164,7 +2178,7 @@ summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')} if config_host.has_key('CONFIG_XEN_BACKEND') summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']} endif -summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')} +summary_info += {'brlapi support': brlapi.found()} summary_info += {'Documentation': build_docs} summary_info += {'PIE': get_option('b_pie')} summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} diff --git a/meson_options.txt b/meson_options.txt index 242e0769fb..62efe96a91 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,8 @@ option('cfi', type: 'boolean', value: 'false', option('cfi_debug', type: 'boolean', value: 'false', description: 'Verbose errors in case of CFI violation') +option('brlapi', type : 'feature', value : 'auto', + description: 'brlapi character device driver') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('mpath', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B08CEC4361B for ; Thu, 17 Dec 2020 09:45:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B956233FB for ; Thu, 17 Dec 2020 09:45:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B956233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppqv-0001WG-1w for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:45:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmH-0004ga-Ba for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:55 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:41297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmE-0007iD-Nj for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:52 -0500 Received: by mail-ed1-x533.google.com with SMTP id i24so27890389edj.8 for ; Thu, 17 Dec 2020 01:40:50 -0800 (PST) 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=BGSrQZxoaxOkU9kafkVAP7t2jTM7OoA0anXI1A0IxZI=; b=h2u+x8H17w5dgB7Zy+vi1CKi47rkGkRpQxkhiFWFm70WtEJC0J5soTEipiQASVBz1N OOpTrADHtqTod2nhkOVvTmTVQyIKTsGiFypw/gD6tQZwMp94FNj8DbvZ15KGV0Es+AKp X3JMjwLpj8aBN3zO5Cflgd7Opto2lrJQwmd6eoHzSfl/2R6aNj/+7hCL8I9GewQ9+tZR /G7Rin2+YZUTDzO58SIMmfddBL2zuGSljDpKbD77wg1bKsgKCNzSAl9Vci5F0RNadOol he3lZ5MSAQeF+jRYHVH1WAUjDdR+iVblokMnIVjgF1A/BbmKTVrR7ormQaq+T0i20KVC cDXw== 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=BGSrQZxoaxOkU9kafkVAP7t2jTM7OoA0anXI1A0IxZI=; b=nWtNijCEpyGypE+UaOGROAAYKiAMOQLKtaBbTcRU5EFz2VXvd0QVNNx6BMhQqe1EwF 7dl020RiBr3bZiG4jsyq0amKiv+dRwU21WnExpSNx3I8GeZGKQW0xBjAWaqqkLxH0YnA 2/fmHBhkyvSHkUhV2efPzJdoIBXaakcSHhGfYI9tS8riOuarbJw/9dZgPV5BxO2R1PYI n/R9PxvLl59Os4GHFPGB0JfqEkAME9y0VPbvjJRhSXkUIf0/bowmQPIV+6WnCTFrRKk3 lstZEvdzv8L98CCe1vOvjYXmJI/CwezEt5pvFsSgy+K2284B+UihtQ5pBI+sgJyrx+tr 2gOw== X-Gm-Message-State: AOAM530td0bMDOk0HkarPCdVE5eqwnsPo+dD7EDnbKgE8MjbP5xwA4FS X7C5VJc58Jkt8PJr3TQ85DnKLh0ppfo= X-Google-Smtp-Source: ABdhPJzpSKWc8piETXr/V8+EnJ9MXqV8Aqu2XNSW1gV35EyF0FyiZG3VatL3a9qJkCoed+U+yY213Q== X-Received: by 2002:a05:6402:139a:: with SMTP id b26mr37855178edv.47.1608198049086; Thu, 17 Dec 2020 01:40:49 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:48 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/18] curl: remove compatibility code, require 7.29.0 Date: Thu, 17 Dec 2020 10:40:28 +0100 Message-Id: <20201217094044.46462-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= , =?utf-8?q?Daniel_Berrang=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" cURL 7.16.0 was released in October 2006. Just remove code that is in all likelihood not being used anywhere, and require the oldest version found in currently supported distros, which is 7.29.0 from CentOS 7. pkg-config is enough for QEMU, since it does not need extra information such as the path for certicate authorities. All supported platforms today will all have pkg-config for curl, so we can drop curl-config. Suggested-by: Daniel Berrangé Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Marc-André Lureau --- block/curl.c | 28 ---------------------------- configure | 9 ++------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/block/curl.c b/block/curl.c index d24a4c5897..4ff895df8f 100644 --- a/block/curl.c +++ b/block/curl.c @@ -37,26 +37,6 @@ // #define DEBUG_VERBOSE -#if LIBCURL_VERSION_NUM >= 0x071000 -/* The multi interface timer callback was introduced in 7.16.0 */ -#define NEED_CURL_TIMER_CALLBACK -#define HAVE_SOCKET_ACTION -#endif - -#ifndef HAVE_SOCKET_ACTION -/* If curl_multi_socket_action isn't available, define it statically here in - * terms of curl_multi_socket. Note that ev_bitmask will be ignored, which is - * less efficient but still safe. */ -static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t sockfd, - int ev_bitmask, - int *running_handles) -{ - return curl_multi_socket(multi_handle, sockfd, running_handles); -} -#define curl_multi_socket_action __curl_multi_socket_action -#endif - #define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \ CURLPROTO_FTP | CURLPROTO_FTPS) @@ -140,7 +120,6 @@ typedef struct BDRVCURLState { static void curl_clean_state(CURLState *s); static void curl_multi_do(void *arg); -#ifdef NEED_CURL_TIMER_CALLBACK /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque) { @@ -156,7 +135,6 @@ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque) } return 0; } -#endif /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, @@ -433,7 +411,6 @@ static void curl_multi_do(void *arg) static void curl_multi_timeout_do(void *arg) { -#ifdef NEED_CURL_TIMER_CALLBACK BDRVCURLState *s = (BDRVCURLState *)arg; int running; @@ -446,9 +423,6 @@ static void curl_multi_timeout_do(void *arg) curl_multi_check_completion(s); qemu_mutex_unlock(&s->mutex); -#else - abort(); -#endif } /* Called with s->mutex held. */ @@ -598,10 +572,8 @@ static void curl_attach_aio_context(BlockDriverState *bs, s->multi = curl_multi_init(); s->aio_context = new_context; curl_multi_setopt(s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb); -#ifdef NEED_CURL_TIMER_CALLBACK curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, s); curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, curl_timer_cb); -#endif } static QemuOptsList runtime_opts = { diff --git a/configure b/configure index 42b39544d4..c0a3e1556b 100755 --- a/configure +++ b/configure @@ -3428,17 +3428,12 @@ done ########################################## # curl probe if test "$curl" != "no" ; then - if $pkg_config libcurl --exists; then - curlconfig="$pkg_config libcurl" - else - curlconfig=curl-config - fi cat > $TMPC << EOF #include int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; } EOF - curl_cflags=$($curlconfig --cflags 2>/dev/null) - curl_libs=$($curlconfig --libs 2>/dev/null) + curl_cflags=$($pkg_config libcurl --cflags 2>/dev/null) + curl_libs=$($pkg_config libcurl --libs 2>/dev/null) if compile_prog "$curl_cflags" "$curl_libs" ; then curl=yes else From patchwork Thu Dec 17 09:40:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85039C4361B for ; Thu, 17 Dec 2020 09:43:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E715233FE for ; Thu, 17 Dec 2020 09:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E715233FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpppF-0007oP-Vt for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:43:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0004hE-AL for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:56 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:44933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmF-0007iI-6V for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:53 -0500 Received: by mail-ed1-x52f.google.com with SMTP id p22so27890989edu.11 for ; Thu, 17 Dec 2020 01:40:50 -0800 (PST) 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=ESpu4JIYwg0OY4jzmB8inm03RyD5oDmBeHHird1k/h8=; b=pARKOvJATZxNDhQ5Dy6+eYiMymbX/tP9fbjsYFOEnvr6qE+HUfMZVn1yna8E0T4sxx W1c3WraF0xzYO8gwpG45eCchozXsQRk6+I30EDdEQLHZD2nNK2sOMpt3Q8hChrYJaCIP WnWIXhIg/1y6qhjlCjgu2f9OmLD1/Cj6DRaxvAG78DQcmObQCJEDFtmyZ0vyroSKQeLH DhvB3EaQfcRKnq5wWanvSDB1JDnUDrYZcBkeO+9UnOCVnqINbv9ZM3LUQ6zBJDSZ+Pmr 6Qe/LksSpwSBazwPMUE81vD62CTejU/3JnFj26XXs0y/yHYS6ifuStiYWtaUBU+AuPRi jrzQ== 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=ESpu4JIYwg0OY4jzmB8inm03RyD5oDmBeHHird1k/h8=; b=gZRa7J2Ih3m2Xf0NivYUr2F7iWqJyRKS8W6cr07mYt/bBQQulwNEqPPsXN+wy/3m6W avG350KJ6JJjJ5624yK55gUIpVwtVrYJfd3eCWvIspEcmEFLUIpBPH+Mede64CTKSmhF iJlZjvUDOy+lInw14Y69DJlIQt3x6tk43YfmwnmA692O4veCz9KYD5EucfJp6Q1M2BI/ 15vFfkYRpDV0S7hZ+Gl1r69vCAN4vdNuQiSI1u2uQHdr3EoCwAUAIXBHnK5LQ6Luiphi HoDgpax3YXNcuAJF9OZGneSLFlPgu1J/JVh6d3SP4Q0bg1YEk/m0DC1Pg+QSb8nrY6Wc M73g== X-Gm-Message-State: AOAM532Mi4P73/Gti9Wef8Ol28E7hLdMAkI6dDCCa4DVxtT4Rko4wpnX 7/rXRsmdscZ41VbZoCNjwZcBuez+muw= X-Google-Smtp-Source: ABdhPJw1A6D+2IM4vWSO+YWy+lYqICRYhQI3XZloAEUYqN1FXuWBqtW9wYIetRt/BfJU6TO0Ngu24Q== X-Received: by 2002:a50:eb96:: with SMTP id y22mr38045763edr.91.1608198049929; Thu, 17 Dec 2020 01:40:49 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/18] curl: convert to meson Date: Thu, 17 Dec 2020 10:40:29 +0100 Message-Id: <20201217094044.46462-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Marc-André Lureau --- configure | 31 ++++--------------------------- contrib/elf2dmp/meson.build | 2 +- meson.build | 11 +++++++---- meson_options.txt | 2 ++ 4 files changed, 14 insertions(+), 32 deletions(-) diff --git a/configure b/configure index c0a3e1556b..71196b1fe7 100755 --- a/configure +++ b/configure @@ -307,7 +307,7 @@ for opt do done brlapi="auto" -curl="$default_feature" +curl="auto" iconv="auto" curses="auto" docs="auto" @@ -1216,9 +1216,9 @@ for opt do ;; --enable-iconv) iconv="enabled" ;; - --disable-curl) curl="no" + --disable-curl) curl="disabled" ;; - --enable-curl) curl="yes" + --enable-curl) curl="enabled" ;; --disable-fdt) fdt="disabled" ;; @@ -3425,25 +3425,6 @@ for drv in $audio_drv_list; do esac done -########################################## -# curl probe -if test "$curl" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; } -EOF - curl_cflags=$($pkg_config libcurl --cflags 2>/dev/null) - curl_libs=$($pkg_config libcurl --libs 2>/dev/null) - if compile_prog "$curl_cflags" "$curl_libs" ; then - curl=yes - else - if test "$curl" = "yes" ; then - feature_not_found "curl" "Install libcurl devel" - fi - curl=no - fi -fi # test "$curl" - ########################################## # glib support probe @@ -6104,11 +6085,6 @@ fi if test "$bswap_h" = "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak fi -if test "$curl" = "yes" ; then - echo "CONFIG_CURL=y" >> $config_host_mak - echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak - echo "CURL_LIBS=$curl_libs" >> $config_host_mak -fi if test "$gtk" = "yes" ; then echo "CONFIG_GTK=y" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak @@ -6943,6 +6919,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ + -Dcurl=$curl \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/contrib/elf2dmp/meson.build b/contrib/elf2dmp/meson.build index b3de173316..4d86cb390a 100644 --- a/contrib/elf2dmp/meson.build +++ b/contrib/elf2dmp/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_CURL' in config_host +if curl.found() executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'), dependencies: [glib, curl], install: true) diff --git a/meson.build b/meson.build index 70f81121d7..83dbc61acd 100644 --- a/meson.build +++ b/meson.build @@ -392,9 +392,11 @@ if 'CONFIG_VIRGL' in config_host link_args: config_host['VIRGL_LIBS'].split()) endif curl = not_found -if 'CONFIG_CURL' in config_host - curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(), - link_args: config_host['CURL_LIBS'].split()) +if not get_option('curl').auto() or have_block + curl = dependency('libcurl', version: '>=7.29.0', + method: 'pkg-config', + required: get_option('curl'), + static: enable_static) endif libudev = not_found if targetos == 'linux' and (have_system or have_tools) @@ -872,6 +874,7 @@ config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) +config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) @@ -2160,7 +2163,7 @@ summary_info += {'iconv support': iconv.found()} summary_info += {'curses support': curses.found()} # TODO: add back version summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')} -summary_info += {'curl support': config_host.has_key('CONFIG_CURL')} +summary_info += {'curl support': curl.found()} summary_info += {'mingw32 support': targetos == 'windows'} summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} diff --git a/meson_options.txt b/meson_options.txt index 62efe96a91..2b845ac62b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') +option('curl', type : 'feature', value : 'auto', + description: 'CURL block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F42CC4361B for ; Thu, 17 Dec 2020 10:00:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 667132360D for ; Thu, 17 Dec 2020 10:00:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 667132360D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpq4q-0007Vw-Ax for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 05:00:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmU-0004uV-6r for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:06 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:42035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmG-0007iU-3h for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:05 -0500 Received: by mail-ed1-x536.google.com with SMTP id g24so2327430edw.9 for ; Thu, 17 Dec 2020 01:40:51 -0800 (PST) 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=TdvZIaVS2PKvVRM9fsWZ4iOV5QJRNYL/FLyT44crNg8=; b=namBqQ6kdwnwlOSMVvRAmcPmqJtIMQAm3jhKmpXcWabZWY7ZbaZK2QWZuzBfaP6oHa e5WZW7CvMXMpTFscFtyAmKdFphOarnmCVlogBvl5UCSx2/rEtbYBcClxWDVBwk/6WMRM INIvPHzSiVdfojLNLp20rYScLB9xpGx8JOGnEeewIUWdRrNfHDcZLKrjtx4RfTFN3JUC Sr7KJ037urPnd7tTdErrUf/eHDEMmMFDtd7CGz+aNydg9mF1akcLnZ0lOLJWzOkCPMrx W5lP+RPTJi3Pyi5mj2YB9eGnYI7/qw4SpMGU2z1w3KGmfmN41mueDGb+lWG7/d0uQ0Fa C/bA== 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=TdvZIaVS2PKvVRM9fsWZ4iOV5QJRNYL/FLyT44crNg8=; b=TVAxU0jIEsnXMazik1ObppqforrLQ1wQYkAWjk9XKECxl528WqsLoTP9gpWmGphoYR upqs2TJxVwcyTzyPQvjOhspJ1N9+RDqOfWs4FZ4ES3AnHCuumAWWWkDx0LySt1MH9kuT hI0QxnK7J04qIVMJsPcXSOxIS9BC0KIcw3NoWWZzce5330j4wldLbf5MXm6O4gtcyE2G 68ZabWxs1mXeLRUKm36QN8Aw1kEiBX1UZEqXMfcWNL06AIRaN/PlL1TNGEIPaicrd1D0 mrwOGK/14sagqrjgOb1AZlZj9fCgiw0eFUaTQzw2vjBPM5paEPTz1+/hPN5AeN6BLqDD 1BHw== X-Gm-Message-State: AOAM530d4AQ1Ul52c3FKyglFUdoaWtoVXJYm9AmHrIspRVx6cdDRECh5 3mmR8rn3wh4WKtOuYJ56epO5qKyURIk= X-Google-Smtp-Source: ABdhPJw35xDD82hK/qKSNNOt3+JmuoOsUe8X1+NNGDyVm5vvdQgZ0ZQZw2sTiv3bz8S9jmc9xdBI3g== X-Received: by 2002:a50:955b:: with SMTP id v27mr36991445eda.324.1608198050733; Thu, 17 Dec 2020 01:40:50 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:50 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/18] glusterfs: convert to meson Date: Thu, 17 Dec 2020 10:40:30 +0100 Message-Id: <20201217094044.46462-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 102 ++-------------------------------------------- meson.build | 46 +++++++++++++++++++-- meson_options.txt | 2 + 3 files changed, 48 insertions(+), 102 deletions(-) diff --git a/configure b/configure index 71196b1fe7..5529ac4b32 100755 --- a/configure +++ b/configure @@ -415,13 +415,7 @@ crypto_afalg="no" cfi="false" cfi_debug="false" seccomp="$default_feature" -glusterfs="$default_feature" -glusterfs_xlator_opt="no" -glusterfs_discard="no" -glusterfs_fallocate="no" -glusterfs_zerofill="no" -glusterfs_ftruncate_has_stat="no" -glusterfs_iocb_has_stat="no" +glusterfs="auto" gtk="$default_feature" gtk_gl="no" tls_priority="NORMAL" @@ -1366,7 +1360,7 @@ for opt do ;; --disable-seccomp) seccomp="no" ;; - --disable-glusterfs) glusterfs="no" + --disable-glusterfs) glusterfs="disabled" ;; --disable-avx2) avx2_opt="no" ;; @@ -1377,7 +1371,7 @@ for opt do --enable-avx512f) avx512f_opt="yes" ;; - --enable-glusterfs) glusterfs="yes" + --enable-glusterfs) glusterfs="enabled" ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 @@ -3871,64 +3865,6 @@ if test "$libxml2" != "no" ; then fi fi -########################################## -# glusterfs probe -if test "$glusterfs" != "no" ; then - if $pkg_config --atleast-version=3 glusterfs-api; then - glusterfs="yes" - glusterfs_cflags=$($pkg_config --cflags glusterfs-api) - glusterfs_libs=$($pkg_config --libs glusterfs-api) - if $pkg_config --atleast-version=4 glusterfs-api; then - glusterfs_xlator_opt="yes" - fi - if $pkg_config --atleast-version=5 glusterfs-api; then - glusterfs_discard="yes" - fi - if $pkg_config --atleast-version=6 glusterfs-api; then - glusterfs_fallocate="yes" - glusterfs_zerofill="yes" - fi - cat > $TMPC << EOF -#include - -int -main(void) -{ - /* new glfs_ftruncate() passes two additional args */ - return glfs_ftruncate(NULL, 0, NULL, NULL); -} -EOF - if compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then - glusterfs_ftruncate_has_stat="yes" - fi - cat > $TMPC << EOF -#include - -/* new glfs_io_cbk() passes two additional glfs_stat structs */ -static void -glusterfs_iocb(glfs_fd_t *fd, ssize_t ret, struct glfs_stat *prestat, struct glfs_stat *poststat, void *data) -{} - -int -main(void) -{ - glfs_io_cbk iocb = &glusterfs_iocb; - iocb(NULL, 0 , NULL, NULL, NULL); - return 0; -} -EOF - if compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then - glusterfs_iocb_has_stat="yes" - fi - else - if test "$glusterfs" = "yes" ; then - feature_not_found "GlusterFS backend support" \ - "Install glusterfs-api devel >= 3" - fi - glusterfs="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 @@ -6415,36 +6351,6 @@ if test "$getauxval" = "yes" ; then echo "CONFIG_GETAUXVAL=y" >> $config_host_mak fi -if test "$glusterfs" = "yes" ; then - echo "CONFIG_GLUSTERFS=y" >> $config_host_mak - echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak - echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak -fi - -if test "$glusterfs_xlator_opt" = "yes" ; then - echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak -fi - -if test "$glusterfs_discard" = "yes" ; then - echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak -fi - -if test "$glusterfs_fallocate" = "yes" ; then - echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak -fi - -if test "$glusterfs_zerofill" = "yes" ; then - echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak -fi - -if test "$glusterfs_ftruncate_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak -fi - -if test "$glusterfs_iocb_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak -fi - if test "$libssh" = "yes" ; then echo "CONFIG_LIBSSH=y" >> $config_host_mak echo "LIBSSH_CFLAGS=$libssh_cflags" >> $config_host_mak @@ -6919,7 +6825,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl \ + -Dcurl=$curl -Dglusterfs=$glusterfs \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index 83dbc61acd..409b958a7f 100644 --- a/meson.build +++ b/meson.build @@ -613,9 +613,40 @@ if 'CONFIG_RBD' in config_host rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) endif glusterfs = not_found -if 'CONFIG_GLUSTERFS' in config_host - glusterfs = declare_dependency(compile_args: config_host['GLUSTERFS_CFLAGS'].split(), - link_args: config_host['GLUSTERFS_LIBS'].split()) +glusterfs_ftruncate_has_stat = false +glusterfs_iocb_has_stat = false +if not get_option('glusterfs').auto() or have_block + glusterfs = dependency('glusterfs-api', version: '>=3', + required: get_option('glusterfs'), + method: 'pkg-config', static: enable_static) + if glusterfs.found() + glusterfs_ftruncate_has_stat = cc.links(''' + #include + + int + main(void) + { + /* new glfs_ftruncate() passes two additional args */ + return glfs_ftruncate(NULL, 0, NULL, NULL); + } + ''', dependencies: glusterfs) + glusterfs_iocb_has_stat = cc.links(''' + #include + + /* new glfs_io_cbk() passes two additional glfs_stat structs */ + static void + glusterfs_iocb(glfs_fd_t *fd, ssize_t ret, struct glfs_stat *prestat, struct glfs_stat *poststat, void *data) + {} + + int + main(void) + { + glfs_io_cbk iocb = &glusterfs_iocb; + iocb(NULL, 0 , NULL, NULL, NULL); + return 0; + } + ''', dependencies: glusterfs) + endif endif libssh = not_found if 'CONFIG_LIBSSH' in config_host @@ -876,6 +907,13 @@ config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) +config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found()) +config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().version_compare('>=4')) +config_host_data.set('CONFIG_GLUSTERFS_DISCARD', glusterfs.version().version_compare('>=5')) +config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_compare('>=6')) +config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6')) +config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) +config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2252,7 +2290,7 @@ summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1 summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')} summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')} summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} -summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')} +summary_info += {'GlusterFS support': glusterfs.found()} summary_info += {'gcov': get_option('b_coverage')} summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} diff --git a/meson_options.txt b/meson_options.txt index 2b845ac62b..b5d84bb88b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -46,6 +46,8 @@ option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') +option('glusterfs', type : 'feature', value : 'auto', + description: 'Glusterfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15BB2C4361B for ; Thu, 17 Dec 2020 09:49:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C3B523603 for ; Thu, 17 Dec 2020 09:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C3B523603 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppu8-00058t-GE for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:49:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0004hC-A2 for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:56 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:46000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmH-0007jL-8G for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:54 -0500 Received: by mail-ed1-x531.google.com with SMTP id r5so27902748eda.12 for ; Thu, 17 Dec 2020 01:40:52 -0800 (PST) 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=wuJnGzlfTynxqBYyyMuDb97zZtJ4PvFu/Kx1k6aX2e4=; b=r09c4Z18dGQeRpsexkBC2u9q/L0s5EaI28b+A+2N0/O0sc11FGFgRbYevds8brwbTN 2lqafe+cbJaDJmRcccMefZhI27ADU+NAq6UEvqRbvjvIwenM84tU142cnGp2vS23a/k1 RZQx8fRPafGWbzTyrpMPvJflF1P2OJkPP0s8ydUicPdhbDnmGQjKPdodd/U3IIPNQFTN CrtivhTa3XmShIfIK0ugSmFo7ByyPYRqq0DTaMheSzulBcNz5l1zRd4h74un1PJB/C/7 KqgOackBqRdryhZ17lYVrJjrutf5pLrl0JsJPKzNs5aQ/vfxSjWCRMviJ4eDEHmd5P2W uCjA== 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=wuJnGzlfTynxqBYyyMuDb97zZtJ4PvFu/Kx1k6aX2e4=; b=fCEcKT+mrkGlJFmdBSYTZxUdMtQvVBF+XN5NYBKLmTLRhdogzKMR7Vb66cioU9LkGd KQPWD/zdVKcHopAOd51e37SAM5+nvHcEADfep4BhPBfpR+so7E12TxVXP/4ZSrK2aeHE /ZrB6f77k9BBLiqaY9BqVG+xnVtPSAslowyqtTMb01s9jW8xkwQIFJKANJ98Btq46nWn RcC1YD4u2Bptn4k8U8k2EvVdr09CWLNFcjnTNXsbZHwr/IqSeL3qKcA/K2WhCeT7iytH mGrolpmTroeqGY1kr0dhw8/Xc+P8B5hZ5ColpSWFJYxctQS/YthikAkE/YhNrSqcGEOf JPjQ== X-Gm-Message-State: AOAM53383O6sRynr38EiCphNX6rIjtG4e4LwB8pyQ2aESoqJxX5ZxIXh LJFwCZ78By/lh/KSrpYa2X/0o7SESag= X-Google-Smtp-Source: ABdhPJwEEvOyBeqpZce4Cz9ORbhdjwOq/S2Gxd1/Mpb6uwPEVKq7MwIwP4uYutbvLV7tM0DD2PlaWA== X-Received: by 2002:a05:6402:1696:: with SMTP id a22mr38116889edv.385.1608198051601; Thu, 17 Dec 2020 01:40:51 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/18] bzip2: convert to meson Date: Thu, 17 Dec 2020 10:40:31 +0100 Message-Id: <20201217094044.46462-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x531.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 31 ++++--------------------------- meson.build | 18 +++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/configure b/configure index 5529ac4b32..082ac3bf35 100755 --- a/configure +++ b/configure @@ -396,7 +396,7 @@ avx2_opt="$default_feature" capstone="auto" lzo="$default_feature" snappy="$default_feature" -bzip2="$default_feature" +bzip2="auto" lzfse="$default_feature" zstd="$default_feature" guest_agent="$default_feature" @@ -1320,9 +1320,9 @@ for opt do ;; --enable-snappy) snappy="yes" ;; - --disable-bzip2) bzip2="no" + --disable-bzip2) bzip2="disabled" ;; - --enable-bzip2) bzip2="yes" + --enable-bzip2) bzip2="enabled" ;; --enable-lzfse) lzfse="yes" ;; @@ -2496,24 +2496,6 @@ EOF fi fi -########################################## -# bzip2 check - -if test "$bzip2" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { BZ2_bzlibVersion(); return 0; } -EOF - if compile_prog "" "-lbz2" ; then - bzip2="yes" - else - if test "$bzip2" = "yes"; then - feature_not_found "libbzip2" "Install libbzip2 devel" - fi - bzip2="no" - fi -fi - ########################################## # lzfse check @@ -6238,11 +6220,6 @@ if test "$snappy" = "yes" ; then echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak fi -if test "$bzip2" = "yes" ; then - echo "CONFIG_BZIP2=y" >> $config_host_mak - echo "BZIP2_LIBS=-lbz2" >> $config_host_mak -fi - if test "$lzfse" = "yes" ; then echo "CONFIG_LZFSE=y" >> $config_host_mak echo "LZFSE_LIBS=-llzfse" >> $config_host_mak @@ -6825,7 +6802,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl -Dglusterfs=$glusterfs \ + -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index 409b958a7f..9ba8eecf37 100644 --- a/meson.build +++ b/meson.build @@ -654,8 +654,20 @@ if 'CONFIG_LIBSSH' in config_host link_args: config_host['LIBSSH_LIBS'].split()) endif libbzip2 = not_found -if 'CONFIG_BZIP2' in config_host - libbzip2 = declare_dependency(link_args: config_host['BZIP2_LIBS'].split()) +if not get_option('bzip2').auto() or have_block + libbzip2 = cc.find_library('bz2', has_headers: ['bzlib.h'], + required: get_option('bzip2'), + static: enable_static) + if libbzip2.found() and not cc.links(''' + #include + int main(void) { BZ2_bzlibVersion(); return 0; }''', dependencies: libbzip2) + libbzip2 = not_found + if get_option('bzip2').enabled() + error('could not link libbzip2') + else + warning('could not link libbzip2, disabling') + endif + endif endif liblzfse = not_found if 'CONFIG_LZFSE' in config_host @@ -2298,7 +2310,7 @@ summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} -summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')} +summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} diff --git a/meson_options.txt b/meson_options.txt index b5d84bb88b..fd16f3b399 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -42,6 +42,8 @@ option('cfi_debug', type: 'boolean', value: 'false', option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') +option('bzip2', type : 'feature', value : 'auto', + description: 'bzip2 support for DMG images') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA67C4361B for ; Thu, 17 Dec 2020 09:56:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA54F23603 for ; Thu, 17 Dec 2020 09:56:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA54F23603 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpq0u-0003jJ-Lp for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:56:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmL-0004hu-8i for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:57 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:36200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0007jP-2d for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:56 -0500 Received: by mail-ej1-x62e.google.com with SMTP id lt17so36921818ejb.3 for ; Thu, 17 Dec 2020 01:40:53 -0800 (PST) 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=n+k02eQPc3Z36SK8b+IVbI3aA4JuoAfer7tExcXmHEY=; b=S0n89i0J9rIPSaLGzBCSSkUx5XdOPmgJQwGPQ1+VmRtYm72CgqaHlLladSf6x+VxoR yUOJBhA8/MvdgP6pUTJqPEMe18y6GTsAtnv6pIs+UwpVDtjujwLSdmJUc1KF4LZxEpF2 7VcIICvUNh+iB3YgE8zklgdvNaUADwGeDGzW76cBDE9J5pQ4GfiW54lohNfn5OxICw0k vdZ8xTkrIOS9FYQJZ62oAUAq5YlhBJe2ZOGjWkO5PjyIp45ElgnX0fsUuqCq42PL2VHX lJ2Y0FAKQKx/xrsVUv8xhsAAcSA7xaoqrox/fdpifkewtMZhN7etQpl5Adsu5qhubvJe 1yBg== 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=n+k02eQPc3Z36SK8b+IVbI3aA4JuoAfer7tExcXmHEY=; b=rdLhnD1R4ISk3DYTA+E5qmxLySeqKGNQKgNAUg/78RNcT0RyiNJFGzlAlqeMwjuMrS WpnaJkcHxp4TByGfoDOaLDLuqG78Eis0Nmg+YnmrcHwWn1H8c4lbuJLw67PNiKKgpXta qutEHy6GnqdKl4lbwSGwfR0xts2Q10ePd+EzMYxMcsCa6/RaXLnLHKtzGAhXLu1h8lNm muYP/dUau5aVoG9/uZ/ha4Q76FUv32tM4ZwaWRhVMlKPLfJ/CWnzdOea6q4l6cPrwIkZ MTtj6ebz1iopg6LU3zBTQVTiZUOnZPbwpXUvRd1DT/9BuZbg7EVDChDYamvd1rg6j3gk TJEw== X-Gm-Message-State: AOAM532b2sHMUVtkcCz0JUGxCLI0Lf7CbZ0k35HPSLaf8jPe7W6xGMee bMCLI9H5I64WhHl1za00kOT5A02C/ks= X-Google-Smtp-Source: ABdhPJwG2DnN8MgaP2TKIg9e2KkUbMYpdHrGGAit5c9TrdLpcU6X1hKk1XC2xme3cywxyQC497vbdA== X-Received: by 2002:a17:906:6c94:: with SMTP id s20mr14016129ejr.0.1608198052464; Thu, 17 Dec 2020 01:40:52 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/18] libiscsi: convert to meson Date: Thu, 17 Dec 2020 10:40:32 +0100 Message-Id: <20201217094044.46462-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62e.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- block/meson.build | 2 +- configure | 29 ++++------------------------- contrib/vhost-user-scsi/meson.build | 2 +- meson.build | 10 ++++++---- meson_options.txt | 2 ++ 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/block/meson.build b/block/meson.build index b02cb14aad..134034abb4 100644 --- a/block/meson.build +++ b/block/meson.build @@ -59,7 +59,7 @@ block_ss.add(when: 'CONFIG_QED', if_true: files( block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallels.c')) block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c')) block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit]) -block_ss.add(when: 'CONFIG_LIBISCSI', if_true: files('iscsi-opts.c')) +block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c')) diff --git a/configure b/configure index 082ac3bf35..e22c56e8f6 100755 --- a/configure +++ b/configure @@ -406,7 +406,7 @@ guest_agent_msi="$default_feature" vss_win32_sdk="$default_feature" win_sdk="no" want_tools="$default_feature" -libiscsi="$default_feature" +libiscsi="auto" libnfs="$default_feature" coroutine="" coroutine_pool="$default_feature" @@ -1139,9 +1139,9 @@ for opt do ;; --enable-spice) spice="yes" ;; - --disable-libiscsi) libiscsi="no" + --disable-libiscsi) libiscsi="disabled" ;; - --enable-libiscsi) libiscsi="yes" + --enable-libiscsi) libiscsi="enabled" ;; --disable-libnfs) libnfs="no" ;; @@ -4315,21 +4315,6 @@ if compile_prog "" "" ; then bswap_h=yes fi -########################################## -# Do we have libiscsi >= 1.9.0 -if test "$libiscsi" != "no" ; then - if $pkg_config --atleast-version=1.9.0 libiscsi; then - libiscsi="yes" - libiscsi_cflags=$($pkg_config --cflags libiscsi) - libiscsi_libs=$($pkg_config --libs libiscsi) - else - if test "$libiscsi" = "yes" ; then - feature_not_found "libiscsi" "Install libiscsi >= 1.9.0" - fi - libiscsi="no" - fi -fi - ########################################## # Do we need librt # uClibc provides 2 versions of clock_gettime(), one with realtime @@ -6231,12 +6216,6 @@ if test "$zstd" = "yes" ; then echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi -if test "$libiscsi" = "yes" ; then - echo "CONFIG_LIBISCSI=y" >> $config_host_mak - echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak - echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak -fi - if test "$libnfs" = "yes" ; then echo "CONFIG_LIBNFS=y" >> $config_host_mak echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak @@ -6802,7 +6781,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 \ + -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/contrib/vhost-user-scsi/meson.build b/contrib/vhost-user-scsi/meson.build index 044c50bf43..cc893f6f20 100644 --- a/contrib/vhost-user-scsi/meson.build +++ b/contrib/vhost-user-scsi/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_LIBISCSI' in config_host +if libiscsi.found() executable('vhost-user-scsi', files('vhost-user-scsi.c'), dependencies: [qemuutil, libiscsi, vhost_user], build_by_default: targetos == 'linux', diff --git a/meson.build b/meson.build index 9ba8eecf37..3f53a7f1b2 100644 --- a/meson.build +++ b/meson.build @@ -372,9 +372,10 @@ if 'CONFIG_PLUGIN' in config_host libdl = cc.find_library('dl', required: true) endif libiscsi = not_found -if 'CONFIG_LIBISCSI' in config_host - libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), - link_args: config_host['LIBISCSI_LIBS'].split()) +if not get_option('libiscsi').auto() or have_block + libiscsi = dependency('libiscsi', version: '>=1.9.0', + required: get_option('libiscsi'), + method: 'pkg-config', static: enable_static) endif zstd = not_found if 'CONFIG_ZSTD' in config_host @@ -926,6 +927,7 @@ config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_c config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6')) config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) +config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2283,7 +2285,7 @@ summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')} summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} -summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')} +summary_info += {'libiscsi support': libiscsi.found()} summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} if targetos == 'windows' diff --git a/meson_options.txt b/meson_options.txt index fd16f3b399..b562d4f1a6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,6 +50,8 @@ option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') +option('libiscsi', type : 'feature', value : 'auto', + description: 'libiscsi userspace initiator') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CBDAC4361B for ; Thu, 17 Dec 2020 09:52:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4FB2233FB for ; Thu, 17 Dec 2020 09:52:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4FB2233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppxg-0000Bz-Gw for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:52:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmL-0004hr-7t for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:57 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:43533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0007jX-30 for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:40:56 -0500 Received: by mail-ed1-x52f.google.com with SMTP id q16so27921776edv.10 for ; Thu, 17 Dec 2020 01:40:54 -0800 (PST) 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=askZ63rhvBcn5/LKEeuQq1hjhGHYv5aruqKs/lccbAg=; b=U2W571SAvHdbXt0OY/hD9mJ+dvD9P7lxctOXAjrxudkwlOq9v3SQsqa0qAQzJmp603 viDSkU7qiV7hgNhe7vAl5KAdwK2HDravAHFrTBMt7orclKEgdTUiqAm7TtqLeOEjTFfS 0NIHYyRZ9s60nAtH3Wy9YNOcHRQSGl7DNFKg7J8pIm20YaIbMkEx+vn6Hqq2RNgGP6gF 2GnYy6cbAIg6pe6uKYPGYuRmLcapwefsmUo9o7E12LESXmN7Sf4FucZRHozkGYJaqPFe zAk+dhHF0G9k0gewe6XIiAb6Aqc89rfy9j/bw/1ki+ChsxA26NUXsAUhO9CMSPOGBEWK 8Q9w== 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=askZ63rhvBcn5/LKEeuQq1hjhGHYv5aruqKs/lccbAg=; b=Er4GP8Qn8m6Z0wFlOxecJ97hf7yPsNJGzVpV3YQDZn9d3xBW8PRFJcmPgYLW2MozmP bSuy4jgVBH7Czv5u6+jHoOhKPOIY+uNa+i1vEE9RWrsWcjP9Pyuag0D2YkOM7FYz7pPQ IXsHQCmXyCgi0LCGxCNbOLPC0AU1P2WxFNGpC4GJdmZ8s+1ucQWhw7rNJJtqrlEKj+Jc 5OF/9EtQSNWk5RlgMOkxv2Rp+v0W2R7869251zlMDjCNqawt7lN/DF2qDrCb8yAUh8cd p5jjnfRTZw8P4jP4A1jHIC52t0vDViPuuJsnshZl6/Js7eFqMB+VjK0svnE1wMXZL6KM gN0g== X-Gm-Message-State: AOAM533kEhoq/PRnHQUi6EEBcn7W2b8gd1yjoIVNgo6SNZy7pBOmV9UU xUwgUCgqwrK3tJz7TQBJOzdcGncnFAQ= X-Google-Smtp-Source: ABdhPJxRw2WsRNFM/9UzuGq8KNFlLnvk47xzlQ74hOF9NMuHNwbD3J5W6ODRjI6Y+Lzu+37IqVaDww== X-Received: by 2002:aa7:dacf:: with SMTP id x15mr37213768eds.134.1608198053304; Thu, 17 Dec 2020 01:40:53 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:52 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/18] libnfs: convert to meson Date: Thu, 17 Dec 2020 10:40:33 +0100 Message-Id: <20201217094044.46462-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 27 ++++----------------------- meson.build | 9 ++++++--- meson_options.txt | 2 ++ 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/configure b/configure index e22c56e8f6..c404252b17 100755 --- a/configure +++ b/configure @@ -407,7 +407,7 @@ vss_win32_sdk="$default_feature" win_sdk="no" want_tools="$default_feature" libiscsi="auto" -libnfs="$default_feature" +libnfs="auto" coroutine="" coroutine_pool="$default_feature" debug_stack_usage="no" @@ -1143,9 +1143,9 @@ for opt do ;; --enable-libiscsi) libiscsi="enabled" ;; - --disable-libnfs) libnfs="no" + --disable-libnfs) libnfs="disabled" ;; - --enable-libnfs) libnfs="yes" + --enable-libnfs) libnfs="enabled" ;; --enable-profiler) profiler="yes" ;; @@ -5561,20 +5561,6 @@ if test "$have_ubsan" = "yes"; then QEMU_LDFLAGS="-fsanitize=undefined $QEMU_LDFLAGS" fi -########################################## -# Do we have libnfs -if test "$libnfs" != "no" ; then - if $pkg_config --atleast-version=1.9.3 libnfs; then - libnfs="yes" - libnfs_libs=$($pkg_config --libs libnfs) - else - if test "$libnfs" = "yes" ; then - feature_not_found "libnfs" "Install libnfs devel >= 1.9.3" - fi - libnfs="no" - fi -fi - ########################################## # Exclude --warn-common with TSan to suppress warnings from the TSan libraries. @@ -6216,11 +6202,6 @@ if test "$zstd" = "yes" ; then echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi -if test "$libnfs" = "yes" ; then - echo "CONFIG_LIBNFS=y" >> $config_host_mak - echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak -fi - if test "$seccomp" = "yes"; then echo "CONFIG_SECCOMP=y" >> $config_host_mak echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak @@ -6782,7 +6763,7 @@ NINJA=$ninja $meson setup \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ - -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ + -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 3f53a7f1b2..0b8c9c5917 100644 --- a/meson.build +++ b/meson.build @@ -319,8 +319,10 @@ if 'CONFIG_LIBXML2' in config_host link_args: config_host['LIBXML2_LIBS'].split()) endif libnfs = not_found -if 'CONFIG_LIBNFS' in config_host - libnfs = declare_dependency(link_args: config_host['LIBNFS_LIBS'].split()) +if not get_option('libnfs').auto() or have_block + libnfs = dependency('libnfs', version: '>=1.9.3', + required: get_option('libnfs'), + method: 'pkg-config', static: enable_static) endif libattr = not_found if 'CONFIG_ATTR' in config_host @@ -928,6 +930,7 @@ config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_co config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) +config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2286,7 +2289,7 @@ summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} summary_info += {'libiscsi support': libiscsi.found()} -summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} +summary_info += {'libnfs support': libnfs.found()} summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} if targetos == 'windows' if 'WIN_SDK' in config_host diff --git a/meson_options.txt b/meson_options.txt index b562d4f1a6..4535bc4dc2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,6 +52,8 @@ option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') option('libiscsi', type : 'feature', value : 'auto', description: 'libiscsi userspace initiator') +option('libnfs', type : 'feature', value : 'auto', + description: 'libnfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA56DC4361B for ; Thu, 17 Dec 2020 10:04:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F415E23715 for ; Thu, 17 Dec 2020 10:04:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F415E23715 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpq8g-0002IS-OR for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 05:04:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmY-0004wi-N1 for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:36965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmJ-0007jh-Gt for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:09 -0500 Received: by mail-ej1-x62d.google.com with SMTP id ga15so36892389ejb.4 for ; Thu, 17 Dec 2020 01:40:55 -0800 (PST) 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=qHUlVj/D5xv+plQtQIg0kY8a748yvyAJDUx9FuuVB8Q=; b=qseMN4N3EuH2jV+5+KOHwhHkiL6Xnjrj5B7Q5ehWa/jRQeJ6lBSFxz79zwQE7j15sq 4fxN49Je6fXNaRcrVCYbpUIGhGBMO7sr9KeknAg0RwX8lRwD9Y/I5SEqFRVuk8EH+LCP hbZxuJYl7nTYg0n+uWqcYeLk5yyOS8FGnwd4eqkDeAyBuAqQbla808zya6k6SYzMtCWP 8PgoR0Zx+h3DuCNZ0fIOSMzlfBq5ixwp5KAhqY6O0GaYEb8JcKHbaWospvwFzAPHHN3E ogiMZLzqxGNYMkpZsU90WiNpn2dg3Q6MPDhPNu2Ee9sgzmw0+zNem4O9YYBKn/odYYT/ 2hWQ== 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=qHUlVj/D5xv+plQtQIg0kY8a748yvyAJDUx9FuuVB8Q=; b=RyAKssaZv2tHxA3g7Fx0W7T39F5q2GeE6s2wFqjft75DbpJidsueadYzjrm+QJz8lz PBaECSzxkVsVdvwr9WHk9LKQ0QhhVF8mKV5Q/iZM+wUVxa9hBWI1K25DXQWqxmsLyuzp PajaHRL8ieclvkwFz7Txu2HjRTPuOi9hJnMX5GwsYd6xIP+536ztRo7rZZ9qmXmFCyfk MJuTxCVP8lRAlHVhha3ul2gTBOpCiYxPUTSOAduXn3FA4i9jKfOkVB5SQd+l5DEoCJQ6 WIUMlxw7V34BqqhOy1D9Rbs5Bcoh9zoGrIXfb6wo8P+qL2M1ot6Es0+xmNJ1KORKgEEc 71bw== X-Gm-Message-State: AOAM531Tyi17u3jjyv4NPfvtTp3ZSq7/UgRi8T4XpRzpXxz/PVEPZFpG HRPr3myPEi8f96ZSYO7ZJTTYTJtecTw= X-Google-Smtp-Source: ABdhPJxnUAXNK9QOT1AS/bWpwYDbd6U+b/gveIPQGjkgdgkueWwjIjK0pIawroXiU2wrlv077lOF3g== X-Received: by 2002:a17:906:3999:: with SMTP id h25mr20659867eje.146.1608198054164; Thu, 17 Dec 2020 01:40:54 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/18] libssh: convert to meson Date: Thu, 17 Dec 2020 10:40:34 +0100 Message-Id: <20201217094044.46462-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 45 ++++----------------------------------------- meson.build | 18 ++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 20 insertions(+), 45 deletions(-) diff --git a/configure b/configure index c404252b17..f3271381f1 100755 --- a/configure +++ b/configure @@ -430,7 +430,7 @@ auth_pam="$default_feature" vte="$default_feature" virglrenderer="$default_feature" tpm="$default_feature" -libssh="$default_feature" +libssh="auto" live_block_migration=${default_feature:-yes} numa="$default_feature" tcmalloc="no" @@ -1424,9 +1424,9 @@ for opt do ;; --enable-tpm) tpm="yes" ;; - --disable-libssh) libssh="no" + --disable-libssh) libssh="disabled" ;; - --enable-libssh) libssh="yes" + --enable-libssh) libssh="enabled" ;; --disable-live-block-migration) live_block_migration="no" ;; @@ -3630,38 +3630,6 @@ EOF fi fi -########################################## -# libssh probe -if test "$libssh" != "no" ; then - if $pkg_config --exists libssh; then - libssh_cflags=$($pkg_config libssh --cflags) - libssh_libs=$($pkg_config libssh --libs) - libssh=yes - else - if test "$libssh" = "yes" ; then - error_exit "libssh required for --enable-libssh" - fi - libssh=no - fi -fi - -########################################## -# Check for libssh 0.8 -# This is done like this instead of using the LIBSSH_VERSION_* and -# SSH_VERSION_* macros because some distributions in the past shipped -# snapshots of the future 0.8 from Git, and those snapshots did not -# have updated version numbers (still referring to 0.7.0). - -if test "$libssh" = "yes"; then - cat > $TMPC < -int main(void) { return ssh_get_server_publickey(NULL, NULL); } -EOF - if compile_prog "$libssh_cflags" "$libssh_libs"; then - libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags" - fi -fi - ########################################## # linux-aio probe @@ -6288,12 +6256,6 @@ if test "$getauxval" = "yes" ; then echo "CONFIG_GETAUXVAL=y" >> $config_host_mak fi -if test "$libssh" = "yes" ; then - echo "CONFIG_LIBSSH=y" >> $config_host_mak - echo "LIBSSH_CFLAGS=$libssh_cflags" >> $config_host_mak - echo "LIBSSH_LIBS=$libssh_libs" >> $config_host_mak -fi - if test "$live_block_migration" = "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak fi @@ -6764,6 +6726,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ + -Dlibssh=$libssh \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 0b8c9c5917..2d6660aa46 100644 --- a/meson.build +++ b/meson.build @@ -652,9 +652,17 @@ if not get_option('glusterfs').auto() or have_block endif endif libssh = not_found -if 'CONFIG_LIBSSH' in config_host - libssh = declare_dependency(compile_args: config_host['LIBSSH_CFLAGS'].split(), - link_args: config_host['LIBSSH_LIBS'].split()) +have_libssh_0_8 = false +if not get_option('libssh').auto() or have_block + libssh = dependency('libssh', + required: get_option('libssh'), + method: 'pkg-config', static: enable_static) + if libssh.found() + have_libssh_0_8 = cc.links(''' + #include + int main(void) { return ssh_get_server_publickey(NULL, NULL); } + ''', dependencies: libssh) + endif endif libbzip2 = not_found if not get_option('bzip2').auto() or have_block @@ -931,6 +939,8 @@ config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_ config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) +config_host_data.set('CONFIG_LIBSSH', libssh.found()) +config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2310,7 +2320,7 @@ summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} summary_info += {'GlusterFS support': glusterfs.found()} summary_info += {'gcov': get_option('b_coverage')} summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} -summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} +summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} diff --git a/meson_options.txt b/meson_options.txt index 4535bc4dc2..6466dc67f6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -54,6 +54,8 @@ option('libiscsi', type : 'feature', value : 'auto', description: 'libiscsi userspace initiator') option('libnfs', type : 'feature', value : 'auto', description: 'libnfs block device driver') +option('libssh', type : 'feature', value : 'auto', + description: 'libssh block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C19AC4361B for ; Thu, 17 Dec 2020 09:47:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D65F8233FB for ; Thu, 17 Dec 2020 09:47:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D65F8233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppt4-00043T-KQ for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:47:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmY-0004wp-BD for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:33842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmK-0007jt-8X for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: by mail-ej1-x636.google.com with SMTP id g20so36942627ejb.1 for ; Thu, 17 Dec 2020 01:40:55 -0800 (PST) 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=ed2gqJphg3Tl6K+vVMJ7D7AAx0eSWTNxNjJBcE2fDoY=; b=cO/5NPcaFez+ivVWzvxMNgFjXJppfc7MmHftFS/y5pdlp/mfYdMdA1hpEKKicmwYRh gxJ5Ujh4w8PJcItTCd4j2/Fe4mtv6GBrwevz27drlAPQU1jhmxK9BFuSARrqrCWSVJad rdixoP3oDxdNHKTFmKuQu+6k6vikRjyUoJRZGLd1IOPYGAPeSiJiDUDXOEmQAMeU4sQi z10P1dKRWZJPtjO2GDimEcpijpHBMQUVEBnsr/rm/0/zbVCXJO8TEcHvHyVEEbiDK4Cp 4hBmIA51526ej7x/p0FjR8ST1bVqHXOhhjeHJexG1iHZbuhE7tPcy4y/BjmNipHrPvD0 Er1A== 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=ed2gqJphg3Tl6K+vVMJ7D7AAx0eSWTNxNjJBcE2fDoY=; b=qgp6Mpf/f2sDuG7FTJDCeBL7qnODlAatC+BlLkqnP8nypowTGBCfII+ks9bGLsdHRz fWcRb/qtFKklY64Vhep9P/InjQwkUBvFN/Ex6+rCgIASeZqBH5Q+LWEBS+cXo/QmKQfX AIr6d+bcYDp6qi2zIUVMaSflQxQ2a5ThYJtbdRZ+sqNEkmn/QqKqlm4c5tdjRUMU+4Ra 7HWU5fcyku2NfSHGCCTRZFSvbfAkznTGSkncCJyuBjdkCPfS0TWg/h4ixCojdgfiu7NY 4tVxRvvabpcjjBOQvYMxcXiP0LCq8T66FPoNODan4FfoQvksbq49HBXLVOsbCFP+xCBx Bwkg== X-Gm-Message-State: AOAM532XaZvw/aoijgnMEE+J+JgD025iJT9y7HroEuh3apomfaEEYeEF xmJ7Pr68KXhoBqtdPXNQkAt7YCWLPT0= X-Google-Smtp-Source: ABdhPJzuWnxaRp3SKWX6SPY5EWYLwSJjMWVvkVuPH7gE8FZWjVX2pD5zYwMTQ1fT4TXi6U3HEA0NBg== X-Received: by 2002:a17:906:3711:: with SMTP id d17mr10232769ejc.121.1608198055004; Thu, 17 Dec 2020 01:40:55 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:54 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/18] rbd: convert to meson Date: Thu, 17 Dec 2020 10:40:35 +0100 Message-Id: <20201217094044.46462-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x636.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 35 ++++------------------------------- meson.build | 22 +++++++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/configure b/configure index f3271381f1..e34885d505 100755 --- a/configure +++ b/configure @@ -384,7 +384,7 @@ qom_cast_debug="yes" trace_backends="log" trace_file="trace" spice="$default_feature" -rbd="$default_feature" +rbd="auto" smartcard="$default_feature" u2f="auto" libusb="$default_feature" @@ -1286,9 +1286,9 @@ for opt do ;; --enable-opengl) opengl="yes" ;; - --disable-rbd) rbd="no" + --disable-rbd) rbd="disabled" ;; - --enable-rbd) rbd="yes" + --enable-rbd) rbd="enabled" ;; --disable-xfsctl) xfs="no" ;; @@ -3607,29 +3607,6 @@ if compile_prog "" "$pthread_lib" ; then pthread_setname_np_wo_tid=yes fi -########################################## -# rbd probe -if test "$rbd" != "no" ; then - cat > $TMPC < -#include -int main(void) { - rados_t cluster; - rados_create(&cluster, NULL); - return 0; -} -EOF - rbd_libs="-lrbd -lrados" - if compile_prog "" "$rbd_libs" ; then - rbd=yes - else - if test "$rbd" = "yes" ; then - feature_not_found "rados block device" "Install librbd/ceph devel" - fi - rbd=no - fi -fi - ########################################## # linux-aio probe @@ -6184,10 +6161,6 @@ fi if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi -if test "$rbd" = "yes" ; then - echo "CONFIG_RBD=y" >> $config_host_mak - echo "RBD_LIBS=$rbd_libs" >> $config_host_mak -fi echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak if test "$coroutine_pool" = "yes" ; then @@ -6726,7 +6699,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh \ + -Dlibssh=$libssh -Drbd=$rbd \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 2d6660aa46..6fa80e2d7e 100644 --- a/meson.build +++ b/meson.build @@ -612,9 +612,24 @@ else endif rbd = not_found -if 'CONFIG_RBD' in config_host - rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) +if not get_option('rbd').auto() or have_block + librados = cc.find_library('rados', required: get_option('rbd'), + static: enable_static) + librbd = cc.find_library('rbd', has_headers: ['rbd/librbd.h'], + required: get_option('rbd'), + static: enable_static) + if librados.found() and librbd.found() and cc.links(''' + #include + #include + int main(void) { + rados_t cluster; + rados_create(&cluster, NULL); + return 0; + }''', dependencies: [librbd, librados]) + rbd = declare_dependency(dependencies: [librbd, librados]) + endif endif + glusterfs = not_found glusterfs_ftruncate_has_stat = false glusterfs_iocb_has_stat = false @@ -941,6 +956,7 @@ config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_LIBSSH', libssh.found()) config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) +config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2290,7 +2306,7 @@ if config_host['TRACE_BACKENDS'].split().contains('simple') endif # TODO: add back protocol and server version summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')} -summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')} +summary_info += {'rbd support': rbd.found()} summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')} summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')} summary_info += {'U2F support': u2f.found()} diff --git a/meson_options.txt b/meson_options.txt index 6466dc67f6..630c9dceb7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('rbd', type : 'feature', value : 'auto', + description: 'Ceph block device driver') option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B248DC4361B for ; Thu, 17 Dec 2020 09:46:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B47E233FB for ; Thu, 17 Dec 2020 09:46:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B47E233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppre-0002xv-50 for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:46:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmP-0004pV-4D for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:01 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:35490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmL-0007kg-2z for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:00 -0500 Received: by mail-ed1-x52a.google.com with SMTP id u19so27970675edx.2 for ; Thu, 17 Dec 2020 01:40:56 -0800 (PST) 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=Sdm9DJbEOk14KqxbRA3HA1LywARm1ZJ32EVNtckhfz8=; b=m+UfQ79IlcrDNErYwpXuBrl77U24ism9S6nqs27rASpuj8IESN2PY6p0rP1M3DHaqh bD026oauWli9nUIPe62YQxCPVWAabjBfA7RUd6wRCwxkGBdLymUPp51Wq6Hryk6zrPI3 jZFa/EfnsnXk/GLq9BbSJrYOJktEGBiVZFVnOm2FmcC7VUsl9ZXABbNm9NPEvQOjAmwS Y1lsOOMeD8XWjO1TErtxv+B238pPrBLvzy72++jSihZK9IPi9yz9XQDzHjPZRWbdkJdb Iq6YGvwwy2ZqkUpWqXya0686CpznmjNxYhuG1MrnsOX4H4nmxZE2AcaANgDq2FW5ZlSS Goqw== 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=Sdm9DJbEOk14KqxbRA3HA1LywARm1ZJ32EVNtckhfz8=; b=j3I1OA4JmN5TLYJIx00j8BQh3AyJNSZSUG9wy5LsBChkA3hiCFZ9HpnWVV0LcX4uBB 0itTJTz/YH9EnqacFzZ6q4N5r+Zb/ZOWMz8sZJP0pxB3Hzny77rKCSGiFjmt8TjgPLf6 mbovGRf4X82rQXAM8q91LdIgtPfj+QZibtRX4h4ae6A85R0Jj28/frFprRS6nV8AQNlD inq3hoUkJ51hk9eXIsU5CmP8GyWCZo4TGj0bbLgLuyjTTtCgDVYsEM1FkqE45CNUpegZ rit179V5xoJs3VA6Jfjf4dmI1PnYYlxgVB+Pm80filbhJ93cRnswceXskEy+HpfJ14j9 MiuA== X-Gm-Message-State: AOAM530XOnuaVVGfNcqEZKTq4PM4DdB5rytUlcgUBWzsV8AE2pkVF2VQ bENfX0tKBjKOL+ROlYk6aRQwheehE/U= X-Google-Smtp-Source: ABdhPJwChW+AeWZs5P9aLka62EsppZ4N22Hh9zARiJYPZGeObb91GPH34ItTcTjIQ8InGc7mMyt3HQ== X-Received: by 2002:a50:ab51:: with SMTP id t17mr38153062edc.89.1608198055827; Thu, 17 Dec 2020 01:40:55 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/18] lzo: convert to meson Date: Thu, 17 Dec 2020 10:40:36 +0100 Message-Id: <20201217094044.46462-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 32 ++++---------------------------- meson.build | 20 ++++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/configure b/configure index e34885d505..f52f04d0e3 100755 --- a/configure +++ b/configure @@ -394,7 +394,7 @@ opengl_dmabuf="no" cpuid_h="no" avx2_opt="$default_feature" capstone="auto" -lzo="$default_feature" +lzo="auto" snappy="$default_feature" bzip2="auto" lzfse="$default_feature" @@ -1312,9 +1312,9 @@ for opt do ;; --disable-zlib-test) ;; - --disable-lzo) lzo="no" + --disable-lzo) lzo="disabled" ;; - --enable-lzo) lzo="yes" + --enable-lzo) lzo="enabled" ;; --disable-snappy) snappy="no" ;; @@ -2458,25 +2458,6 @@ EOF fi fi -########################################## -# lzo check - -if test "$lzo" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { lzo_version(); return 0; } -EOF - if compile_prog "" "-llzo2" ; then - lzo_libs="-llzo2" - lzo="yes" - else - if test "$lzo" = "yes"; then - feature_not_found "liblzo2" "Install liblzo2 devel" - fi - lzo="no" - fi -fi - ########################################## # snappy check @@ -6126,11 +6107,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$lzo" = "yes" ; then - echo "CONFIG_LZO=y" >> $config_host_mak - echo "LZO_LIBS=$lzo_libs" >> $config_host_mak -fi - if test "$snappy" = "yes" ; then echo "CONFIG_SNAPPY=y" >> $config_host_mak echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak @@ -6699,7 +6675,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 6fa80e2d7e..0310d6d89a 100644 --- a/meson.build +++ b/meson.build @@ -753,10 +753,21 @@ snappy = not_found if 'CONFIG_SNAPPY' in config_host snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) endif -lzo = not_found -if 'CONFIG_LZO' in config_host - lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split()) + +lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], + required: get_option('lzo'), + static: enable_static) +if lzo.found() and not cc.links(''' + #include + int main(void) { lzo_version(); return 0; }''', dependencies: lzo) + lzo = not_found + if get_option('lzo').enabled() + error('could not link liblzo2') + else + warning('could not link liblzo2, disabling') + endif endif + rdma = not_found if 'CONFIG_RDMA' in config_host rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) @@ -941,6 +952,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_opti config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) +config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) @@ -2339,7 +2351,7 @@ summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} -summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} +summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} diff --git a/meson_options.txt b/meson_options.txt index 630c9dceb7..00a5ec55bd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('lzo', type : 'feature', value : 'auto', + description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', description: 'Ceph block device driver') option('sdl', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F243FC2BB9A for ; Thu, 17 Dec 2020 09:46:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 909F3233FB for ; Thu, 17 Dec 2020 09:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 909F3233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpprV-0002aI-Gn for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:46:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmR-0004rp-HQ for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:04 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:43035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmL-0007kr-Tu for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:03 -0500 Received: by mail-ej1-x62b.google.com with SMTP id jx16so36893653ejb.10 for ; Thu, 17 Dec 2020 01:40:57 -0800 (PST) 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=PWW3yyZ9XoYXeO9VbTn/wnx0HTEWAUTSGBeXZtoTkcs=; b=iGNWJy42fGFyj+iyd1b8FADemgMSE1AOcYE21zmKIzwFZoFmTWv2tn9HVYLTf2GIy7 77NuGHmVXSrRowVxJzAdyDchwCHfyrRwPvt378fT8/+LsCpujuaDJWLm/CHGr6BMFqii t1c58Ov5Tw7zL83c8Bq7GtLI0azV9Xsmd95mmkm3lKNav1FZ9rJ0I8MLkXnTwlJ6vN9y IT7cvLURvEvPesHrKJDElM3nULZ1FDsZeSuqf1h4wIV/7uPwMJSgkCDxxg99N7iezhU+ 2S34I0zxtERyc3OZH5HRuN2/RXPbhIBWvdyH/+Jt1lJQkygsr7D9mfIW3nkz+Yl+wXyi MWdw== 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=PWW3yyZ9XoYXeO9VbTn/wnx0HTEWAUTSGBeXZtoTkcs=; b=HqQxOgqmtnKJ7006iVYEaIPsYAK9H195g/9MkYSh+tnMjlN5TDbiwwFZ3CQJENswgQ QvvUK/9HhREHYOd6JMaJh0hBaadMcKRR9xoHAxe3pLvNVJPjJ8xzsfokXc9RqrIsVO16 lVyJerBg3hQw4ktSz8/7ZYLNIBT1Em+xWePSZd8pBIajcpaEkMl+Olhig7Y/X4zAFwmy 8Glyqzz3cRi7BeW/GBGORmgTZN9vceQoCUwIJ4dWIugEPvxoCK0OKu08PhUvJRTKnxfx 8PC7C0Ux/1KbIpIg1V/Tlrz/pBdFytqRrSY1HGeT/QXx5hHCkO1QSKW/QRCCWxhqy6IH /VAw== X-Gm-Message-State: AOAM532pjTD/djmIzWyXHjS+DlPHce2do9nAIO5J2/qiII7p+j7haP+4 YRKIIyJ2La4xHE6kHgtVX2tD7Qxav1U= X-Google-Smtp-Source: ABdhPJym822Up/pvRliNMRsw4QdPBrIToVwdtDwDoz5Xhi/yOSQjOVs6hfTwCsGbA+pEfN0b5IBmTg== X-Received: by 2002:a17:906:af83:: with SMTP id mj3mr14087169ejb.243.1608198056614; Thu, 17 Dec 2020 01:40:56 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/18] snappy: convert to meson Date: Thu, 17 Dec 2020 10:40:37 +0100 Message-Id: <20201217094044.46462-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62b.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 32 ++++---------------------------- meson.build | 19 +++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/configure b/configure index f52f04d0e3..aee27d9cdd 100755 --- a/configure +++ b/configure @@ -395,7 +395,7 @@ cpuid_h="no" avx2_opt="$default_feature" capstone="auto" lzo="auto" -snappy="$default_feature" +snappy="auto" bzip2="auto" lzfse="$default_feature" zstd="$default_feature" @@ -1316,9 +1316,9 @@ for opt do ;; --enable-lzo) lzo="enabled" ;; - --disable-snappy) snappy="no" + --disable-snappy) snappy="disabled" ;; - --enable-snappy) snappy="yes" + --enable-snappy) snappy="enabled" ;; --disable-bzip2) bzip2="disabled" ;; @@ -2458,25 +2458,6 @@ EOF fi fi -########################################## -# snappy check - -if test "$snappy" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { snappy_max_compressed_length(4096); return 0; } -EOF - if compile_prog "" "-lsnappy" ; then - snappy_libs='-lsnappy' - snappy="yes" - else - if test "$snappy" = "yes"; then - feature_not_found "libsnappy" "Install libsnappy devel" - fi - snappy="no" - fi -fi - ########################################## # lzfse check @@ -6107,11 +6088,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$snappy" = "yes" ; then - echo "CONFIG_SNAPPY=y" >> $config_host_mak - echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak -fi - if test "$lzfse" = "yes" ; then echo "CONFIG_LZFSE=y" >> $config_host_mak echo "LZFSE_LIBS=-llzfse" >> $config_host_mak @@ -6675,7 +6651,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 0310d6d89a..9f6ea65626 100644 --- a/meson.build +++ b/meson.build @@ -749,9 +749,19 @@ if get_option('vnc').enabled() compile_args: '-DSTRUCT_IOVEC_DEFINED') endif endif -snappy = not_found -if 'CONFIG_SNAPPY' in config_host - snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) + +snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'], + required: get_option('snappy'), + static: enable_static) +if snappy.found() and not cc.links(''' + #include + int main(void) { snappy_max_compressed_length(4096); return 0; }''', dependencies: snappy) + snappy = not_found + if get_option('snappy').enabled() + error('could not link libsnappy') + else + warning('could not link libsnappy, disabling') + endif endif lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], @@ -971,6 +981,7 @@ config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) @@ -2352,7 +2363,7 @@ summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': lzo.found()} -summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} +summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} diff --git a/meson_options.txt b/meson_options.txt index 00a5ec55bd..e2b7e23887 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -72,6 +72,8 @@ option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', description: 'SDL Image support for icons') +option('snappy', type : 'feature', value : 'auto', + description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('vnc', type : 'feature', value : 'enabled', From patchwork Thu Dec 17 09:40:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C367CC4361B for ; Thu, 17 Dec 2020 09:44:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57E962360D for ; Thu, 17 Dec 2020 09:44:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57E962360D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppq7-0000Ye-AU for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:44:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmT-0004tY-9D for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:05 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:36863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmM-0007l3-OF for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:04 -0500 Received: by mail-ed1-x52c.google.com with SMTP id b2so27969254edm.3 for ; Thu, 17 Dec 2020 01:40:58 -0800 (PST) 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=MNFT69bkW3xmjtHMNViAC1UFouy8o01pGCWful8WbCI=; b=IrWwVIKiRDrqY5Mv6y+GJPl1LNOsU2zCFo08D5NUy2XZRPvHATI66AO553OWoS6xLc 3lMjXDRm0FfLbQkpXguNLBTrz2Idhd4zIOfkfbSZXkI/5hTnNqgwehZkKeXKvuEKGqda hEY57m2x5JyfvM/WUbXNy8ig8CBR/g8YaMu/X76Gj94OfOHSFNkbk5hPE6QePeZD6ZJ4 xmUS7K1DsJzXVeJcOjPxdqExQKm62JX9mZ+Jfekpi+2pXpccmCHcdUc5po2JufasZ2og E1GXk+G0wMf6cN2XdJKRUht/ZxgSzKivv6bxa0eLNawmBegXjAZ9Rl0mSZsH81l38HL6 7ibQ== 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=MNFT69bkW3xmjtHMNViAC1UFouy8o01pGCWful8WbCI=; b=Z9AATRZg9LVkXsLq75VjT2YacobTRmxphCcD+hnwjSTSnmAxA7SGAAmUiAqsBPb1DW yJba/3qVob5XZj8prLG8+4zZWR/Ke9xxaAPCJTSmIPOhHcoTsU9Th44N8a8NaISpQidL EzfdOH+1n8zDdy/L5MJ35bCdEmr8wb0LWPhgIARTR7BUnx8ABQAItZnDxr2f0TET+eJW jN9OLbaZlth6SO5iwCmJrVaQn3lZvzGQ5c2YM//J+gze78dVjYeYoJsVteixl2965MqK 7I1oVMiZjzXAUwE4qOX1P5hq42CDpRgeNVJq1ZT77LcXnmkuvS5UrMXEYSxXPJ7tM4KX QOEA== X-Gm-Message-State: AOAM5337owowZOyMhpweKvNEDf9ra5jyVlJwyBDbxE9A7OYrqT+55iiJ FrP8SJOtYYHkiDyC3tvQBPPXstoYvSI= X-Google-Smtp-Source: ABdhPJwkExypWW2s/OEw6vyUvcNV0Eu8llDU2HQjteEaq/anp0Ed55lL6AWO3xrJfwM8UcdtJn3+kg== X-Received: by 2002:a05:6402:307c:: with SMTP id bs28mr38123921edb.186.1608198057403; Thu, 17 Dec 2020 01:40:57 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/18] lzfse: convert to meson Date: Thu, 17 Dec 2020 10:40:38 +0100 Message-Id: <20201217094044.46462-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 31 ++++--------------------------- meson.build | 19 +++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/configure b/configure index aee27d9cdd..ea5650acca 100755 --- a/configure +++ b/configure @@ -397,7 +397,7 @@ capstone="auto" lzo="auto" snappy="auto" bzip2="auto" -lzfse="$default_feature" +lzfse="auto" zstd="$default_feature" guest_agent="$default_feature" guest_agent_with_vss="no" @@ -1324,9 +1324,9 @@ for opt do ;; --enable-bzip2) bzip2="enabled" ;; - --enable-lzfse) lzfse="yes" + --enable-lzfse) lzfse="enabled" ;; - --disable-lzfse) lzfse="no" + --disable-lzfse) lzfse="disabled" ;; --disable-zstd) zstd="no" ;; @@ -2458,24 +2458,6 @@ EOF fi fi -########################################## -# lzfse check - -if test "$lzfse" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { lzfse_decode_scratch_size(); return 0; } -EOF - if compile_prog "" "-llzfse" ; then - lzfse="yes" - else - if test "$lzfse" = "yes"; then - feature_not_found "lzfse" "Install lzfse devel" - fi - lzfse="no" - fi -fi - ########################################## # zstd check @@ -6088,11 +6070,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$lzfse" = "yes" ; then - echo "CONFIG_LZFSE=y" >> $config_host_mak - echo "LZFSE_LIBS=-llzfse" >> $config_host_mak -fi - if test "$zstd" = "yes" ; then echo "CONFIG_ZSTD=y" >> $config_host_mak echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak @@ -6651,7 +6628,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 9f6ea65626..c02d9c3e1a 100644 --- a/meson.build +++ b/meson.build @@ -695,10 +695,21 @@ if not get_option('bzip2').auto() or have_block endif endif endif -liblzfse = not_found -if 'CONFIG_LZFSE' in config_host - liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split()) + +liblzfse = cc.find_library('lzfse', has_headers: ['lzfse.h'], + required: get_option('lzfse'), + static: enable_static) +if liblzfse.found() and not cc.links(''' + #include + int main(void) { lzfse_decode_scratch_size(); return 0; }''', dependencies: liblzfse) + liblzfse = not_found + if get_option('lzfse').enabled() + error('could not link liblzfse') + else + warning('could not link liblzfse, disabling') + endif endif + oss = not_found if 'CONFIG_AUDIO_OSS' in config_host oss = declare_dependency(link_args: config_host['OSS_LIBS'].split()) @@ -2365,7 +2376,7 @@ summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_ summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} -summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} +summary_info += {'lzfse support': liblzfse.found()} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} diff --git a/meson_options.txt b/meson_options.txt index e2b7e23887..f74a3d78c4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('lzfse', type : 'feature', value : 'auto', + description: 'lzfse support for DMG images') option('lzo', type : 'feature', value : 'auto', description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 481DFC2BB48 for ; Thu, 17 Dec 2020 09:50:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADEBC233FB for ; Thu, 17 Dec 2020 09:50:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADEBC233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppvD-000617-O0 for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:50:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmT-0004ta-B7 for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:05 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:44929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmN-0007lD-Ec for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:05 -0500 Received: by mail-ed1-x529.google.com with SMTP id p22so27891438edu.11 for ; Thu, 17 Dec 2020 01:40:59 -0800 (PST) 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=eZF+riI0bftey6nWzva3b4atB2nE4nkBmnvVQo3cJOM=; b=pT6/QpU1Hb+04i26hYjRmgz4/ZntGEcG07ZX5aJHstRRbwFED7QNuAi06VjzR244OW p4njWkxCOza7NlHlA9Rfv7BVbnQWn6oMMbJWA64hCaip3iOgIDwZkuX/8zK0Kg5h4YLa 1BiFSX/v/ydx23UYIbR2lnxFqLbjMWJ5r+3vVl3ouR/7bNNuOJ2Al3zkg1Dq8y1XxHbg 6j9XD5lua1Ws1k0tSG2fb79yWKzikDcPVU1gh8FHNIQBWaFm0pfQcIAgJ85LfEOBRjfY oKiBFo3uuxc4ATskBMrZ6It18hxI9Y/Z6/Fd3vNcs42fA1X/AO3no22PqwaN0/ZftElX mKpw== 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=eZF+riI0bftey6nWzva3b4atB2nE4nkBmnvVQo3cJOM=; b=X3if2ZDtSRqJb4s0JffGqDvmEgehKm7lscJKo+06fKbpOChnmxxf2NawMbPWAlN1iV Siu0M2uOBxpgxC67/SFjbYg8hGFvYZKXOZgyd+OJ/yOAd67b301OVPyyc+SNTf8c/ZeX ttKoznkvRURZevM2hBmypE9jJJGnd/cLI6PJxRW55FdjuIGnz8jByoSBtTbdYASeq2Za GFDj2pbxvB229tr9kxacHY7Lm3d9Bdo7r1LYI26Dl7A7ffdQ/q6wSZJYTjBXessHzAx1 OQ5Bsc7dQv7CWTF0fE6+5p+tyNVLCqxfWkViFc5mN/CJpaEeTA8kWRD+UYSPKXLx435Y DY2Q== X-Gm-Message-State: AOAM531z4w1ZDUqHLQA0TBZaPTVaavz5vRMEVYmdnmZsuWJUcYFjDCJF tYdi+xvIjtYT6LSZ2py7OJ1is3HnmUU= X-Google-Smtp-Source: ABdhPJxpXwozskKdhUghI2TFBr8r57GO0FvfnkqyWpwPPBaJe6oqH88dZfMo2zynSdeX721roONNjA== X-Received: by 2002:aa7:cf85:: with SMTP id z5mr23326532edx.274.1608198058232; Thu, 17 Dec 2020 01:40:58 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:57 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/18] zstd: convert to meson Date: Thu, 17 Dec 2020 10:40:39 +0100 Message-Id: <20201217094044.46462-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 30 ++++-------------------------- meson.build | 10 ++++++---- meson_options.txt | 2 ++ migration/meson.build | 2 +- 4 files changed, 13 insertions(+), 31 deletions(-) diff --git a/configure b/configure index ea5650acca..649da881a2 100755 --- a/configure +++ b/configure @@ -398,7 +398,7 @@ lzo="auto" snappy="auto" bzip2="auto" lzfse="auto" -zstd="$default_feature" +zstd="auto" guest_agent="$default_feature" guest_agent_with_vss="no" guest_agent_ntddscsi="no" @@ -1328,9 +1328,9 @@ for opt do ;; --disable-lzfse) lzfse="disabled" ;; - --disable-zstd) zstd="no" + --disable-zstd) zstd="disabled" ;; - --enable-zstd) zstd="yes" + --enable-zstd) zstd="enabled" ;; --enable-guest-agent) guest_agent="yes" ;; @@ -2458,23 +2458,6 @@ EOF fi fi -########################################## -# zstd check - -if test "$zstd" != "no" ; then - libzstd_minver="1.4.0" - if $pkg_config --atleast-version=$libzstd_minver libzstd ; then - zstd_cflags="$($pkg_config --cflags libzstd)" - zstd_libs="$($pkg_config --libs libzstd)" - zstd="yes" - else - if test "$zstd" = "yes" ; then - feature_not_found "libzstd" "Install libzstd devel" - fi - zstd="no" - fi -fi - ########################################## # libseccomp check @@ -6070,12 +6053,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$zstd" = "yes" ; then - echo "CONFIG_ZSTD=y" >> $config_host_mak - echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak - echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak -fi - if test "$seccomp" = "yes"; then echo "CONFIG_SECCOMP=y" >> $config_host_mak echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak @@ -6629,6 +6606,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ + -Dzstd=$zstd \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index c02d9c3e1a..93a95d7a7f 100644 --- a/meson.build +++ b/meson.build @@ -380,9 +380,10 @@ if not get_option('libiscsi').auto() or have_block method: 'pkg-config', static: enable_static) endif zstd = not_found -if 'CONFIG_ZSTD' in config_host - zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(), - link_args: config_host['ZSTD_LIBS'].split()) +if not get_option('zstd').auto() or have_block + zstd = dependency('zstd', version: '>=1.4.0', + required: get_option('zstd'), + method: 'pkg-config', static: enable_static) endif gbm = not_found if 'CONFIG_GBM' in config_host @@ -1003,6 +1004,7 @@ config_host_data.set('CONFIG_KEYUTILS', keyutils.found()) config_host_data.set('CONFIG_GETTID', has_gettid) config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) config_host_data.set('CONFIG_STATX', has_statx) +config_host_data.set('CONFIG_ZSTD', zstd.found()) config_host_data.set('CONFIG_FUSE', fuse.found()) config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found()) config_host_data.set('CONFIG_CFI', get_option('cfi')) @@ -2377,7 +2379,7 @@ summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': liblzfse.found()} -summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} +summary_info += {'zstd support': zstd.found()} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} summary_info += {'memory allocator': get_option('malloc')} diff --git a/meson_options.txt b/meson_options.txt index f74a3d78c4..5a1de9b1fe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -92,6 +92,8 @@ option('virtiofsd', type: 'feature', value: 'auto', description: 'build virtiofs daemon (virtiofsd)') option('vhost_user_blk_server', type: 'feature', value: 'auto', description: 'build vhost-user-blk server') +option('zstd', type : 'feature', value : 'auto', + description: 'zstd compression support') option('fuse', type: 'feature', value: 'auto', description: 'FUSE block device export') option('fuse_lseek', type : 'feature', value : 'auto', diff --git a/migration/meson.build b/migration/meson.build index 980e37865c..c783f2f2ae 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -29,6 +29,6 @@ softmmu_ss.add(files( softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c')) softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c')) -softmmu_ss.add(when: 'CONFIG_ZSTD', if_true: [files('multifd-zstd.c'), zstd]) +softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c')) specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('dirtyrate.c', 'ram.c')) From patchwork Thu Dec 17 09:40:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E088C2BB40 for ; Thu, 17 Dec 2020 09:57:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 92F83233FB for ; Thu, 17 Dec 2020 09:57:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92F83233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpq28-0004uR-Jv for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:57:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmZ-0004xp-6J for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:12 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:35490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmO-0007lz-9O for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: by mail-ed1-x529.google.com with SMTP id u19so27970860edx.2 for ; Thu, 17 Dec 2020 01:40:59 -0800 (PST) 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=vUEGmeFPHcUwApgJAGGVOl2ZiRp6LKFQ+cuO5XM1h3A=; b=QT0sAwsLm8D72z1rfPVe/OujjYpt3IrICOlaWgE7LrWJI38YOy4ZhTKbq6EpRhGefr ZOM+ow/JKwcBGsaOwPMp6c4AHT84z6ZX765OHGiRAT5aZw/6eEbJk4rSrL1+oTrItwVo cLYHsqz47BcSENOZZMuUbnFGMemTdeiEuVq3KkQi0CCeroXULWTstNFs9BQkL7tMqFvs j/zI0A9uM2Ur+rf/Y8c2T48uUKEJLaHnhRsoJMnKsdrwVVTg/+ZXnZR1ih2xUTfrNdaR zWtmdg4tPUVVpv8S0v9Zk9Lp/BF4mkHMHYk0xO+KdphxNbIHRPUCNCarxClKgwr3zjL5 su0g== 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=vUEGmeFPHcUwApgJAGGVOl2ZiRp6LKFQ+cuO5XM1h3A=; b=nd4odI0qlZ2r4ySwc46ZWp5wdcMtnW2p8NvBJoKrYB6ie/QQTihDcbrNQTyScxM0Tq PRrw7k2WOI2KNngKvOAF0I7M6YjUKyu/Ctgnk909vLlrmbmx/zs2NM3x3ta05hciTbmP w1s3hSt/2SMBMCSHA1O27cpk8iMXjq2v6Ce+Ym4a7lX7TE6rpmSSnv/fCjD+rah5N9rz +vOVf6l0cUM+PzHjovftuOV/Z8Dlr/UuskT88FQ6YQuiggXuWonMlK5WVwO23l3ycFOl mBDTzyANFC0Cd8LvzVhiFwAz8XUYm0hobmq8Ez2FOBVqZkuKZcdIRSmIINuhocgsV+EB H8hA== X-Gm-Message-State: AOAM531JPi+f2y9DS0hmfZAf7KOG/vcjDfyKNdNXpyENHNXuzRrDkjKe 7qtgbl+Uj16EPzN0BLQUTTl9+P4z5NI= X-Google-Smtp-Source: ABdhPJw4ztnqBQnOiDDIDCvaK0ZcUrN7biIYMJAFJR1xYG1d2JS9vgaZr32XEkAKXD9ImPqylJXmkw== X-Received: by 2002:a50:fc8b:: with SMTP id f11mr37869388edq.11.1608198059079; Thu, 17 Dec 2020 01:40:59 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/18] seccomp: convert to meson Date: Thu, 17 Dec 2020 10:40:40 +0100 Message-Id: <20201217094044.46462-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 32 ++++---------------------------- meson.build | 10 ++++++---- meson_options.txt | 2 ++ softmmu/meson.build | 2 +- softmmu/qemu-seccomp.c | 2 -- tools/meson.build | 4 ++-- 6 files changed, 15 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 649da881a2..00c2d61a96 100755 --- a/configure +++ b/configure @@ -414,7 +414,7 @@ debug_stack_usage="no" crypto_afalg="no" cfi="false" cfi_debug="false" -seccomp="$default_feature" +seccomp="auto" glusterfs="auto" gtk="$default_feature" gtk_gl="no" @@ -1356,9 +1356,9 @@ for opt do ;; --disable-tools) want_tools="no" ;; - --enable-seccomp) seccomp="yes" + --enable-seccomp) seccomp="enabled" ;; - --disable-seccomp) seccomp="no" + --disable-seccomp) seccomp="disabled" ;; --disable-glusterfs) glusterfs="disabled" ;; @@ -2458,24 +2458,6 @@ EOF fi fi -########################################## -# libseccomp check - -if test "$seccomp" != "no" ; then - libseccomp_minver="2.3.0" - if $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then - seccomp_cflags="$($pkg_config --cflags libseccomp)" - seccomp_libs="$($pkg_config --libs libseccomp)" - seccomp="yes" - else - if test "$seccomp" = "yes" ; then - feature_not_found "libseccomp" \ - "Install libseccomp devel >= $libseccomp_minver" - fi - seccomp="no" - fi -fi - ########################################## # xen probe @@ -6053,12 +6035,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$seccomp" = "yes"; then - echo "CONFIG_SECCOMP=y" >> $config_host_mak - echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak - echo "SECCOMP_LIBS=$seccomp_libs" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak @@ -6606,7 +6582,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd \ + -Dzstd=$zstd -Dseccomp=$seccomp \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 93a95d7a7f..a0132730d7 100644 --- a/meson.build +++ b/meson.build @@ -329,9 +329,10 @@ if 'CONFIG_ATTR' in config_host libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) endif seccomp = not_found -if 'CONFIG_SECCOMP' in config_host - seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(), - link_args: config_host['SECCOMP_LIBS'].split()) +if not get_option('libiscsi').auto() or have_system or have_tools + seccomp = dependency('libseccomp', version: '>=2.3.0', + required: get_option('seccomp'), + method: 'pkg-config', static: enable_static) endif libcap_ng = not_found if 'CONFIG_LIBCAP_NG' in config_host @@ -993,6 +994,7 @@ config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) config_host_data.set('CONFIG_VNC', vnc.found()) @@ -2361,7 +2363,7 @@ if targetos == 'windows' summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')} summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI')} endif -summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')} +summary_info += {'seccomp support': seccomp.found()} summary_info += {'CFI support': get_option('cfi')} summary_info += {'CFI debug support': get_option('cfi_debug')} summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']} diff --git a/meson_options.txt b/meson_options.txt index 5a1de9b1fe..1854a9639f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -74,6 +74,8 @@ option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', description: 'SDL Image support for icons') +option('seccomp', type : 'feature', value : 'auto', + description: 'seccomp support') option('snappy', type : 'feature', value : 'auto', description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', diff --git a/softmmu/meson.build b/softmmu/meson.build index 2dab6c7eb6..d8e03018ab 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -28,5 +28,5 @@ softmmu_ss.add(files( ), sdl, libpmem, libdaxctl) softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) -softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp]) +softmmu_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) softmmu_ss.add(when: fdt, if_true: files('device_tree.c')) diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c index 8325ecb766..377ef6937c 100644 --- a/softmmu/qemu-seccomp.c +++ b/softmmu/qemu-seccomp.c @@ -202,7 +202,6 @@ static int seccomp_start(uint32_t seccomp_opts, Error **errp) return rc < 0 ? -1 : 0; } -#ifdef CONFIG_SECCOMP int parse_sandbox(void *opaque, QemuOpts *opts, Error **errp) { if (qemu_opt_get_bool(opts, "enable", false)) { @@ -328,4 +327,3 @@ static void seccomp_register(void) } } opts_init(seccomp_register); -#endif diff --git a/tools/meson.build b/tools/meson.build index 76bf84df52..5c52d79fe4 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,6 +1,6 @@ have_virtiofsd = (targetos == 'linux' and have_tools and - 'CONFIG_SECCOMP' in config_host and + seccomp.found() and 'CONFIG_LIBCAP_NG' in config_host and 'CONFIG_VHOST_USER' in config_host) @@ -8,7 +8,7 @@ if get_option('virtiofsd').enabled() if not have_virtiofsd if targetos != 'linux' error('virtiofsd requires Linux') - elif 'CONFIG_SECCOMP' not in config_host or 'CONFIG_LIBCAP_NG' not in config_host + elif not seccomp.found() or 'CONFIG_LIBCAP_NG' not in config_host error('virtiofsd requires libcap-ng-devel and seccomp-devel') elif not have_tools or 'CONFIG_VHOST_USER' not in config_host error('virtiofsd needs tools and vhost-user support') From patchwork Thu Dec 17 09:40:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC1C1C4361B for ; Thu, 17 Dec 2020 09:53:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CCE9238D6 for ; Thu, 17 Dec 2020 09:53:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CCE9238D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppyO-00016P-3y for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:53:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmY-0004ww-QV for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:38239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmP-0007m3-7H for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:09 -0500 Received: by mail-ed1-x52d.google.com with SMTP id cw27so27926110edb.5 for ; Thu, 17 Dec 2020 01:41:00 -0800 (PST) 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=22tlcBFy15WQt1L+NeZp+J8Yakjh01n3hd2Pt4rd9E0=; b=LAKme57YVdj8NuKQttmJHb115cJILdx6DQ0Dq08ESJ3l8tDuG04wYpTvciCqFDmmQF pKTjqXo8fMQjINcIExuC/XQ8iyP4E7s5SZArznBNw7brLsQ62hhCEY/VjnCgdsvnWLgk pLpcyVU3F8K8us50MfQv26OxfGhxOewZiROG1h7MiXXEVmLBZtFH5z99ey7YMfusYKnb LiPqnq/WkSStSpFRrn+k9yrQPW7Ak330WmsBgvQdht6uwnsHv7YCn0OntpcW1wDXQM5C ygSq+kt1v/8YpmMmLq2OIRN4xOxCiJ+RVCi3Ja0X4cHWkaoDsPPVQjf447FQH2hZ9SI7 CwRg== 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=22tlcBFy15WQt1L+NeZp+J8Yakjh01n3hd2Pt4rd9E0=; b=K+wK0TzNezIvHl6nZTEgVFl99/0nLsZphW4W9lsgLo91EhOvDDrKTZjNjpNIaDzLGF 7zTFFDamLGL7DD5sjgIIQPfKmRasi1wnO06T3KR1gG7LVk/MqXnYCulHQ6jPB54zaB6c yAKh454sAIGMsu18d9lXHU80rbcwah/NU53XBzZTLdFXZh30mz1/hRz9z5XvYKLuWV3Z fQ81rsHGUFlWAmSolSjVGtcvyWg8vUGvvMGYrWV5YbP3ewliuA19KHF9K+chfK+B2TQQ VDE4es4hc7M9Arq7Znut0TkS4+3isAl0F1qLv8bMylxy5v0Hwy4W/N7gIGLLpCyWnCSd OFSA== X-Gm-Message-State: AOAM530m/VBcutxZLqf8VCcbJNfpbBfa2pd493ChVYMWmy1JTHlu7GeG fppItwUBjCa64kEKBamlJhwlQvOQq5g= X-Google-Smtp-Source: ABdhPJwuiXdXgE+15PLhLSk7reNZVY0/H2luoUU0RF1ktE3JE0o++3qh1tRePOPSjcWE4ZCRRUxYMQ== X-Received: by 2002:a50:f307:: with SMTP id p7mr37784054edm.368.1608198059871; Thu, 17 Dec 2020 01:40:59 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:59 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/18] virtfs: convert to meson Date: Thu, 17 Dec 2020 10:40:41 +0100 Message-Id: <20201217094044.46462-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 29 ++++------------------------- meson.build | 24 ++++++++++++++++++++++-- meson_options.txt | 11 +++++++---- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 00c2d61a96..11d6f40f92 100755 --- a/configure +++ b/configure @@ -316,7 +316,7 @@ netmap="no" sdl="auto" sdl_image="auto" virtiofsd="auto" -virtfs="$default_feature" +virtfs="auto" libudev="auto" mpath="auto" vnc="enabled" @@ -1005,9 +1005,9 @@ for opt do ;; --enable-qom-cast-debug) qom_cast_debug="yes" ;; - --disable-virtfs) virtfs="no" + --disable-virtfs) virtfs="disabled" ;; - --enable-virtfs) virtfs="yes" + --enable-virtfs) virtfs="enabled" ;; --disable-libudev) libudev="disabled" ;; @@ -5445,24 +5445,6 @@ if [ "$eventfd" = "yes" ]; then ivshmem=yes fi -if test "$softmmu" = yes ; then - if test "$linux" = yes; then - if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then - virtfs=yes - else - if test "$virtfs" = yes; then - error_exit "VirtFS requires libcap-ng devel and libattr devel" - fi - virtfs=no - fi - else - if test "$virtfs" = yes; then - error_exit "VirtFS is supported only on Linux" - fi - virtfs=no - fi -fi - # Probe for guest agent support/options if [ "$guest_agent" != "no" ]; then @@ -5919,9 +5901,6 @@ fi if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak fi -if test "$virtfs" = "yes" ; then - echo "CONFIG_VIRTFS=y" >> $config_host_mak -fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi @@ -6582,7 +6561,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd -Dseccomp=$seccomp \ + -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index a0132730d7..08d3586df5 100644 --- a/meson.build +++ b/meson.build @@ -959,6 +959,25 @@ endif # config-host.h # ################# +have_virtfs = (targetos == 'linux' and + have_system and + libattr.found() and + libcap_ng.found()) + +if get_option('virtfs').enabled() + if not have_virtfs + if targetos != 'linux' + error('virtio-9p (virtfs) requires Linux') + elif not libcap_ng.found() or not libattr.found() + error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel') + elif not have_system + error('virtio-9p (virtfs) needs system emulation support') + endif + endif +elif get_option('virtfs').disabled() + have_virtfs = false +endif + config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir) @@ -1001,6 +1020,7 @@ config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_PNG', png.found()) config_host_data.set('CONFIG_VNC_SASL', sasl.found()) +config_host_data.set('CONFIG_VIRTFS', have_virtfs) config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found()) config_host_data.set('CONFIG_KEYUTILS', keyutils.found()) config_host_data.set('CONFIG_GETTID', has_gettid) @@ -1099,7 +1119,7 @@ host_kconfig = \ ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=y'] : []) + \ ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=y'] : []) + \ ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=y'] : []) + \ - ('CONFIG_VIRTFS' in config_host ? ['CONFIG_VIRTFS=y'] : []) + \ + (have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \ ('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=y'] : []) @@ -2287,7 +2307,7 @@ summary_info += {'mingw32 support': targetos == 'windows'} summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} -summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} +summary_info += {'VirtFS support': have_virtfs} summary_info += {'build virtiofs daemon': have_virtiofsd} summary_info += {'Multipath support': mpathpersist.found()} summary_info += {'VNC support': vnc.found()} diff --git a/meson_options.txt b/meson_options.txt index 1854a9639f..59a8a50e5b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -90,10 +90,6 @@ option('vnc_sasl', type : 'feature', value : 'auto', description: 'SASL authentication for VNC server') option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') -option('virtiofsd', type: 'feature', value: 'auto', - description: 'build virtiofs daemon (virtiofsd)') -option('vhost_user_blk_server', type: 'feature', value: 'auto', - description: 'build vhost-user-blk server') option('zstd', type : 'feature', value : 'auto', description: 'zstd compression support') option('fuse', type: 'feature', value: 'auto', @@ -101,6 +97,13 @@ option('fuse', type: 'feature', value: 'auto', option('fuse_lseek', type : 'feature', value : 'auto', description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports') +option('vhost_user_blk_server', type: 'feature', value: 'auto', + description: 'build vhost-user-blk server') +option('virtfs', type: 'feature', value: 'auto', + description: 'virtio-9p support') +option('virtiofsd', type: 'feature', value: 'auto', + description: 'build virtiofs daemon (virtiofsd)') + option('capstone', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], description: 'Whether and how to find the capstone library') From patchwork Thu Dec 17 09:40:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35EEBC4361B for ; Thu, 17 Dec 2020 09:54:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5619233FB for ; Thu, 17 Dec 2020 09:54:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5619233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppzl-0002r9-LZ for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:54:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmb-000526-Jp for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:13 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:33319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmR-0007mA-1a for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:13 -0500 Received: by mail-ed1-x533.google.com with SMTP id j16so5507179edr.0 for ; Thu, 17 Dec 2020 01:41:01 -0800 (PST) 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=kfiov3tZ0m7QpUN64F+t6W9nkhHG9RCaQOMRa8dZVP4=; b=jOCCOpEg+DBK55dWBXjXfOtnb+1C4LJ4nJJiPBLCfsvikhvQ5On9rQc1tFYlN7VTPP OZNI+J9a/fDe0REYH/hnCiUy50KsPoXxjDkMhSH+B4fY9pRi+C+PLMUX/qHrZb6PRiuA HNYUAbcU1cZb0TrBUTyKCOiuY3lta6uaYp39jmV8ZjVpzq1vVqF98SxAC3leyxVbOZa/ 1GNLVWxu+/Dazs6KYdd9cMQmUewGfQ2If45S+MaduPwTGjxXfMxngl2QJJVFJsLxr60n Aho18DcXrTSBjMWvF5XFaGE9vKcisQ6b7llt39hnnP3/xdl9dt9+Tg0SYnr+np11KUBI tjYQ== 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=kfiov3tZ0m7QpUN64F+t6W9nkhHG9RCaQOMRa8dZVP4=; b=FN5JXa0l8u4cahGQYvQRau29JA2IrA8oMRZfsNLOOIfQ4kIN/i6pr/6e1OLwE2g5k/ Khdn2Z3cL1aOgoiqdlHEot30autywAAoav+CXVRqzbY3ola3hqKLVG4aADwOnixTcqD5 h5XHr39b3EUB7qiXtBn8EdTd/fHqxAK5P3vqEvfUgqKMW8PVfINJsrDQaj1mK13eG3ro +bfRc5mA4wlrc4KkAURZePl9+4mDr3y4ZImhzCWByxMly++MLvppAVGxdOv7n9Xu7RDI 44pNLbZ+Ix6V8a6sT3tDXOKlq7CYMGDKxukNga5GYHdLQLrWMlXEQ8kY9OfR21g+kF06 JkNw== X-Gm-Message-State: AOAM532ShSheia/o5kik7I6T2zHO7/x7vmos2l8e4L/NtAYwSCPBhD8c kjOI+0f4cEnyCcqex1YhqiFhvmIEFSU= X-Google-Smtp-Source: ABdhPJxyi/skR7jqwqJQKbXvxKw18Gt435EsCW2DFqAaQjUU/eVVUEx3hqty5kVCmqiB/rkatyuN2A== X-Received: by 2002:a50:cd57:: with SMTP id d23mr37387349edj.95.1608198060760; Thu, 17 Dec 2020 01:41:00 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:41:00 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/18] cap_ng: convert to meson Date: Thu, 17 Dec 2020 10:40:42 +0100 Message-Id: <20201217094044.46462-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 34 ++++------------------------------ meson.build | 24 ++++++++++++++++++++---- meson_options.txt | 2 ++ tools/meson.build | 4 ++-- 4 files changed, 28 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 11d6f40f92..faee71612f 100755 --- a/configure +++ b/configure @@ -331,7 +331,7 @@ xen_ctrl_version="$default_feature" xen_pci_passthrough="auto" linux_aio="$default_feature" linux_io_uring="$default_feature" -cap_ng="$default_feature" +cap_ng="auto" attr="$default_feature" libattr="$default_feature" xfs="$default_feature" @@ -1123,9 +1123,9 @@ for opt do ;; --enable-tcg-interpreter) tcg_interpreter="yes" ;; - --disable-cap-ng) cap_ng="no" + --disable-cap-ng) cap_ng="disabled" ;; - --enable-cap-ng) cap_ng="yes" + --enable-cap-ng) cap_ng="enabled" ;; --disable-tcg) tcg="disabled" ;; @@ -3193,28 +3193,6 @@ EOF fi fi -########################################## -# libcap-ng library probe -if test "$cap_ng" != "no" ; then - cap_libs="-lcap-ng" - cat > $TMPC << EOF -#include -int main(void) -{ - capng_capability_to_name(CAPNG_EFFECTIVE); - return 0; -} -EOF - if compile_prog "" "$cap_libs" ; then - cap_ng=yes - else - if test "$cap_ng" = "yes" ; then - feature_not_found "cap_ng" "Install libcap-ng devel" - fi - cap_ng=no - fi -fi - ########################################## # Sound support libraries probe @@ -5671,10 +5649,6 @@ fi if test "$gprof" = "yes" ; then echo "CONFIG_GPROF=y" >> $config_host_mak fi -if test "$cap_ng" = "yes" ; then - echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak - echo "LIBCAP_NG_LIBS=$cap_libs" >> $config_host_mak -fi echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]') @@ -6561,7 +6535,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs \ + -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 08d3586df5..56ab291d87 100644 --- a/meson.build +++ b/meson.build @@ -334,10 +334,25 @@ if not get_option('libiscsi').auto() or have_system or have_tools required: get_option('seccomp'), method: 'pkg-config', static: enable_static) endif -libcap_ng = not_found -if 'CONFIG_LIBCAP_NG' in config_host - libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) + +libcap_ng = cc.find_library('cap-ng', has_headers: ['cap-ng.h'], + required: get_option('cap_ng'), + static: enable_static) +if libcap_ng.found() and not cc.links(''' + #include + int main(void) + { + capng_capability_to_name(CAPNG_EFFECTIVE); + return 0; + }''', dependencies: libcap_ng) + libcap_ng = not_found + if get_option('cap_ng').enabled() + error('could not link libcap-ng') + else + warning('could not link libcap-ng, disabling') + endif endif + if get_option('xkbcommon').auto() and not have_system and not have_tools xkbcommon = not_found else @@ -1006,6 +1021,7 @@ config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_c config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6')) config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) +config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_LIBSSH', libssh.found()) @@ -2348,7 +2364,7 @@ summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')} summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')} summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')} summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')} -summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')} +summary_info += {'libcap-ng support': libcap_ng.found()} summary_info += {'vhost-kernel support': config_host.has_key('CONFIG_VHOST_KERNEL')} summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')} summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')} diff --git a/meson_options.txt b/meson_options.txt index 59a8a50e5b..12a1872f20 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('bzip2', type : 'feature', value : 'auto', description: 'bzip2 support for DMG images') +option('cap_ng', type : 'feature', value : 'auto', + description: 'cap_ng support') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', diff --git a/tools/meson.build b/tools/meson.build index 5c52d79fe4..fdce66857d 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,14 +1,14 @@ have_virtiofsd = (targetos == 'linux' and have_tools and seccomp.found() and - 'CONFIG_LIBCAP_NG' in config_host and + libcap_ng.found() and 'CONFIG_VHOST_USER' in config_host) if get_option('virtiofsd').enabled() if not have_virtiofsd if targetos != 'linux' error('virtiofsd requires Linux') - elif not seccomp.found() or 'CONFIG_LIBCAP_NG' not in config_host + elif not seccomp.found() or not libcap_ng.found() error('virtiofsd requires libcap-ng-devel and seccomp-devel') elif not have_tools or 'CONFIG_VHOST_USER' not in config_host error('virtiofsd needs tools and vhost-user support') From patchwork Thu Dec 17 09:40:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EC92C4361B for ; Thu, 17 Dec 2020 09:53:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 856E9238D6 for ; Thu, 17 Dec 2020 09:53:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 856E9238D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppyh-0001VB-BV for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:53:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmW-0004wa-Lz for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:37811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmQ-0007mG-Rz for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:07 -0500 Received: by mail-ed1-x52c.google.com with SMTP id cm17so27962322edb.4 for ; Thu, 17 Dec 2020 01:41:02 -0800 (PST) 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=00xEj3qJn/7yijrcaoGkVwn0tbD/2+JqzXpXbj+fkFI=; b=rIa7gmsETxmkdeq3h2H/drhsYZ4qvmHNPb2CkcfS0DZ7mCTh9XaLGU9AcmfWZ+8C+Z cWQG2/GtT77xO8tWUU/6fa3KC1ioVmPtNO7K+/CV3FFBJ6cozr4vrrkpQ/XYPlqvMahU g3fZsM/pi1PrNaKSzaAlRRaJwlE6PQHBvg02lFfh77Lrm51T/fL4+kbP19PpwIiN3Pyo D/7+ICvRe53wGzj+nLF6HCZMbeFxW7fpwinAggmU+YNtzVDIWh/SXuYqPM90gaySs/Nq qUfry5hHgdMr1jT3jyX2T1Q1sJ/qSr6l2JIfOV3JUrrSerQxsmjkt6yw9AeAEcVxi3VK bt0w== 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=00xEj3qJn/7yijrcaoGkVwn0tbD/2+JqzXpXbj+fkFI=; b=t7gpv2Vqzx5NNq1w0Fu15QLmfdHbzilMg7Lh4zhN+EnRENXwmNOeAivxOBGRdgR7U5 DC5gNeUEjsLw/I8HU8NfmHGiXQAhmW2OVpVl6csX4Ibep48lQbEI0TXTrN/e/QGx2gti Fu9lfZRmPvrZwJ90rnyNB255zolrJ57WGxey0hNwbI58e0SU+YDFe6PnKatfZtLCW/jF bwXntQyij3qmWywTphOjE3lQzsahTEvCC/gh8mLbjFGUUHvboMtJ210FsE+M3qMR4X2K V6ZyQ99Y4TVGN1iH3vxJCPtj4xaUAl6h5sHL02H31w3vRcpthTCnWBdcSUa3k0HEqXbK ubYw== X-Gm-Message-State: AOAM533GmkdfBLb5GO4Mrmd9aBR3KK7jzYwqo3hYd/FvqdFOhSETILhX 7cKe4RF2ezEsP8ujT12zELpTL832OHA= X-Google-Smtp-Source: ABdhPJxtb0zsc1/aEMG1ZxU+SMEs9p0jrZP1cUzIKwoYz8qXAfvvjAuVGa9J/KZCMWNemZvT2i8Gdg== X-Received: by 2002:a05:6402:13d1:: with SMTP id a17mr37055353edx.202.1608198061583; Thu, 17 Dec 2020 01:41:01 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:41:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 17/18] libattr: convert to meson Date: Thu, 17 Dec 2020 10:40:43 +0100 Message-Id: <20201217094044.46462-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 45 ++++----------------------------------------- meson.build | 38 +++++++++++++++++++++++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 41 insertions(+), 44 deletions(-) diff --git a/configure b/configure index faee71612f..420663d69a 100755 --- a/configure +++ b/configure @@ -332,8 +332,7 @@ xen_pci_passthrough="auto" linux_aio="$default_feature" linux_io_uring="$default_feature" cap_ng="auto" -attr="$default_feature" -libattr="$default_feature" +attr="auto" xfs="$default_feature" tcg="enabled" membarrier="$default_feature" @@ -1230,9 +1229,9 @@ for opt do ;; --enable-linux-io-uring) linux_io_uring="yes" ;; - --disable-attr) attr="no" + --disable-attr) attr="disabled" ;; - --enable-attr) attr="yes" + --enable-attr) attr="enabled" ;; --disable-membarrier) membarrier="no" ;; @@ -3544,36 +3543,6 @@ elif test "$tpm" = "yes"; then fi fi -########################################## -# attr probe - -libattr_libs= -if test "$attr" != "no" ; then - cat > $TMPC < -#include -#ifdef CONFIG_LIBATTR -#include -#else -#include -#endif -int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 0); return 0; } -EOF - if compile_prog "" "" ; then - attr=yes - # Older distros have , and need -lattr: - elif compile_prog "-DCONFIG_LIBATTR" "-lattr" ; then - attr=yes - libattr_libs="-lattr" - libattr=yes - else - if test "$attr" = "yes" ; then - feature_not_found "ATTR" "Install libc6 or libattr devel" - fi - attr=no - fi -fi - ########################################## # iovec probe cat > $TMPC <> $config_host_mak echo "LINUX_IO_URING_LIBS=$linux_io_uring_libs" >> $config_host_mak fi -if test "$attr" = "yes" ; then - echo "CONFIG_ATTR=y" >> $config_host_mak - echo "LIBATTR_LIBS=$libattr_libs" >> $config_host_mak -fi -if test "$libattr" = "yes" ; then - echo "CONFIG_LIBATTR=y" >> $config_host_mak -fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi @@ -6536,6 +6498,7 @@ NINJA=$ninja $meson setup \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ + -Dattr=$attr \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 56ab291d87..341eadaa5c 100644 --- a/meson.build +++ b/meson.build @@ -324,10 +324,40 @@ if not get_option('libnfs').auto() or have_block required: get_option('libnfs'), method: 'pkg-config', static: enable_static) endif + +libattr_test = ''' + #include + #include + #ifdef CONFIG_LIBATTR + #include + #else + #include + #endif + int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 0); return 0; }''' + libattr = not_found -if 'CONFIG_ATTR' in config_host - libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) +have_old_libattr = false +if not get_option('attr').disabled() + if cc.links(libattr_test) + libattr = declare_dependency() + else + libattr = cc.find_library('attr', has_headers: ['attr/xattr.h'], + required: get_option('attr'), + static: enable_static) + if libattr.found() and not \ + cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATTR') + libattr = not_found + if get_option('attr').enabled() + error('could not link libattr') + else + warning('could not link libattr, disabling') + endif + else + have_old_libattr = libattr.found() + endif + endif endif + seccomp = not_found if not get_option('libiscsi').auto() or have_system or have_tools seccomp = dependency('libseccomp', version: '>=2.3.0', @@ -1006,6 +1036,7 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir')) +config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) @@ -1021,6 +1052,7 @@ config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_c config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6')) config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) +config_host_data.set('CONFIG_LIBATTR', have_old_libattr) config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) @@ -2343,7 +2375,7 @@ summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')} summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')} -summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')} +summary_info += {'ATTR/XATTR support': libattr.found()} summary_info += {'Install blobs': get_option('install_blobs')} summary_info += {'KVM support': config_all.has_key('CONFIG_KVM')} summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')} diff --git a/meson_options.txt b/meson_options.txt index 12a1872f20..8fcec056cd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,8 @@ option('cfi', type: 'boolean', value: 'false', option('cfi_debug', type: 'boolean', value: 'false', description: 'Verbose errors in case of CFI violation') +option('attr', type : 'feature', value : 'auto', + description: 'attr/xattr support') option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('bzip2', type : 'feature', value : 'auto', From patchwork Thu Dec 17 09:40:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11979451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31BC0C4361B for ; Thu, 17 Dec 2020 09:51:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD225233FB for ; Thu, 17 Dec 2020 09:51:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD225233FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppwq-0007mW-N3 for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 04:51:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmZ-0004yd-MR for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:11 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:38965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmS-0007n3-Cu for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:11 -0500 Received: by mail-ej1-x630.google.com with SMTP id n26so36889009eju.6 for ; Thu, 17 Dec 2020 01:41:03 -0800 (PST) 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=CoTdu9oftQn1Dqcp0qnrY06GwGq+xDV3ZKjVQ17RKzU=; b=WEBRK9xJnuVB/aAu8q4m2KOceDGnMYhm7V5zV1n0cbBcD7IPmgUtmEzzBcZtyQL28V FAGJXoDOfACAdnW6W1sQhwMJ8pK01lBluIXMcA2EQZgIfu8Q5XMxq+3vNmqDkZmdrszw kC8dOSrtXX7FQooe13MzjwbpSBXSPBTHvbEOL/aBGjhzTxGKCdFKJdJ+YtG88bWYjyLB 54XNhaI+3yDsaYIl1rPi154/Z4M1dRtLj/8y0/JUiFHW1dTHpAGW8IYVUxATbdcqbrqI 2We4q8kTPrA6Fd9z/1pAkdek4RJpO90FYKSLJoALJwKPkcSMikpg2y3tFdGNxGhyQd28 T8QQ== 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=CoTdu9oftQn1Dqcp0qnrY06GwGq+xDV3ZKjVQ17RKzU=; b=uA/2VSV+0dt9u3D3lgeN4dBTKj+sb6mHbp3GX5Gcxdto8qqgAT5SQ2ju4RSfSkj8yB w2S1rQBdQEqycK+mRjaZ2A9EZL4DjvtWWFRmWwQM0IZJWZlD+2/NamRIABspTs9QlTd9 yl22/ii2KPHfCjSizLTrbh9MEAY6+5OfBQzOsfucSe/V+RMuXRy1l9SULbiWu30fZWcx Z1Aig0zl3H1/iVF9p0kOK18WtN0v+y1DGkj08Q1jVmgYX7BHTIpz6vk4NuhBcw59cre5 bbeZMrbzxNzJuUOwK23aH9WVpSBifCkcFZ5DQFI4sIcSB6tJOt/IU1fvsDUZOlFN8GOY V7tw== X-Gm-Message-State: AOAM531+ILGb2m5/JWZcmWN+HjAdtYctbuartaG8Luj8ogVxV7MgKahE aHYTDZ15lMIhYmG28g3V1Tz2OwOOtWs= X-Google-Smtp-Source: ABdhPJxVkIr74xlcTmGVHGRssUy5CPwd66ApFTqsuO+5n72wZp4FlO9mJeMXWj8k+HEj8RY4TlAQ0g== X-Received: by 2002:a17:906:af75:: with SMTP id os21mr17722693ejb.330.1608198062400; Thu, 17 Dec 2020 01:41:02 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:41:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 18/18] meson.build: convert --with-default-devices to meson Date: Thu, 17 Dec 2020 10:40:44 +0100 Message-Id: <20201217094044.46462-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x630.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.249, 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?Marc-Andr=C3=83=C2=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Pass the boolean option directly instead of writing CONFIG_MINIKCONF_MODE to config-host.mak. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau --- configure | 13 ++++--------- meson.build | 5 +++-- meson_options.txt | 2 ++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 420663d69a..ab4b826755 100755 --- a/configure +++ b/configure @@ -447,7 +447,7 @@ sheepdog="no" libxml2="$default_feature" debug_mutex="no" libpmem="$default_feature" -default_devices="yes" +default_devices="true" plugins="no" fuzzing="no" rng_none="no" @@ -944,9 +944,9 @@ for opt do ;; --with-trace-file=*) trace_file="$optarg" ;; - --with-default-devices) default_devices="yes" + --with-default-devices) default_devices="true" ;; - --without-default-devices) default_devices="no" + --without-default-devices) default_devices="false" ;; --without-default-features) # processed above ;; @@ -5541,11 +5541,6 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak -if test "$default_devices" = "yes" ; then - echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak -else - echo "CONFIG_MINIKCONF_MODE=--allnoconfig" >> $config_host_mak -fi if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi @@ -6498,7 +6493,7 @@ NINJA=$ninja $meson setup \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ - -Dattr=$attr \ + -Dattr=$attr -Ddefault_devices=$default_devices \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 341eadaa5c..4d331405e4 100644 --- a/meson.build +++ b/meson.build @@ -1276,7 +1276,8 @@ foreach target : target_dirs output: config_devices_mak, depfile: config_devices_mak + '.d', capture: true, - command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], + command: [minikconf, + get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', host_kconfig, accel_kconfig]) @@ -2469,7 +2470,7 @@ summary_info += {'capstone': capstone_opt == 'disabled' ? false : capst summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')} summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')} summary_info += {'libudev': libudev.found()} -summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'} +summary_info += {'default devices': get_option('default_devices')} summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')} summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} if config_host.has_key('HAVE_GDB_BIN') diff --git a/meson_options.txt b/meson_options.txt index 8fcec056cd..1d4a71772e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,8 @@ option('qemu_firmwarepath', type : 'string', value : '', option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build [$sphinx_build] for building document (default to be empty)') +option('default_devices', type : 'boolean', value : true, + description: 'Include a default selection of devices in emulators') option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') option('gettext', type : 'feature', value : 'auto',