From nobody Fri May 3 04:39:24 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622725778; cv=none; d=zohomail.com; s=zohoarc; b=jefLhuKxrLsRd52EgWhZBTbfdgQFmitv9TlZKQ/nHsi7BL9u3/WYY7ebCe76X/f51pCRZrtw8ZlXBEaTj3VLxqptPaFO6osmYii0yMhJTgomZstlspFra8Dx71lJyiM3MmsMNGARSBv2ZsljkPMTEGd6FwGpofb+k/LgpsYnoJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622725778; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PjUTCXCnxwAcJKYCDMyAMuStN1x2DBiriMNfDrPFCPg=; b=n8qdy9bOCuPT8HAFwDEZ1p3QWljmD5+Eg2azPRWE5TakWqQnSil5fJnu3evFichxotQsICSi3a4HvrrvqJibbWz8hRVtHj4ahWx1zK4VgfG3uV92GPJk8USWvBUYxcHbH5w/jcE9dDGHuEnFzqwnqMvnc0Ks64nMz2qiVW/ODkw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622725778238305.76201353376484; Thu, 3 Jun 2021 06:09:38 -0700 (PDT) Received: from localhost ([::1]:55852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lon6O-0000Em-KX for importer2@patchew.org; Thu, 03 Jun 2021 09:09:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lon4f-0006lF-2q; Thu, 03 Jun 2021 09:07:49 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:40550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lon4b-0004Ke-H2; Thu, 03 Jun 2021 09:07:48 -0400 Received: by mail-ej1-x635.google.com with SMTP id jt22so9137109ejb.7; Thu, 03 Jun 2021 06:07:43 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id dh18sm1734855edb.92.2021.06.03.06.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 06:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PjUTCXCnxwAcJKYCDMyAMuStN1x2DBiriMNfDrPFCPg=; b=uoPHpjDYiu49RLQyosQbgmTNGi5rgSvjap2bPvzIwFdKGkpRbQEFsYfIFqeRt90bCy JmMZvRiGFYXa17ri9mMGL1o1Hxq3zY2P1JgfynltlOvrz/d2Vp6oIu4CU+fxMei6xqyI /lKQhyhpgxsIlTrgGjoYpO4UG6Is+Vlxh3FIhTp/7YS9kEfogd18/uNVX+kXx02QUfv2 EGZwgfvI2zBjKtj/Qp/pGkpi7iFviesfeqoebuU/SHgTugAWVAKM/9qbmNuUld4/ayDJ cbq8ySeciNnVKUEJRqzJFXFVdWGOO9CZ3tcWs5gj5QP0OGNjhyGSMdaOWE24uiH8+ert VjFw== 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=PjUTCXCnxwAcJKYCDMyAMuStN1x2DBiriMNfDrPFCPg=; b=VbTWm2ILuPLOHUMMcbMJm1MtAWurMZQF4y9z4zQPW7H03EMxZuk5kEj65WMgKWDMfa lm0yL0e0LnNHyPQTTyI4ifCsawuU2tpIiEaPhXgLJR0ygnI9L7ntBotdbT84IVCbQu0J z94jTit3scuLvcGnIMmtdbu880+gVDLkPzwxJrnCri7s9ZqYlt8K6tbpBuKEENNmrKoN qdB1G9rkwRffbxzDBurMbxjCpyWLOVkJoSHdHmoLvKpMc0f4eFECdgqrpr64QCFbZM/L 2/ADoj+yucVj+1S78LpHFsAExFbInjqM4xrpGZzffna/sLVBXleo3wlMweM6GtmvhA2c kovg== X-Gm-Message-State: AOAM53020sg8M/nFFPhmgaPP8MNUcA6VSrzq65OKmBbcNRfigIe1659X pVMzO9+OjjDYIEWdKJrR+QGxE6m2BHseJA== X-Google-Smtp-Source: ABdhPJzdCITPj+JvRIkrqn6N9yeiByZaOqg/K6U5iLkC6MpkgJCh0OTzFy8WyML/MGPcPjipjZKkFQ== X-Received: by 2002:a17:906:5495:: with SMTP id r21mr39734072ejo.471.1622725662759; Thu, 03 Jun 2021 06:07:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 1/2] meson: allow optional dependencies for block modules Date: Thu, 3 Jun 2021 15:07:31 +0200 Message-Id: <20210603130732.208065-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210603130732.208065-1-pbonzini@redhat.com> References: <20210603130732.208065-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.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.248, 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: kwolf@redhat.com, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Right now all dependencies for block modules are passed to module_ss.add(when: ...), so they are mandatory. In the next patch we will need to add a libm dependency to a module, but libm does not exist on all systems. So, modify the creation of module_ss and modsrc so that dependencies can also be passed to module_ss.add(if_true: ...). While touching the array, remove the useless dependency of the curl module on glib. glib is always linked in QEMU and in fact all other block modules also need it, but they don't have to specify it. Signed-off-by: Paolo Bonzini Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/meson.build | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/block/meson.build b/block/meson.build index e687c54dbc..9e3388f633 100644 --- a/block/meson.build +++ b/block/meson.build @@ -71,19 +71,19 @@ block_modules =3D {} =20 modsrc =3D [] foreach m : [ - [curl, 'curl', [curl, glib], 'curl.c'], - [glusterfs, 'gluster', glusterfs, 'gluster.c'], - [libiscsi, 'iscsi', libiscsi, 'iscsi.c'], - [libnfs, 'nfs', libnfs, 'nfs.c'], - [libssh, 'ssh', libssh, 'ssh.c'], - [rbd, 'rbd', rbd, 'rbd.c'], + [curl, 'curl', files('curl.c')], + [glusterfs, 'gluster', files('gluster.c')], + [libiscsi, 'iscsi', files('iscsi.c')], + [libnfs, 'nfs', files('nfs.c')], + [libssh, 'ssh', files('ssh.c')], + [rbd, 'rbd', files('rbd.c')], ] if m[0].found() + module_ss =3D ss.source_set() + module_ss.add(when: m[0], if_true: m[2]) if enable_modules - modsrc +=3D files(m[3]) + modsrc +=3D module_ss.all_sources() endif - module_ss =3D ss.source_set() - module_ss.add(when: m[2], if_true: files(m[3])) block_modules +=3D {m[1] : module_ss} endif endforeach --=20 2.31.1 From nobody Fri May 3 04:39:24 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622725771; cv=none; d=zohomail.com; s=zohoarc; b=n6F7Cj/mQhRjCIGlsVIUcwOdAsHzAcnU4m1Obf6OWpK6TZAxAhB7XUr0BjULnqinnrb4s/KDxgmeRVhF4CDUgdxXa1HxJ8FfP0XZ7014fat2+6jhrNaF8r6xVchJNu6ptWW7ZsJljLjGKiOfdTvSB5tFOIP/93kmeGavz25xXcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622725771; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qqYqnrlenFog4cY4zspWeuI8Xg7nEVqv+lvAE9Po+qM=; b=cMaI/HHKWWHbihLFl1T2US3MY1LMH72c0zTqbXUk2mwliiDp6SyjsWEy9X/ywW4VEa2KWOCGFG5KtSsQVm6ENhpu4iMzbT8PKMxRp3EZvDp30vGzedRSMIjIOi3IEMR5BKq6xFomDEK0lCkHNoJ6oddyfiKURBRoJ0tgLiuuuvA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622725771485884.3168809046416; Thu, 3 Jun 2021 06:09:31 -0700 (PDT) Received: from localhost ([::1]:55444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lon6I-0008O3-Ae for importer2@patchew.org; Thu, 03 Jun 2021 09:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lon4d-0006kb-U6; Thu, 03 Jun 2021 09:07:47 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:44612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lon4b-0004Lo-Aa; Thu, 03 Jun 2021 09:07:47 -0400 Received: by mail-ej1-x62d.google.com with SMTP id c10so9084108eja.11; Thu, 03 Jun 2021 06:07:44 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id dh18sm1734855edb.92.2021.06.03.06.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 06:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qqYqnrlenFog4cY4zspWeuI8Xg7nEVqv+lvAE9Po+qM=; b=OoMvNTKhucnOUqAdhn/j15ZlkIP7p9TJanasWD2IGr+JlGgu+TNfpTWT0b4d/Dl6oT LFYrYRAmH4eJZO6VFD94OgQH4GuNl7LzGZ/VVQfMx4xPzsZuMo+l7+VjKjb8h1TDlPvt ttHR/RPK8IanwHf/UB3F3dcXJZvIDjbS0PD1cxqXH+YTVzJzP9H2oTgcpdwEjFDsGdLO AXKe7lO1kktcvkrkKO5stopuOKoiaeZSpy4oARKl1iYnZE4AzD8H0X9kIUVlUz7tXWjN tcwWucZETujmVTxh+1h90aKlYSv0/3S8pLa3HOl1bjJC1ZOsslsLT392Nxdr8axvYJhH za6Q== 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=qqYqnrlenFog4cY4zspWeuI8Xg7nEVqv+lvAE9Po+qM=; b=QT3qxNncjV5QIfS+I0XEdz13KAUF8Lkop5MfA2vLHjM38KvZJo1Li0BaFM3p+TFbEH 8dWLI9O36TcakYbPlMGXuy6Jpk0C8J1wy4z0aIVzDu7ysTLwKMFnm7sTHbkl3mhFPGB7 R1i8IgfpUbxtRXhYHUTHnsurtd8r7H8MgwaIY6j2RNES6yt1ZeQ7809O6ohf/GQAVmx0 QTWO5ztokam89K5v4iWStsKMwwWVllP+tZ3laLMz7yiDmdg4BQu//3jBIE0+ZdOqg1Vl ZoqmCikDxmwyd+yswRrK7EjX3RSyhCZkuQfBQ5uIkXT6NCU9oDwFs8XH5Ny1AEhvnW+F ZePw== X-Gm-Message-State: AOAM533N7Z0OePbPJNNApIRRMFK6uGaKXbWc1P4O+2+qycXgh2RNndEU mfjmUaErjMFcg0hODLmIasik/n7yWpSPnw== X-Google-Smtp-Source: ABdhPJwPLLEf2K7Eh31/9LJFiFut+emH9D9XtFjXIVXm8nzgWNdYLe8NbUvMgukLNU0CJ5iR6XcLFQ== X-Received: by 2002:a17:906:7f0e:: with SMTP id d14mr26181760ejr.103.1622725663553; Thu, 03 Jun 2021 06:07:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 2/2] iscsi: link libm into the module Date: Thu, 3 Jun 2021 15:07:32 +0200 Message-Id: <20210603130732.208065-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210603130732.208065-1-pbonzini@redhat.com> References: <20210603130732.208065-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; 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.248, 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: kwolf@redhat.com, Yi Sun , qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Depending on the configuration of QEMU, some binaries might not need libm at all. In that case libiscsi, which uses exp(), will fail to load. Link it in the module explicitly. Reported-by: Yi Sun Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- block/meson.build | 2 +- meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/meson.build b/block/meson.build index 9e3388f633..01861e1545 100644 --- a/block/meson.build +++ b/block/meson.build @@ -73,7 +73,7 @@ modsrc =3D [] foreach m : [ [curl, 'curl', files('curl.c')], [glusterfs, 'gluster', files('gluster.c')], - [libiscsi, 'iscsi', files('iscsi.c')], + [libiscsi, 'iscsi', [files('iscsi.c'), libm]], [libnfs, 'nfs', files('nfs.c')], [libssh, 'ssh', files('ssh.c')], [rbd, 'rbd', files('rbd.c')], diff --git a/meson.build b/meson.build index a45f1a844f..913cf2a41a 100644 --- a/meson.build +++ b/meson.build @@ -163,7 +163,7 @@ if targetos !=3D 'linux' and get_option('multiprocess')= .enabled() endif multiprocess_allowed =3D targetos =3D=3D 'linux' and not get_option('multi= process').disabled() =20 -m =3D cc.find_library('m', required: false) +libm =3D cc.find_library('m', required: false) util =3D cc.find_library('util', required: false) winmm =3D [] socket =3D [] @@ -1899,7 +1899,7 @@ util_ss.add_all(trace_ss) util_ss =3D util_ss.apply(config_all, strict: false) libqemuutil =3D static_library('qemuutil', sources: util_ss.sources() + stub_ss.sources(= ) + genh, - dependencies: [util_ss.dependencies(), m, gli= b, socket, malloc, pixman]) + dependencies: [util_ss.dependencies(), libm, = glib, socket, malloc, pixman]) qemuutil =3D declare_dependency(link_with: libqemuutil, sources: genh + version_res) =20 --=20 2.31.1