From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039564220736.2931997470912; Tue, 12 Oct 2021 04:52:44 -0700 (PDT) Received: from localhost ([::1]:55986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGKp-0002gs-6A for importer@patchew.org; Tue, 12 Oct 2021 07:52:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFiX-00009m-6l for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:09 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:34745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiV-0007Sc-BE for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:08 -0400 Received: by mail-ed1-x52a.google.com with SMTP id g10so78904039edj.1 for ; Tue, 12 Oct 2021 04:13:06 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OnOlAgAuAHHd3s++OPWKn4r+CPQeiw5c9+4+OZCGJUc=; b=FrsnssRShUrsdFGp7Y4p8ghh9zFNb9XxS9kVpTnr4yXfO1Yn85IT1LgUYROcIeSksk +jYb/j9IbRjFT9hQIitx9YxS5CFPYEGCt6/d9e7y/jhKxHbr+evvD0VORq1C3JbbSN3U Tqpe62ssXVLY+gupc+wvkWash9Y0Pdc6tL10Cyq+g/IVtEiDsL35aVVoXCWRZ/MomCI5 JcumjMvU6BLaKEwVdZ+MsdB5jr5537bWAWERdQEQiZmqpKGXa8/ILxf4QFpVrb+3/hSm QNjZLRg0A3q+ZIPUPtPehTsSsmzEYm0KSdG+MuSkYQIBvbVQk3k8R7WJwWMBrwBSvqED //7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OnOlAgAuAHHd3s++OPWKn4r+CPQeiw5c9+4+OZCGJUc=; b=jpnSw+R+tLaC850Ovh4RFJjJgdVW0V1PQjb7YrDZ8I0lJr4QFkb2p2ziAdTHmoDzsR yIJbUTByzhE+BPgUgr2un4EbH4zsO6QBbCgHMwoPVktOdBqWt6qfbbzXLOem+tGoOhyu qdCtNvDLxaNa76t35K+hlPgLJ6k74TdVUH0HRnnTSQsVgPDSQxKgmcnROFLgHv6ogM21 mgCf35koOsbheUSw/KxgU8kUJ40rYbTb0nKMgDGklaAsEpUTQa03/70BmEFCoJ8QF2f6 /fzvc5qqPiNQ3ciZwvhFWCHm6jPesz7C0NAnskoDm+jR+9IQIvpTMLhrCMiC39W4Jle7 61rw== X-Gm-Message-State: AOAM530CUBo/fkb702w09A1PuYqUt3dPAhiS5svqmpHFA5jhXAgHRaPy BJePX0kmJlAkNvXuT8JqLj1HsOzMsgA= X-Google-Smtp-Source: ABdhPJy4lJLSnx188V1or1lYkMA3A0zHrKu8aWmevsjysvuvUn6DxbdaeYekd/6HKOaI+BxsVaesog== X-Received: by 2002:a05:6402:5113:: with SMTP id m19mr49062633edd.231.1634037184995; Tue, 12 Oct 2021 04:13:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 01/24] configure: remove --oss-lib Date: Tue, 12 Oct 2021 13:12:39 +0200 Message-Id: <20211012111302.246627-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffman Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039566051100001 OSS is a kernel API, so the option should not be needed. The library is used on NetBSD, where OSS is emulated, so keep the variable. Cc: Gerd Hoffman Cc: Volker R=C3=BCmelin Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Message-Id: <20211007130630.632028-2-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure b/configure index 877bf3d76a..ab6bc0c994 100755 --- a/configure +++ b/configure @@ -1007,8 +1007,6 @@ for opt do ;; --enable-gettext) gettext=3D"enabled" ;; - --oss-lib=3D*) oss_lib=3D"$optarg" - ;; --audio-drv-list=3D*) audio_drv_list=3D"$optarg" ;; --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') @@ -1815,7 +1813,6 @@ Advanced options (experts only): --disable-slirp disable SLIRP userspace network connectivity --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, expe= rimental and slow) --enable-malloc-trim enable libc malloc_trim() for memory optimizati= on - --oss-lib path to OSS library --cpu=3DCPU Build for host CPU [$cpu] --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634038362214869.5934752640717; Tue, 12 Oct 2021 04:32:42 -0700 (PDT) Received: from localhost ([::1]:45482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maG1Q-0000x4-R9 for importer@patchew.org; Tue, 12 Oct 2021 07:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFiX-00009n-7J for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:09 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:41705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiV-0007TH-Db for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:08 -0400 Received: by mail-ed1-x529.google.com with SMTP id a25so63794924edx.8 for ; Tue, 12 Oct 2021 04:13:07 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E74LozYXLQeg3/h24qw4fjp5+YO7btMJIso2OgGHhA8=; b=IN7hTNezQ9MxmQKg66nAXWZVT/AxjmGLK0KBKPIv+xXlD5W/7jOBcTPAfuIaBY+FmR 5uKHSA2SoLLr1A3RN0AXsBpV5ngb+xL5sc+/pQ8J0NZVLGLwdvlEOTgX9EQhcSu7+MrU wLAHp0Uef7ctGoMI3FJDTsYyD+CDcs227XUPEI1H9b5bWZYObb7XdrWbDBKgmgCubZeZ jtxShenoHe+YV2gXviAqmcX5wHNgrz01Yo7uAeFWrVuN1QesueRuCnnqe37u0pdES+7O ONvuNC1mxVwnX0vslfWmaffMmyea5IIBrjMgy+CLbXgXVuCBzQpP/xLnklSgcI38UMrr Y0hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=E74LozYXLQeg3/h24qw4fjp5+YO7btMJIso2OgGHhA8=; b=5+C6I+pFSnyhRkgx7mbH3EoJDNmxj8lkCIU8zBRQd+DWdug9r63JjQ8zA/KmdmbODg Z5zs2DKFA6AJC9ihD06CF/V0rUyzrujLbQbYmm/IQnSu5XlDVrtfm9ilogudhkNOXNB8 tP1ly1wKXKGn721Wn0NYgE9EU/ytHhf7s9HJxJ+Ns+Ch+1lNF4kEz/cJ9vLjezA+eIYy d2I0PyySkLPjdNgTGcgNeZcBDo1spHdL5JXNgibRJluOLDbzilRJOIaksQk1bG3fxjmi LdNVnintOknwrRqVz1q5t5UJJ9VWM5rgA5v0zDO3sdKp+2HY9w7wzGUNxYVYl1A3IB59 jL5g== X-Gm-Message-State: AOAM531eWId4MDx645xl0LMKsrqE7cEXStvjZFlGf4knk5uOgIELfxHO KDI+abGfWVJxhZXErDSs9AkjsFlXVac= X-Google-Smtp-Source: ABdhPJzLsu2s3jMPF6LV0mUFXbnAKuZq3ZwBmRcO/AFbtjccKI7rHoLiHBdgsWCMzY+vVmj+PWferA== X-Received: by 2002:a05:6402:5215:: with SMTP id s21mr44899831edd.113.1634037185867; Tue, 12 Oct 2021 04:13:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 02/24] audio: remove CONFIG_AUDIO_WIN_INT Date: Tue, 12 Oct 2021 13:12:40 +0200 Message-Id: <20211012111302.246627-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffman Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038364387100001 Ever since winwaveaudio was removed in 2015, CONFIG_AUDIO_WIN_INT is only set if dsound is in use, so use CONFIG_AUDIO_DSOUND directly. Cc: Gerd Hoffman Cc: Volker R=C3=BCmelin Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130630.632028-3-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- audio/meson.build | 4 ++-- configure | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/audio/meson.build b/audio/meson.build index 7d53b0f920..9a95c58f18 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -8,8 +8,8 @@ softmmu_ss.add(files( )) =20 softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files= ('coreaudio.c')) -softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsou= ndaudio.c')) -softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_i= nt.c')) +softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], + if_true: files('dsoundaudio.c', 'audio_win_int.c')) =20 audio_modules =3D {} foreach m : [ diff --git a/configure b/configure index ab6bc0c994..6a6273ce7b 100755 --- a/configure +++ b/configure @@ -245,7 +245,6 @@ block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" block_drv_whitelist_tools=3D"no" host_cc=3D"cc" -audio_win_int=3D"" libs_qga=3D"" debug_info=3D"yes" lto=3D"false" @@ -3075,7 +3074,6 @@ for drv in $audio_drv_list; do =20 dsound) dsound_libs=3D"-lole32 -ldxguid" - audio_win_int=3D"yes" ;; =20 oss) @@ -4560,9 +4558,6 @@ if test "$libjack" =3D "yes" ; then echo "CONFIG_LIBJACK=3Dy" >> $config_host_mak fi echo "JACK_LIBS=3D$jack_libs" >> $config_host_mak -if test "$audio_win_int" =3D "yes" ; then - echo "CONFIG_AUDIO_WIN_INT=3Dy" >> $config_host_mak -fi echo "CONFIG_BDRV_RW_WHITELIST=3D$block_drv_rw_whitelist" >> $config_host_= mak echo "CONFIG_BDRV_RO_WHITELIST=3D$block_drv_ro_whitelist" >> $config_host_= mak if test "$block_drv_whitelist_tools" =3D "yes" ; then --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039692328669.0820524422307; Tue, 12 Oct 2021 04:54:52 -0700 (PDT) Received: from localhost ([::1]:34594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGMt-0007D2-6M for importer@patchew.org; Tue, 12 Oct 2021 07:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFiY-0000By-Jz for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:11 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:34746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiW-0007TK-1m for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:10 -0400 Received: by mail-ed1-x52a.google.com with SMTP id g10so78904443edj.1 for ; Tue, 12 Oct 2021 04:13:07 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4o8XZSbKgfkUpkWyhbv9zsUcNaw+8qN2h8QQb1qjkVw=; b=LhGk4irX9nLpAxqkTorveKwTd8YQvrFjH86URaqPZRv2GxJusdlrbCuNpF2FjakxPj gT3pz5yTSQ+fGuV0um+WV/Q7xDdSfZk3GlxSdFaxboIFMKuI/Z9vSBJ+iCt58PEVtyua Q302WINBtuX3wKMp1ZuRdSFc4fszy+qrwIl06eW/Wyx3VwgFnpvMGMSscEfrtXfax25N g9DuoRVZ024Q+g/ES6ui6oyWFzXt4Qc/5L3b5Gs5kT/8ArFR6+qROoQtdZo+tOi51J1i rUkXJI3rgsMw7n2nSgSQTW1/35iMXWZWF63uD6b+ouHu2gWe7AGAWPLmaIoAKE5VZ1PG yOWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4o8XZSbKgfkUpkWyhbv9zsUcNaw+8qN2h8QQb1qjkVw=; b=bTKJwi7wBzLnnTjUPA006cbZQkbthWk1zES6oWs/s8UScgib/zELTB2t38CEdrYjIR ekZ/kfXhD651BBrrykVPwgc1fb7meQmj8FCXRoa2bySKszCRFICvz5QtRJAbWDeMavUD 1xgxGs5TuAwPWHvIUrRl9MzFhytJyUVNXQvej5sD8FPeYsOSlOxdTVwJUCo8EeSZL/07 N5qx+ED503YFl6Of3blfD6Qo4xpgxGxE8oOmClaX1HkzI5YJJf7jKAIhZvDB91t/ubla 7x8XPIFRtwf5ItwUb10TFWkgE7kreqiAuwshYuFP3xz+Tpsr/od+r5cMO154ILP3cvVk ditg== X-Gm-Message-State: AOAM531gswSI4KAyWUETuS6rTAxWYQfMnkiN8pLuyR+8XW0i1ct4Y0Gz QWcR7ixzpiJCrpE75TahUyuANNz76Lc= X-Google-Smtp-Source: ABdhPJz0+UrPXXDZnSG5AgOSn43+lJ4JHDQsJ+EW3psSmT9ImL3mfAewMm4+csGMuAlSzTMuQykqBw== X-Received: by 2002:a05:6402:11ca:: with SMTP id j10mr15107477edw.223.1634037186732; Tue, 12 Oct 2021 04:13:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 03/24] configure, meson: move audio driver detection to Meson Date: Tue, 12 Oct 2021 13:12:41 +0200 Message-Id: <20211012111302.246627-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffman Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039693559100001 This brings a change that makes audio drivers more similar to all other modules. All drivers are built by default, while --audio-drv-list only governs the default choice of the audio driver. Meson options are added to disable the drivers, and the next patches will fix the help messages and command line options, and especially make the non-default drivers available via -audiodev. Cc: Gerd Hoffman Cc: Volker R=C3=BCmelin Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130630.632028-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- audio/meson.build | 23 +++--- configure | 184 +--------------------------------------------- meson.build | 137 +++++++++++++++++++++++++++++----- meson_options.txt | 18 ++++- 4 files changed, 147 insertions(+), 215 deletions(-) diff --git a/audio/meson.build b/audio/meson.build index 9a95c58f18..462533bb8c 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -7,23 +7,22 @@ softmmu_ss.add(files( 'wavcapture.c', )) =20 -softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files= ('coreaudio.c')) -softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], - if_true: files('dsoundaudio.c', 'audio_win_int.c')) +softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.c')) +softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_in= t.c')) =20 audio_modules =3D {} foreach m : [ - ['CONFIG_AUDIO_ALSA', 'alsa', alsa, 'alsaaudio.c'], - ['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'], - ['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'], - ['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'], - ['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c'], - ['CONFIG_SPICE', 'spice', spice, 'spiceaudio.c'] + ['alsa', alsa, files('alsaaudio.c')], + ['oss', oss, files('ossaudio.c')], + ['pa', pulse, files('paaudio.c')], + ['sdl', sdl, files('sdlaudio.c')], + ['jack', jack, files('jackaudio.c')], + ['spice', spice, files('spiceaudio.c')] ] - if config_host.has_key(m[0]) + if m[1].found() module_ss =3D ss.source_set() - module_ss.add(when: m[2], if_true: files(m[3])) - audio_modules +=3D {m[1] : module_ss} + module_ss.add(m[1], m[2]) + audio_modules +=3D {m[0] : module_ss} endif endforeach =20 diff --git a/configure b/configure index 6a6273ce7b..fcadcf9577 100755 --- a/configure +++ b/configure @@ -240,7 +240,7 @@ interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -audio_drv_list=3D"" +audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" block_drv_whitelist_tools=3D"no" @@ -299,7 +299,6 @@ fdt=3D"auto" netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" -coreaudio=3D"auto" virtiofsd=3D"auto" virtfs=3D"auto" libudev=3D"auto" @@ -356,7 +355,6 @@ module_upgrades=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" slirp=3D"auto" -oss_lib=3D"" bsd=3D"no" linux=3D"no" solaris=3D"no" @@ -703,54 +701,35 @@ fi case $targetos in MINGW32*) mingw32=3D"yes" - audio_possible_drivers=3D"dsound sdl" - if check_include dsound.h; then - audio_drv_list=3D"dsound" - else - audio_drv_list=3D"" - fi supported_os=3D"yes" plugins=3D"no" pie=3D"no" ;; GNU/kFreeBSD) bsd=3D"yes" - audio_drv_list=3D"oss try-sdl" - audio_possible_drivers=3D"oss sdl pa" ;; FreeBSD) bsd=3D"yes" bsd_user=3D"yes" make=3D"${MAKE-gmake}" - audio_drv_list=3D"oss try-sdl" - audio_possible_drivers=3D"oss sdl pa" # needed for kinfo_getvmmap(3) in libutil.h netmap=3D"" # enable netmap autodetect ;; DragonFly) bsd=3D"yes" make=3D"${MAKE-gmake}" - audio_drv_list=3D"oss try-sdl" - audio_possible_drivers=3D"oss sdl pa" ;; NetBSD) bsd=3D"yes" make=3D"${MAKE-gmake}" - audio_drv_list=3D"oss try-sdl" - audio_possible_drivers=3D"oss sdl" - oss_lib=3D"-lossaudio" ;; OpenBSD) bsd=3D"yes" make=3D"${MAKE-gmake}" - audio_drv_list=3D"try-sdl" - audio_possible_drivers=3D"sdl" ;; Darwin) bsd=3D"yes" darwin=3D"yes" - audio_drv_list=3D"try-coreaudio try-sdl" - audio_possible_drivers=3D"coreaudio sdl" # Disable attempts to use ObjectiveC features in os/object.h since they # won't work when we're compiling with gcc as a C compiler. QEMU_CFLAGS=3D"-DOS_OBJECT_USE_OBJC=3D0 $QEMU_CFLAGS" @@ -759,10 +738,6 @@ SunOS) solaris=3D"yes" make=3D"${MAKE-gmake}" smbd=3D"${SMBD-/usr/sfw/sbin/smbd}" - if test -f /usr/include/sys/soundcard.h ; then - audio_drv_list=3D"oss try-sdl" - fi - audio_possible_drivers=3D"oss sdl" # needed for CMSG_ macros in sys/socket.h QEMU_CFLAGS=3D"-D_XOPEN_SOURCE=3D600 $QEMU_CFLAGS" # needed for TIOCWIN* defines in termios.h @@ -774,8 +749,6 @@ Haiku) QEMU_CFLAGS=3D"-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_C= FLAGS" ;; Linux) - audio_drv_list=3D"try-pa oss" - audio_possible_drivers=3D"oss alsa sdl pa" linux=3D"yes" linux_user=3D"yes" vhost_user=3D${default_feature:-yes} @@ -1795,7 +1768,6 @@ Advanced options (experts only): --disable-werror disable compilation abort on warning --disable-stack-protector disable compiler-provided stack protection --audio-drv-list=3DLIST set audio drivers list: - Available drivers: $audio_possible_drivers --block-drv-whitelist=3DL Same as --block-drv-rw-whitelist=3DL --block-drv-rw-whitelist=3DL set block driver read-write whitelist @@ -2398,12 +2370,6 @@ if test -z "$want_tools"; then fi fi =20 -########################################## -# Disable features only meaningful for system-mode emulation -if test "$softmmu" =3D "no"; then - audio_drv_list=3D"" -fi - ########################################## # L2TPV3 probe =20 @@ -2982,130 +2948,6 @@ EOF fi fi =20 -########################################## -# detect CoreAudio -if test "$coreaudio" !=3D "no" ; then - coreaudio_libs=3D"-framework CoreAudio" - cat > $TMPC << EOF -#include -int main(void) -{ - return (int)AudioGetCurrentHostTime(); -} -EOF - if compile_prog "" "$coreaudio_libs" ; then - coreaudio=3Dyes - else - coreaudio=3Dno - fi -fi - -########################################## -# Sound support libraries probe - -audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/,/ /g') -for drv in $audio_drv_list; do - case $drv in - alsa | try-alsa) - if $pkg_config alsa --exists; then - alsa_libs=3D$($pkg_config alsa --libs) - alsa_cflags=3D$($pkg_config alsa --cflags) - alsa=3Dyes - if test "$drv" =3D "try-alsa"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-alsa= /alsa/') - fi - else - if test "$drv" =3D "try-alsa"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-alsa= //') - else - error_exit "$drv check failed" \ - "Make sure to have the $drv libs and headers installed." - fi - fi - ;; - - pa | try-pa) - if $pkg_config libpulse --exists; then - libpulse=3Dyes - pulse_libs=3D$($pkg_config libpulse --libs) - pulse_cflags=3D$($pkg_config libpulse --cflags) - if test "$drv" =3D "try-pa"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-pa/p= a/') - fi - else - if test "$drv" =3D "try-pa"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-pa//= ') - else - error_exit "$drv check failed" \ - "Make sure to have the $drv libs and headers installed." - fi - fi - ;; - - sdl) - if test "$sdl" =3D "no"; then - error_exit "sdl not found or disabled, can not use sdl audio drive= r" - fi - ;; - - try-sdl) - if test "$sdl" =3D "no"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-sdl//') - else - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-sdl/sdl/= ') - fi - ;; - - coreaudio | try-coreaudio) - if test "$coreaudio" =3D "no"; then - if test "$drv" =3D "try-coreaudio"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o//') - else - error_exit "$drv check failed" \ - "Make sure to have the $drv is available." - fi - else - coreaudio_libs=3D"-framework CoreAudio" - if test "$drv" =3D "try-coreaudio"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o/coreaudio/') - fi - fi - ;; - - dsound) - dsound_libs=3D"-lole32 -ldxguid" - ;; - - oss) - oss_libs=3D"$oss_lib" - ;; - - jack | try-jack) - if $pkg_config jack --exists; then - libjack=3Dyes - jack_libs=3D$($pkg_config jack --libs) - if test "$drv" =3D "try-jack"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-jack= /jack/') - fi - else - if test "$drv" =3D "try-jack"; then - audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-jack= //') - else - error_exit "$drv check failed" \ - "Make sure to have the $drv libs and headers installed." - fi - fi - ;; - - *) - echo "$audio_possible_drivers" | grep -q "\<$drv\>" || { - error_exit "Unknown driver '$drv' selected" \ - "Possible drivers are: $audio_possible_drivers" - } - ;; - esac -done - ########################################## # plugin linker support probe =20 @@ -4536,28 +4378,6 @@ fi if test "$gprof" =3D "yes" ; then echo "CONFIG_GPROF=3Dy" >> $config_host_mak fi -echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $config_host_mak -for drv in $audio_drv_list; do - def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') - echo "$def=3Dy" >> $config_host_mak -done -if test "$alsa" =3D "yes" ; then - echo "CONFIG_ALSA=3Dy" >> $config_host_mak -fi -echo "ALSA_LIBS=3D$alsa_libs" >> $config_host_mak -echo "ALSA_CFLAGS=3D$alsa_cflags" >> $config_host_mak -if test "$libpulse" =3D "yes" ; then - echo "CONFIG_LIBPULSE=3Dy" >> $config_host_mak -fi -echo "PULSE_LIBS=3D$pulse_libs" >> $config_host_mak -echo "PULSE_CFLAGS=3D$pulse_cflags" >> $config_host_mak -echo "COREAUDIO_LIBS=3D$coreaudio_libs" >> $config_host_mak -echo "DSOUND_LIBS=3D$dsound_libs" >> $config_host_mak -echo "OSS_LIBS=3D$oss_libs" >> $config_host_mak -if test "$libjack" =3D "yes" ; then - echo "CONFIG_LIBJACK=3Dy" >> $config_host_mak -fi -echo "JACK_LIBS=3D$jack_libs" >> $config_host_mak echo "CONFIG_BDRV_RW_WHITELIST=3D$block_drv_rw_whitelist" >> $config_host_= mak echo "CONFIG_BDRV_RO_WHITELIST=3D$block_drv_ro_whitelist" >> $config_host_= mak if test "$block_drv_whitelist_tools" =3D "yes" ; then @@ -5195,7 +5015,7 @@ if test "$skip_meson" =3D no; then -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ - -Dtcg_interpreter=3D$tcg_interpreter \ + -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D$tcg_interp= reter \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index 2d373a61a6..af3cd677f4 100644 --- a/meson.build +++ b/meson.build @@ -428,20 +428,23 @@ vde =3D not_found if config_host.has_key('CONFIG_VDE') vde =3D declare_dependency(link_args: config_host['VDE_LIBS'].split()) endif + pulse =3D not_found -if 'CONFIG_LIBPULSE' in config_host - pulse =3D declare_dependency(compile_args: config_host['PULSE_CFLAGS'].s= plit(), - link_args: config_host['PULSE_LIBS'].split()) +if not get_option('pa').auto() or (targetos =3D=3D 'linux' and have_system) + pulse =3D dependency('libpulse', required: get_option('pa'), + method: 'pkg-config', kwargs: static_kwargs) endif alsa =3D not_found -if 'CONFIG_ALSA' in config_host - alsa =3D declare_dependency(compile_args: config_host['ALSA_CFLAGS'].spl= it(), - link_args: config_host['ALSA_LIBS'].split()) +if not get_option('alsa').auto() or (targetos =3D=3D 'linux' and have_syst= em) + alsa =3D dependency('alsa', required: get_option('alsa'), + method: 'pkg-config', kwargs: static_kwargs) endif jack =3D not_found -if 'CONFIG_LIBJACK' in config_host - jack =3D declare_dependency(link_args: config_host['JACK_LIBS'].split()) +if not get_option('jack').auto() or have_system + jack =3D dependency('jack', required: get_option('jack'), + method: 'pkg-config', kwargs: static_kwargs) endif + spice =3D not_found spice_headers =3D not_found spice_protocol =3D not_found @@ -801,16 +804,59 @@ if liblzfse.found() and not cc.links(''' endif =20 oss =3D not_found -if 'CONFIG_AUDIO_OSS' in config_host - oss =3D declare_dependency(link_args: config_host['OSS_LIBS'].split()) +if not get_option('oss').auto() or have_system + if not cc.has_header('sys/soundcard.h') + # not found + elif targetos =3D=3D 'netbsd' + oss =3D cc.find_library('ossaudio', required: get_option('oss'), + kwargs: static_kwargs) + else + oss =3D declare_dependency() + endif + + if not oss.found() + if get_option('oss').enabled() + error('OSS not found') + else + warning('OSS not found, disabling') + endif + endif endif dsound =3D not_found -if 'CONFIG_AUDIO_DSOUND' in config_host - dsound =3D declare_dependency(link_args: config_host['DSOUND_LIBS'].spli= t()) +if not get_option('dsound').auto() or (targetos =3D=3D 'windows' and have_= system) + if cc.has_header('dsound.h') + dsound =3D declare_dependency(link_args: ['-lole32', '-ldxguid']) + endif + + if not dsound.found() + if get_option('dsound').enabled() + error('DirectSound not found') + else + warning('DirectSound not found, disabling') + endif + endif endif + coreaudio =3D not_found -if 'CONFIG_AUDIO_COREAUDIO' in config_host - coreaudio =3D declare_dependency(link_args: config_host['COREAUDIO_LIBS'= ].split()) +if not get_option('coreaudio').auto() or (targetos =3D=3D 'darwin' and hav= e_system) + coreaudio =3D dependency('appleframeworks', modules: 'CoreAudio', + required: get_option('coreaudio')) + if coreaudio.found() and not cc.links(''' + #include + int main(void) + { + return (int)AudioGetCurrentHostTime(); + }''') + coreaudio =3D not_found + endif + + if not coreaudio.found() + if get_option('coreaudio').enabled() + error('CoreAudio not found') + else + warning('CoreAudio not found, disabling') + endif + endif endif =20 opengl =3D not_found @@ -1156,6 +1202,49 @@ if libbpf.found() and not cc.links(''' endif endif =20 +################# +# config-host.h # +################# + +audio_drivers_selected =3D [] +if have_system + audio_drivers_available =3D { + 'alsa': alsa.found(), + 'coreaudio': coreaudio.found(), + 'dsound': dsound.found(), + 'jack': jack.found(), + 'oss': oss.found(), + 'pa': pulse.found(), + 'sdl': sdl.found(), + } + + # Default to native drivers first, OSS second, SDL third + audio_drivers_priority =3D \ + [ 'pa', 'coreaudio', 'dsound', 'oss' ] + \ + (targetos =3D=3D 'linux' ? [] : [ 'sdl' ]) + audio_drivers_default =3D [] + foreach k: audio_drivers_priority + if audio_drivers_available[k] + audio_drivers_default +=3D k + endif + endforeach + + foreach k: get_option('audio_drv_list') + if k =3D=3D 'default' + audio_drivers_selected +=3D audio_drivers_default + elif not audio_drivers_available[k] + error('Audio driver "@0@" not available.'.format(k)) + else + audio_drivers_selected +=3D k + endif + endforeach +endif +foreach k: audio_drivers_selected + config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), true) +endforeach +config_host_data.set('CONFIG_AUDIO_DRIVERS', + '"' + '", "'.join(audio_drivers_selected) + '", ') + if get_option('cfi') cfi_flags=3D[] # Check for dependency on LTO @@ -1199,10 +1288,6 @@ endif have_host_block_device =3D (targetos !=3D 'darwin' or cc.has_header('IOKit/storage/IOMedia.h')) =20 -################# -# config-host.h # -################# - have_virtfs =3D (targetos =3D=3D 'linux' and have_system and libattr.found() and @@ -1446,7 +1531,7 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.c= ompiles(''' =20 =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target -arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] +arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] strings =3D ['HOST_DSOSUF', 'CONFIG_IASL'] foreach k, v: config_host if ignored.contains(k) @@ -2882,7 +2967,7 @@ if config_host.has_key('CONFIG_MODULES') endif summary_info +=3D {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} if have_system - summary_info +=3D {'Audio drivers': config_host['CONFIG_AUDIO_DRIVER= S']} + summary_info +=3D {'Audio drivers': ' '.join(audio_drivers_selected)} endif summary_info +=3D {'Trace backends': config_host['TRACE_BACKENDS']} if config_host['TRACE_BACKENDS'].split().contains('simple') @@ -3070,6 +3155,18 @@ if vnc.found() summary_info +=3D {'VNC JPEG support': jpeg} summary_info +=3D {'VNC PNG support': png} endif +if targetos not in ['darwin', 'haiku', 'windows'] + summary_info +=3D {'OSS support': oss} +elif targetos =3D=3D 'darwin' + summary_info +=3D {'CoreAudio support': coreaudio} +elif targetos =3D=3D 'windows' + summary_info +=3D {'DirectSound support': dsound} +endif +if targetos =3D=3D 'linux' + summary_info +=3D {'ALSA support': alsa} + summary_info +=3D {'PulseAudio support': pulse} +endif +summary_info +=3D {'JACK support': jack} summary_info +=3D {'brlapi support': brlapi} summary_info +=3D {'vde support': config_host.has_key('CONFIG_VDE')} summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} diff --git a/meson_options.txt b/meson_options.txt index 2c89e79e8b..052c4f088e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,9 +6,12 @@ option('qemu_firmwarepath', type : 'string', value : '', description: 'search PATH for firmware files') option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build [$sphinx_build] for buildi= ng document (default to be empty)') - option('default_devices', type : 'boolean', value : true, description: 'Include a default selection of devices in emulators') +option('audio_drv_list', type: 'array', value: ['default'], + choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', = 'pa', 'sdl'], + description: 'Set audio driver list') + option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') option('gettext', type : 'feature', value : 'auto', @@ -139,6 +142,19 @@ option('fuse', type: 'feature', value: 'auto', option('fuse_lseek', type : 'feature', value : 'auto', description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports') =20 +option('alsa', type: 'feature', value: 'auto', + description: 'ALSA sound support') +option('coreaudio', type: 'feature', value: 'auto', + description: 'CoreAudio sound support') +option('dsound', type: 'feature', value: 'auto', + description: 'DirectSound sound support') +option('jack', type: 'feature', value: 'auto', + description: 'JACK sound support') +option('oss', type: 'feature', value: 'auto', + description: 'OSS sound support') +option('pa', type: 'feature', value: 'auto', + description: 'PulseAudio sound support') + option('vhost_user_blk_server', type: 'feature', value: 'auto', description: 'build vhost-user-blk server') option('virtfs', type: 'feature', value: 'auto', --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634038617594450.7933820415201; Tue, 12 Oct 2021 04:36:57 -0700 (PDT) Received: from localhost ([::1]:55434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maG5Y-0007u0-G5 for importer@patchew.org; Tue, 12 Oct 2021 07:36:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFiY-0000Bx-IB for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:11 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:33333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiW-0007TT-VV for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:10 -0400 Received: by mail-ed1-x52d.google.com with SMTP id p13so80331024edw.0 for ; Tue, 12 Oct 2021 04:13:08 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4xhAlgOh6fkBzCyCRH3NBrlBdiFPisuQXWGp83dUS78=; b=m/wJc27ybXCTKVdkXuR0xvmM0t/Fx4UpQybiHyJfQ0WILT/1RtFS/rufds+ftYmo+w eYl5pRklga2+JTA/Ag2ttS6/IyS18kMVufNlB29o881zImK91ZwF6yKms/CclNFvhiF+ otUES18N457Pusy/9q0ANXLTk0YnTCTzRLrXCtxPsK1DfjSpfbc6aWdeo7ElwNAKZE2g uqV12yX8DKwoU5ttPnV02gCAKMMNkefzFBA5U8KS5Q13hc6T3fuPw6bZYR3e+hLzLX0G +sCzB4ZaXVRRp1/26AcXX4WedfHyHxhj6RdHpwRkq1cUBbXNg5v4W2oWn6B6uzyVmTn5 rg9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4xhAlgOh6fkBzCyCRH3NBrlBdiFPisuQXWGp83dUS78=; b=yTPVRFjSwj3eNZpzTMs7A4fE/Ibtc7M24iiYXYxPYBCIxymF/kBBWRzlQoD/TgRzid x8iR/hyDCVp21WB0sDgyj7iQQPQ6D+NS0jebdWvaSz3g5SZj8oAQvPGWvhsSIdxUZze3 yN+PM4geW613u6BVxRlgVf+glrChIhdIpguWajbyW2wU7QoIG3ZAPP5JiZ7A+Y4UBsNw w4bwcv+FUG1QhuEOPQ7KQf1AKRbB43wAB24c5n17H0zYR8uORwFoggtpTwTC6kdH85xJ h1QPq0Bg/5obQ4CvIIIfn0PIHNOAgltDJKisVXQsPPMiqaTEEgtrhW/v9+a05KHWUTEB AT8w== X-Gm-Message-State: AOAM532C9KE0i4kAfKugK70wFAANnecnKGAtQau3ZXw0B9hSk1Q8vT70 w8OuNVqhCUkB4y5skLc7TEfNEGf5uwc= X-Google-Smtp-Source: ABdhPJxjM2fMi+MtVtC5+ICctRcXSxOHpynIpCanM/nNKW4Wt2z4tx7qKlS80d571lDtTC6FBNKKFQ== X-Received: by 2002:a17:907:784f:: with SMTP id lb15mr31346859ejc.260.1634037187546; Tue, 12 Oct 2021 04:13:07 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 04/24] meson: define symbols for all available audio drivers Date: Tue, 12 Oct 2021 13:12:42 +0200 Message-Id: <20211012111302.246627-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffman Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038619682100001 All drivers are now built by default if the corresponding libraries are available, similar to how all other modules behave; --audio-drv-list only governs the default choice of the audio driver. Adjust the CONFIG_AUDIO_* preprocessor symbols so that they are based on library availability rather than --audio-drv-list, so that the tests and -audiodev help follow the new logic. Cc: Gerd Hoffman Cc: Volker R=C3=BCmelin Signed-off-by: Paolo Bonzini Message-Id: <20211007130630.632028-5-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index af3cd677f4..c0c5b7b9da 100644 --- a/meson.build +++ b/meson.build @@ -1217,6 +1217,9 @@ if have_system 'pa': pulse.found(), 'sdl': sdl.found(), } + foreach k, v: audio_drivers_available + config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v) + endforeach =20 # Default to native drivers first, OSS second, SDL third audio_drivers_priority =3D \ @@ -1239,9 +1242,6 @@ if have_system endif endforeach endif -foreach k: audio_drivers_selected - config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), true) -endforeach config_host_data.set('CONFIG_AUDIO_DRIVERS', '"' + '", "'.join(audio_drivers_selected) + '", ') =20 --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16340380201511011.0000767836684; Tue, 12 Oct 2021 04:27:00 -0700 (PDT) Received: from localhost ([::1]:60540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maFvv-0000RZ-1d for importer@patchew.org; Tue, 12 Oct 2021 07:26:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFiZ-0000DB-TX for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:35371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiX-0007Tb-Ju for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:11 -0400 Received: by mail-ed1-x535.google.com with SMTP id w19so19747747edd.2 for ; Tue, 12 Oct 2021 04:13:09 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/aJ6eQGvd1rKLJWrUxtuPesaanj52usy+8dUhQT+jqs=; b=hV1R/ONwb+vfrqHL+5Uf1CQC6+goSw7CrwUdma5yFO+916FTo4skHomfDtuCOdRbci c5njoFZO0RhdNp3pBL8vwPNwqSz01oji7TaCH2s29hprcj730qGSDSI2AymxvXWiUPPy 1Mt/4w9TjiQU+A5MGD3hwz1UtfL6ekWwkbBGZitNAL2WVmsIw81CZMda60LlIUVPjUK+ b029Y3BkAwlIFmxOO+AtFAcShWKRCOj638cldh04hKJkQc0ojhX9GbDbAEHcYYwhmrwO Y0gqlRvRmJSXnh0W3pLP3AuO1biCn92QAzIUsUZ+bUEgrHqT/oGMqONZQBW5l37rKKvh GvkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/aJ6eQGvd1rKLJWrUxtuPesaanj52usy+8dUhQT+jqs=; b=WVWbuqJ/iRtXbePl/Khjt6sQWCp0jJ0uuq//bz6GQtSZQNnBAMx+gkyXF8iWqjwU5B e4bAfZ/BaQdkiA4zEzdQ6Nd/WEfEMuczrVQP7kWaXxDCxX4GBrneeGGEAe8sQsOuJel2 oy7tnHLq7UDyVupemjjGpOImvMDIIFv9BpIUQKIsVWyTDcC11f32WhGY01M80obpq0Pb kZVeM0vkE1/Q+4tWXadOxFMR5UjKo3iDMmeXX8YwIkfk+0ImNjvy7/U/D+lYaxN0QZ5x af/wcyzl6CEjlMm9UWUW/us3RCun2aREWfbbeAC7y5HmKoUkRIm+P00s5QlAkJrBWjwl O/iA== X-Gm-Message-State: AOAM533wJJFGMy+MXtm4zXylivDKsBeeW1C5EQMCjOFtAfFpgs+Mngka m0l1sm8DNwepEzHAwKQaILz9naUpyHM= X-Google-Smtp-Source: ABdhPJyR1vh+jhiReIXR7Pz4pTAvfFW44RWKoVj66bVvAYT/wo5Ii7XjpU4ChjCbL0W7KOpvNrbpqg== X-Received: by 2002:a05:6402:1d52:: with SMTP id dz18mr39111725edb.49.1634037188375; Tue, 12 Oct 2021 04:13:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 05/24] configure: add command line options for audio drivers Date: Tue, 12 Oct 2021 13:12:43 +0200 Message-Id: <20211012111302.246627-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Volker=20R=C3=BCmelin?= , Gerd Hoffman Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038021551100001 Handle the choice of audio drivers the same as all other dependencies. Cc: Gerd Hoffman Cc: Volker R=C3=BCmelin Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130630.632028-6-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/configure b/configure index fcadcf9577..5541671b58 100755 --- a/configure +++ b/configure @@ -310,6 +310,12 @@ vnc_sasl=3D"auto" vnc_jpeg=3D"auto" vnc_png=3D"auto" xkbcommon=3D"auto" +alsa=3D"auto" +coreaudio=3D"auto" +dsound=3D"auto" +jack=3D"auto" +oss=3D"auto" +pa=3D"auto" xen=3D${default_feature:+disabled} xen_ctrl_version=3D"$default_feature" xen_pci_passthrough=3D"auto" @@ -1051,6 +1057,30 @@ for opt do ;; --enable-xen-pci-passthrough) xen_pci_passthrough=3D"enabled" ;; + --disable-alsa) alsa=3D"disabled" + ;; + --enable-alsa) alsa=3D"enabled" + ;; + --disable-coreaudio) coreaudio=3D"disabled" + ;; + --enable-coreaudio) coreaudio=3D"enabled" + ;; + --disable-dsound) dsound=3D"disabled" + ;; + --enable-dsound) dsound=3D"enabled" + ;; + --disable-jack) jack=3D"disabled" + ;; + --enable-jack) jack=3D"enabled" + ;; + --disable-oss) oss=3D"disabled" + ;; + --enable-oss) oss=3D"enabled" + ;; + --disable-pa) pa=3D"disabled" + ;; + --enable-pa) pa=3D"enabled" + ;; --disable-brlapi) brlapi=3D"disabled" ;; --enable-brlapi) brlapi=3D"enabled" @@ -1849,6 +1879,12 @@ disabled with --disable-FEATURE, default is enabled = if available mpath Multipath persistent reservation passthrough xen xen backend driver support xen-pci-passthrough PCI passthrough support for Xen + alsa ALSA sound support + coreaudio CoreAudio sound support + dsound DirectSound sound support + jack JACK sound support + oss OSS sound support + pa PulseAudio sound support brlapi BrlAPI (Braile) curl curl connectivity membarrier membarrier system call (for Linux 4.14+ or Windows) @@ -5015,7 +5051,8 @@ if test "$skip_meson" =3D no; then -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ - -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D$tcg_interp= reter \ + -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ + -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ $cross_arg \ "$PWD" "$source_path" =20 --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634038928381387.56195814550995; Tue, 12 Oct 2021 04:42:08 -0700 (PDT) Received: from localhost ([::1]:33316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGAZ-0003lX-E3 for importer@patchew.org; Tue, 12 Oct 2021 07:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFia-0000DD-7V for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:33340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiY-0007UQ-Ey for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:11 -0400 Received: by mail-ed1-x534.google.com with SMTP id p13so80331276edw.0 for ; Tue, 12 Oct 2021 04:13:10 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MRlmiVmXcuYc6Mg34B85p0pvcJ3Zect+95dIoEbvMUQ=; b=GQ1w31Ugp9XiIZtWK6GPGigiH+sg597Kjnhb2mjCYP8FVs5mnq5MCFTL3LbU8APZfe Hss1eG7hBrx36IOCOZqEiMR+aN0NrkU3ja306xw/lecC9hkyncj9B+7i4mueHGLmXHa7 7HSiHW0c6+Upd1Nhl3Q44zAF/II2JwvcAPxHmfcEk/CABBmc3j1+1nQOJzhhi4GcvKq/ T7D44wtsvmGshU/a+dBvq/eIqd8uKnk6kENBORXf9qMW4vXgDOsvYTgIHoptKsUfPDYl o/NC+b08DOygyS8zuGy3UdiEq3nUDaioPJu606KA8svy4aDFpPx3afzMiiGBTE4sGi0t 0QLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MRlmiVmXcuYc6Mg34B85p0pvcJ3Zect+95dIoEbvMUQ=; b=OpOFUK1X8iTcHsvOHCK3RQ2shxtEsQ9/8FgPD2EHLeFWLZ8MlDHJCM239cOQWWR/Ug I+V9XzX4zrbj5DLWVNhlCl+TUqWdLEzUDGaITfHJTgqrbBq2vC+o6S7K5AgcOVb5upkV ChVT0dkE1H7ro1WNwwfUDm8afb1Qs07h40nrBRrLlnxSvjgn0+Vehs58QWF+iUYG2+fL HheWdCf6p1Hlr9Su9k8sASmQ8bg7vwVvwQo4cAaM+G2dR1mxFE8LAU8ffJwxRLy9jIfI KdRdSXyjMS6XEx5VEM6NaZeIkNtPzbXl2b9uhWtrSI6cKvo2BWclcxjJHW/UsCBVKPfS hvkQ== X-Gm-Message-State: AOAM5322AY7xutH9MAhFphtguc0O4CLG4tzl9Hv3dd4HjhZMjVmSuyeS bZIHobz8WicYsNjZJ2KlsPplDkNLH4Q= X-Google-Smtp-Source: ABdhPJyjZ1ZBWwBcqCg/iCImwY6WuAPk0JJELY5Q1h08S9VFLxNI7WxFwbJAx6oCSvTqMFFNI+Gfpg== X-Received: by 2002:a05:6402:4244:: with SMTP id g4mr10028630edb.158.1634037189191; Tue, 12 Oct 2021 04:13:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 06/24] kconfig: split CONFIG_SPARSE_MEM from fuzzing Date: Tue, 12 Oct 2021 13:12:44 +0200 Message-Id: <20211012111302.246627-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Oleinik Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038929973100001 Pass CONFIG_FUZZ via host_kconfig, and use it to select the sparse-mem device. Cc: Alexander Oleinik Signed-off-by: Paolo Bonzini Reviewed-by: Alexander Bulekov Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Alexander Bulekov Message-Id: <20211007130829.632254-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- Kconfig.host | 4 ++++ hw/mem/Kconfig | 3 +++ hw/mem/meson.build | 2 +- meson.build | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Kconfig.host b/Kconfig.host index 24255ef441..60b9c07b5e 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -41,3 +41,7 @@ config PVRDMA config MULTIPROCESS_ALLOWED bool imply MULTIPROCESS + +config FUZZ + bool + select SPARSE_MEM diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig index 8b19fdc49f..03dbb3c7df 100644 --- a/hw/mem/Kconfig +++ b/hw/mem/Kconfig @@ -8,3 +8,6 @@ config MEM_DEVICE config NVDIMM bool select MEM_DEVICE + +config SPARSE_MEM + bool diff --git a/hw/mem/meson.build b/hw/mem/meson.build index 3c8fdef9f9..82f86d117e 100644 --- a/hw/mem/meson.build +++ b/hw/mem/meson.build @@ -6,4 +6,4 @@ mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'= )) =20 softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss) =20 -softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c')) +softmmu_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c')) diff --git a/meson.build b/meson.build index c0c5b7b9da..5c8a919cfb 100644 --- a/meson.build +++ b/meson.build @@ -1599,6 +1599,7 @@ endif =20 have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') host_kconfig =3D \ + ('CONFIG_FUZZ' in config_host ? ['CONFIG_FUZZ=3Dy'] : []) + \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634038592860735.9670202762637; Tue, 12 Oct 2021 04:36:32 -0700 (PDT) Received: from localhost ([::1]:53734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maG59-0006hK-QE for importer@patchew.org; Tue, 12 Oct 2021 07:36:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFib-0000F1-Sz for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:34749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFiZ-0007Ue-HO for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: by mail-ed1-x52c.google.com with SMTP id g10so78904976edj.1 for ; Tue, 12 Oct 2021 04:13:11 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vnO91AT0hVEuTy55NYcUtVlFDjm+WidN6gDYmUy+GZ4=; b=efR04J8iVaR8nC4GQua1RgvDohILEfqPsMydRaxTSNdKC+XO2HbTl+SBJrxSxMoYWy IvCitDBpMwvNybrckIcg32Qt0rpMPeZaRHgthEgfgJ7iQb1p7ziOfVqX488jv8YXJQcU 8xSu48LTbicJFWqAoKszJV7H6voH8rhj+fVmLH2hC7VhQjFCNtjRseIWoJNfQLT9PTLN SuWDzIAC2qaGAvuwnCH8Aa36v3eQvpwy4rWL0aDIIPLGvie/ilbyMq9mM2XE7iH7IQXP SbR3FD68DOT/zU1WuDCakS2zF3e3FhUngCZ6EYtXKJ3o5qC+tKVOB8oaykvdVfw6BdNc zq+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vnO91AT0hVEuTy55NYcUtVlFDjm+WidN6gDYmUy+GZ4=; b=GIk2bPGwIMc3D5GmywQ0xh5/qSghXlmiiqYjyOB5cQNtONms8Lkvr/2edQoUBzoEU/ hmVKm0FzFvw+kl+wm6DvXTKaUQXgcsNXg/kqFtxW4F3jPyy+hUCSGOUT59PopmZr7iMp xVxqMq+KtoVmLD87y/uNVAAHUqYxmkz3AoSrTcvY3CZiPW8U5MybCVv9eXD+SJjj3Q8G SpQzkIOKr54/9pnd4O/BorH3b6fDavGwDvohUsr+6gJWNmKnCctU4WXju8i9Lgn+WQJD a2mJNFBVuTT4DLe2o+LbrNgcV4ONmBf3EgW0nrnUxw15ifJfMcL/qdrXlsoT0PHITHIU rqrw== X-Gm-Message-State: AOAM530d+X9BitfM2bxzTPUnpNtLXGix0z79S0qhOnVXbs5A61Cf8r8j 0cHvQo1Mi9neyQG7D9oSIIPsNNP56CQ= X-Google-Smtp-Source: ABdhPJw2PD4wStVYYQRVF1jbOYnq6Q2HtuV2gW+ev4A/srsqSpXLo6DiCo+LzpBz3HDt3cxGr5cJkw== X-Received: by 2002:a05:6402:c05:: with SMTP id co5mr34778862edb.65.1634037190077; Tue, 12 Oct 2021 04:13:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 07/24] configure, meson: move fuzzing configuration to Meson Date: Tue, 12 Oct 2021 13:12:45 +0200 Message-Id: <20211012111302.246627-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, Alexander Oleinik Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038594347100001 Content-Type: text/plain; charset="utf-8" Cc: Alexander Oleinik Signed-off-by: Paolo Bonzini Reviewed-by: Alexander Bulekov Tested-by: Alexander Bulekov Message-Id: <20211007130829.632254-2-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 71 +++--------------------------------- meson.build | 51 +++++++++++++++++++++++--- meson_options.txt | 4 ++ tests/qtest/fuzz/meson.build | 6 ++- 4 files changed, 59 insertions(+), 73 deletions(-) diff --git a/configure b/configure index 5541671b58..f5dfcf1a08 100755 --- a/configure +++ b/configure @@ -436,7 +436,7 @@ debug_mutex=3D"no" libpmem=3D"auto" default_devices=3D"true" plugins=3D"$default_feature" -fuzzing=3D"no" +fuzzing=3D"false" rng_none=3D"no" secret_keyring=3D"$default_feature" libdaxctl=3D"auto" @@ -566,15 +566,6 @@ int main(void) { return 0; } EOF } =20 -write_c_fuzzer_skeleton() { - cat > $TMPC < -#include -int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); -int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; } -EOF -} - if check_define __linux__ ; then targetos=3D"Linux" elif check_define _WIN32 ; then @@ -1538,9 +1529,9 @@ for opt do ;; --disable-containers) use_containers=3D"no" ;; - --enable-fuzzing) fuzzing=3Dyes + --enable-fuzzing) fuzzing=3Dtrue ;; - --disable-fuzzing) fuzzing=3Dno + --disable-fuzzing) fuzzing=3Dfalse ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; @@ -4055,26 +4046,6 @@ EOF fi fi =20 -########################################## -# checks for fuzzer -if test "$fuzzing" =3D "yes" ; then - write_c_fuzzer_skeleton - if test -z "${LIB_FUZZING_ENGINE+xxx}"; then - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dfuzzer" ""; then - have_fuzzer=3Dyes - else - error_exit "Your compiler doesn't support -fsanitize=3Dfuzzer" - exit 1 - fi - fi - - have_clang_coverage_filter=3Dno - echo > $TMPTXT - if compile_prog "$CPU_CFLAGS -Werror -fsanitize=3Dfuzzer -fsanitize-cove= rage-allowlist=3D$TMPTXT" ""; then - have_clang_coverage_filter=3Dyes - fi -fi - # Thread sanitizer is, for now, much noisier than the other sanitizers; # keep it separate until that is not the case. if test "$tsan" =3D "yes" && test "$sanitizers" =3D "yes"; then @@ -4700,34 +4671,6 @@ fi if test "$have_mlockall" =3D "yes" ; then echo "HAVE_MLOCKALL=3Dy" >> $config_host_mak fi -if test "$fuzzing" =3D "yes" ; then - # If LIB_FUZZING_ENGINE is set, assume we are running on OSS-Fuzz, and t= he - # needed CFLAGS have already been provided - if test -z "${LIB_FUZZING_ENGINE+xxx}" ; then - # Add CFLAGS to tell clang to add fuzzer-related instrumentation to al= l the - # compiled code. - QEMU_CFLAGS=3D"$QEMU_CFLAGS -fsanitize=3Dfuzzer-no-link" - # To build non-fuzzer binaries with --enable-fuzzing, link everything = with - # fsanitize=3Dfuzzer-no-link. Otherwise, the linker will be unable to = bind - # the fuzzer-related callbacks added by instrumentation. - QEMU_LDFLAGS=3D"$QEMU_LDFLAGS -fsanitize=3Dfuzzer-no-link" - # For the actual fuzzer binaries, we need to link against the libfuzzer - # library. Provide the flags for doing this in FUZZ_EXE_LDFLAGS. The m= eson - # rule for the fuzzer adds these to the link_args. They need to be - # configurable, to support OSS-Fuzz - FUZZ_EXE_LDFLAGS=3D"-fsanitize=3Dfuzzer" - else - FUZZ_EXE_LDFLAGS=3D"$LIB_FUZZING_ENGINE" - fi - - # Specify a filter to only instrument code that is directly related to - # virtual-devices. - if test "$have_clang_coverage_filter" =3D "yes" ; then - cp "$source_path/scripts/oss-fuzz/instrumentation-filter-template" \ - instrumentation-filter - QEMU_CFLAGS=3D"$QEMU_CFLAGS -fsanitize-coverage-allowlist=3Dinstrument= ation-filter" - fi -fi =20 if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak @@ -4791,11 +4734,6 @@ if test "$gcov" =3D "yes" ; then echo "CONFIG_GCOV=3Dy" >> $config_host_mak fi =20 -if test "$fuzzing" !=3D "no"; then - echo "CONFIG_FUZZ=3Dy" >> $config_host_mak -fi -echo "FUZZ_EXE_LDFLAGS=3D$FUZZ_EXE_LDFLAGS" >> $config_host_mak - if test "$rng_none" =3D "yes"; then echo "CONFIG_RNG_NONE=3Dy" >> $config_host_mak fi @@ -5031,7 +4969,8 @@ if test "$skip_meson" =3D no; then -Dstrip=3D$(if test "$strip_opt" =3D yes; then echo true; else ech= o false; fi) \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dcfi_debug=3D$cfi_debug \ + -Db_lto=3D$lto -Dcfi=3D$cfi -Dcfi_debug=3D$cfi_debug -Dfuzzing=3D$= fuzzing \ + $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim -Dsparse=3D$sparse= \ -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf -Dnvmm=3D$nv= mm \ -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ diff --git a/meson.build b/meson.build index 5c8a919cfb..f59acc7677 100644 --- a/meson.build +++ b/meson.build @@ -117,10 +117,37 @@ endforeach =20 # Specify linker-script with add_project_link_arguments so that it is not = placed # within a linker --start-group/--end-group pair -if 'CONFIG_FUZZ' in config_host - add_project_link_arguments(['-Wl,-T,', - (meson.current_source_dir() / 'tests/qtest/= fuzz/fork_fuzz.ld')], +if get_option('fuzzing') + add_project_link_arguments(['-Wl,-T,', + (meson.current_source_dir() / 'tests/qtest/f= uzz/fork_fuzz.ld')], + native: false, language: ['c', 'cpp', 'objc']) + + # Specify a filter to only instrument code that is directly related to + # virtual-devices. + configure_file(output: 'instrumentation-filter', + input: 'scripts/oss-fuzz/instrumentation-filter-template', + copy: true) + add_global_arguments( + cc.get_supported_arguments('-fsanitize-coverage-allowlist=3Dinstrume= ntation-filter'), + native: false, language: ['c', 'cpp', 'objc']) + + if get_option('fuzzing_engine') =3D=3D '' + # Add CFLAGS to tell clang to add fuzzer-related instrumentation to al= l the + # compiled code. To build non-fuzzer binaries with --enable-fuzzing, = link + # everything with fsanitize=3Dfuzzer-no-link. Otherwise, the linker wi= ll be + # unable to bind the fuzzer-related callbacks added by instrumentation. + add_global_arguments('-fsanitize=3Dfuzzer-no-link', + native: false, language: ['c', 'cpp', 'objc']) + add_global_link_arguments('-fsanitize=3Dfuzzer-no-link', native: false, language: ['c', 'cpp', 'objc'= ]) + # For the actual fuzzer binaries, we need to link against the libfuzzer + # library. They need to be configurable, to support OSS-Fuzz + fuzz_exe_ldflags =3D ['-fsanitize=3Dfuzzer'] + else + # LIB_FUZZING_ENGINE was set; assume we are running on OSS-Fuzz, and + # the needed CFLAGS have already been provided + fuzz_exe_ldflags =3D get_option('fuzzing_engine').split() + endif endif =20 add_global_arguments(config_host['QEMU_CFLAGS'].split(), @@ -163,6 +190,17 @@ endif # Target-specific checks and dependencies # ########################################### =20 +if get_option('fuzzing') and get_option('fuzzing_engine') =3D=3D '' and \ + not cc.links(''' + #include + #include + int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); + int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { r= eturn 0; } + ''', + args: ['-Werror', '-fsanitize=3Dfuzzer']) + error('Your compiler does not support -fsanitize=3Dfuzzer') +endif + if targetos !=3D 'linux' and get_option('mpath').enabled() error('Multipath is supported only on Linux') endif @@ -1325,6 +1363,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_= option('prefix') / get_opti 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_FUZZ', get_option('fuzzing')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) @@ -1599,7 +1638,7 @@ endif =20 have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') host_kconfig =3D \ - ('CONFIG_FUZZ' in config_host ? ['CONFIG_FUZZ=3Dy'] : []) + \ + (get_option('fuzzing') ? ['CONFIG_FUZZ=3Dy'] : []) + \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ @@ -2726,7 +2765,7 @@ foreach target : target_dirs 'dependencies': [] }] endif - if config_host.has_key('CONFIG_FUZZ') + if get_option('fuzzing') specific_fuzz =3D specific_fuzz_ss.apply(config_target, strict: fals= e) execs +=3D [{ 'name': 'qemu-fuzz-' + target_name, @@ -2966,7 +3005,7 @@ summary_info +=3D {'module support': config_host.h= as_key('CONFIG_MODULES')} if config_host.has_key('CONFIG_MODULES') summary_info +=3D {'alternative module path': config_host.has_key('CONFI= G_MODULE_UPGRADES')} endif -summary_info +=3D {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} +summary_info +=3D {'fuzzing support': get_option('fuzzing')} if have_system summary_info +=3D {'Audio drivers': ' '.join(audio_drivers_selected)} endif diff --git a/meson_options.txt b/meson_options.txt index 052c4f088e..100c30e967 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,9 +11,13 @@ option('default_devices', type : 'boolean', value : true, option('audio_drv_list', type: 'array', value: ['default'], choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', = 'pa', 'sdl'], description: 'Set audio driver list') +option('fuzzing_engine', type : 'string', value : '', + description: 'fuzzing engine library for OSS-Fuzz') =20 option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') +option('fuzzing', type : 'boolean', value: false, + description: 'build fuzzing targets') option('gettext', type : 'feature', value : 'auto', description: 'Localization of the GTK+ user interface') option('install_blobs', type : 'boolean', value : true, diff --git a/tests/qtest/fuzz/meson.build b/tests/qtest/fuzz/meson.build index 8af6848cd5..189901d4a2 100644 --- a/tests/qtest/fuzz/meson.build +++ b/tests/qtest/fuzz/meson.build @@ -1,3 +1,7 @@ +if not get_option('fuzzing') + subdir_done() +endif + specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c', 'qtest_wrappers.c'), qos) =20 @@ -9,7 +13,7 @@ specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: f= iles('virtio_blk_fuzz. specific_fuzz_ss.add(files('generic_fuzz.c')) =20 fork_fuzz =3D declare_dependency( - link_args: config_host['FUZZ_EXE_LDFLAGS'].split() + + link_args: fuzz_exe_ldflags + ['-Wl,-wrap,qtest_inb', '-Wl,-wrap,qtest_inw', '-Wl,-wrap,qtest_inl', --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039261589152.16092086575975; Tue, 12 Oct 2021 04:47:41 -0700 (PDT) Received: from localhost ([::1]:39784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGFw-0008WV-Hv for importer@patchew.org; Tue, 12 Oct 2021 07:47:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFib-0000F5-Ui for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:46055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFia-0007Un-Ay for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:13 -0400 Received: by mail-ed1-x52d.google.com with SMTP id r18so79804383edv.12 for ; Tue, 12 Oct 2021 04:13:11 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DtMeh3NSVX/hkM+93lmYNjcI2Z0BmyBQyiCE9mpdoTU=; b=RH5ARWpwYzD4CZzPEvt0QN7BS/L2kVKLalp813lqemGoGQ8jqNlKsCEY8MFI6V2U0Q JvgbK9YdHIfNFIFWvNV9lOLh9ZEL9zBfsm5sKl20hg2dly6bGTninQCSHBN+sEngvrsP Yc6hSRzaBYd4fXrY92cDAwfwONixRIO6+wAFSg3DrHXJkdM3SDEnP7gc8gjY0QTkIcZg XIWuBT+ba698wHdH+tb2qewnvIst7dldDcjoFosZTZmX3L5gbbUVgHXVwH4Jog1qzlsQ cC/IdCPZMDZZYxb6xbLv7a/JOxNPzMncljzbwMiEo9PbFZA5Q8QqiufCYVmdHRMR1upO 5tRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DtMeh3NSVX/hkM+93lmYNjcI2Z0BmyBQyiCE9mpdoTU=; b=6LrFX+IgZKruVdl6PHn4wCwTam6eXnvqC2TvvUN2/zMyel51eJjptwkjxCe5TCjIka tIPmzvJTr0Hw4HoC27WOhXPPsBvqLvXqH4bfAINCAbOxcKVRh0cKwPLYXFAFIid90ezw bfgSfc7eymEV0low67NVdKuTWIvucC3OMIAd/eo/CCnGkKgiZUWa7mAfHg93LAo55x+D AD5RWlssW/2Xig3DuyMLBj2IBkDBdh6bXfkfmuoeqSs7n4npM2Hb4YnIT8xlGOunBW1p LwAy1T6r2ix4bVaXr++gk/WUQMQ+axK3NiQIZQQk0bH8Pls2y+bgOccb8SYJWVO1eK0F Ouig== X-Gm-Message-State: AOAM533B5WI4ljwgPHkN5hfbEeE3NcS1ZB3eTull5a7SgRAGxb0qNkXz b6VYHGcpAPQLw2l/V/3ljHXkN5fRKHE= X-Google-Smtp-Source: ABdhPJyXkchYlMZb1bWh4/egNTTxabVhSdtTInxcBZtfXQd0zpYNCAWRnGolDm8l5ZeIC4lSHKEsKQ== X-Received: by 2002:a17:906:ecf6:: with SMTP id qt22mr32010843ejb.292.1634037190949; Tue, 12 Oct 2021 04:13:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 08/24] trace: simple: pass trace_file unmodified to config-host.h Date: Tue, 12 Oct 2021 13:12:46 +0200 Message-Id: <20211012111302.246627-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039263508100001 Add the suffix directly in trace/simple.c, so that quoting is done properly by Meson. Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-3-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 2 -- meson.build | 2 +- trace/simple.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f5dfcf1a08..98723db0cd 100755 --- a/configure +++ b/configure @@ -4578,8 +4578,6 @@ if have_backend "nop"; then fi if have_backend "simple"; then echo "CONFIG_TRACE_SIMPLE=3Dy" >> $config_host_mak - # Set the appropriate trace file. - trace_file=3D"\"$trace_file-\" FMT_pid" fi if have_backend "log"; then echo "CONFIG_TRACE_LOG=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index f59acc7677..9c1efa4731 100644 --- a/meson.build +++ b/meson.build @@ -1571,7 +1571,7 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.c= ompiles(''' =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] -strings =3D ['HOST_DSOSUF', 'CONFIG_IASL'] +strings =3D ['HOST_DSOSUF', 'CONFIG_IASL', 'CONFIG_TRACE_FILE'] foreach k, v: config_host if ignored.contains(k) # do nothing diff --git a/trace/simple.c b/trace/simple.c index ac499edee0..18af590cf7 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -364,7 +364,7 @@ void st_set_trace_file(const char *file) =20 if (!file) { /* Type cast needed for Windows where getpid() returns an int. */ - trace_file_name =3D g_strdup_printf(CONFIG_TRACE_FILE, (pid_t)getp= id()); + trace_file_name =3D g_strdup_printf(CONFIG_TRACE_FILE "-" FMT_pid,= (pid_t)getpid()); } else { trace_file_name =3D g_strdup_printf("%s", file); } --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634040276499671.6021619997942; Tue, 12 Oct 2021 05:04:36 -0700 (PDT) Received: from localhost ([::1]:49874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGWI-00011T-Ti for importer@patchew.org; Tue, 12 Oct 2021 08:04:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFid-0000MU-JN for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:15 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:35362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFib-0007Vh-9X for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:15 -0400 Received: by mail-ed1-x52a.google.com with SMTP id w19so19748361edd.2 for ; Tue, 12 Oct 2021 04:13:12 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/J45n4ze9zin+13IMKhW7Hv1RCPey3WJR8XSYbz59H4=; b=GDcvBTvoow65t6mzdSv1CYv6W8ONxP41gHiWEln2qO98VAeEV3p7uiXAjNC7yVxweN +wgELgXzdKhFY1fN9upB55LMATA9/ax1SLvpj4m+IFzK1/QHXdJoHJ5Q0ehhDpa/YAln SlaQrDYohuZFwyfVsA9XabOmOt0zhiI2KEzxWwxOtko1BiehQKr1WUNMbKpUORtUFaqn rzr84mXsaqX6Ql3prhWDdoAQSY3J4wxvzeMFjxsu0wi8JfMJRptPH2feDMnULLTpOETY SDgsN5eVxEs/f8a/uZtppFrcjdRtzNIQ6bVUICE3pJp8hDxXsrG9mgks2P+eJb90ISwN KnYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/J45n4ze9zin+13IMKhW7Hv1RCPey3WJR8XSYbz59H4=; b=i+pq7TvWeWt0kuuYk+n+vIwIhKA48vHqF1fZAwwProQRSJV8WoJY3hvGFkkMIxlPYf hsSsU7/aZjB8ol9X9+vutpHeulStashS8lyKh9fgd6SQQUmUxUEFqjsJYRghybqlVIO2 /LfVGNoA8k/YWxXETry3AiNWZo+qUG8HLij2WijM4bhgDgx9srX2gWt4aqh+vr5vjc+j WU+3f0M3JTj11hStC6WYMXbggb89zaJXsM6ruqcNW+sj0qWEG3+RMHlywm8V58Fj1uBI GseQJnpxSJoLkbm1rReGdPGhAuxVyL1+03SwRgyLIeCKpxdjp8nlQAEgfROcUgkdq6Oi HRIw== X-Gm-Message-State: AOAM532ckza7sAgLo5fuuo7keZO48SF/flDWbqSOgIwVjgjP1zUqCBiP GDsPYjY2hQF1TLPO/axipfUHOyQzbBU= X-Google-Smtp-Source: ABdhPJyapQwPSwYiQiZU2s3i4OLCCxOJuXRoQyDDGngFpfGL38zPfoEAgjyeHKQSUaYn+8FVsPSsTQ== X-Received: by 2002:a17:906:4d19:: with SMTP id r25mr32358751eju.264.1634037191830; Tue, 12 Oct 2021 04:13:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 09/24] trace: move configuration from configure to Meson Date: Tue, 12 Oct 2021 13:12:47 +0200 Message-Id: <20211012111302.246627-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634040277878100001 Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 91 +-------------------------------------------- docs/meson.build | 2 +- meson.build | 51 +++++++++++++++++++++---- meson_options.txt | 6 +++ scripts/meson.build | 2 +- trace/meson.build | 15 +++++--- 6 files changed, 61 insertions(+), 106 deletions(-) diff --git a/configure b/configure index 98723db0cd..4bfc5e350d 100755 --- a/configure +++ b/configure @@ -216,10 +216,6 @@ version_ge () { done } =20 -have_backend () { - echo "$trace_backends" | grep "$1" >/dev/null -} - glob() { eval test -z '"${1#'"$2"'}"' } @@ -3512,56 +3508,6 @@ case "$capstone" in ;; esac =20 -########################################## -# check if we have posix_syslog - -posix_syslog=3Dno -cat > $TMPC << EOF -#include -int main(void) { openlog("qemu", LOG_PID, LOG_DAEMON); syslog(LOG_INFO, "c= onfigure"); return 0; } -EOF -if compile_prog "" "" ; then - posix_syslog=3Dyes -fi - -########################################## -# check if trace backend exists - -$python "$source_path/scripts/tracetool.py" "--backends=3D$trace_backends"= --check-backends > /dev/null 2> /dev/null -if test "$?" -ne 0 ; then - error_exit "invalid trace backends" \ - "Please choose supported trace backends." -fi - -########################################## -# For 'ust' backend, test if ust headers are present -if have_backend "ust"; then - if $pkg_config lttng-ust --exists; then - lttng_ust_libs=3D$($pkg_config --libs lttng-ust) - else - error_exit "Trace backend 'ust' missing lttng-ust header files" - fi -fi - -########################################## -# For 'dtrace' backend, test if 'dtrace' command is present -if have_backend "dtrace"; then - if ! has 'dtrace' ; then - error_exit "dtrace command is not found in PATH $PATH" - fi - trace_backend_stap=3D"no" - if has 'stap' ; then - trace_backend_stap=3D"yes" - - # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol - # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility - # instead. QEMU --enable-modules depends on this because the SystemTap - # semaphores are linked into the main binary and not the module's shar= ed - # object. - QEMU_CFLAGS=3D"$QEMU_CFLAGS -DSTAP_SDT_V2" - fi -fi - ########################################## # check and set a backend for coroutine =20 @@ -4572,42 +4518,6 @@ if test "$tpm" =3D "yes"; then echo 'CONFIG_TPM=3Dy' >> $config_host_mak fi =20 -echo "TRACE_BACKENDS=3D$trace_backends" >> $config_host_mak -if have_backend "nop"; then - echo "CONFIG_TRACE_NOP=3Dy" >> $config_host_mak -fi -if have_backend "simple"; then - echo "CONFIG_TRACE_SIMPLE=3Dy" >> $config_host_mak -fi -if have_backend "log"; then - echo "CONFIG_TRACE_LOG=3Dy" >> $config_host_mak -fi -if have_backend "ust"; then - echo "CONFIG_TRACE_UST=3Dy" >> $config_host_mak - echo "LTTNG_UST_LIBS=3D$lttng_ust_libs" >> $config_host_mak -fi -if have_backend "dtrace"; then - echo "CONFIG_TRACE_DTRACE=3Dy" >> $config_host_mak - if test "$trace_backend_stap" =3D "yes" ; then - echo "CONFIG_TRACE_SYSTEMTAP=3Dy" >> $config_host_mak - fi -fi -if have_backend "ftrace"; then - if test "$linux" =3D "yes" ; then - echo "CONFIG_TRACE_FTRACE=3Dy" >> $config_host_mak - else - feature_not_found "ftrace(trace backend)" "ftrace requires Linux" - fi -fi -if have_backend "syslog"; then - if test "$posix_syslog" =3D "yes" ; then - echo "CONFIG_TRACE_SYSLOG=3Dy" >> $config_host_mak - else - feature_not_found "syslog(trace backend)" "syslog not available" - fi -fi -echo "CONFIG_TRACE_FILE=3D$trace_file" >> $config_host_mak - if test "$rdma" =3D "yes" ; then echo "CONFIG_RDMA=3Dy" >> $config_host_mak echo "RDMA_LIBS=3D$rdma_libs" >> $config_host_mak @@ -4990,6 +4900,7 @@ if test "$skip_meson" =3D no; then $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ + -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/docs/meson.build b/docs/meson.build index be4dc30f39..19cce670a2 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -57,7 +57,7 @@ if build_docs 'qemu-nbd.8': (have_tools ? 'man8' : ''), 'qemu-pr-helper.8': (have_tools ? 'man8' : ''), 'qemu-storage-daemon.1': (have_tools ? 'man1' : ''), - 'qemu-trace-stap.1': (config_host.has_key('CONFIG_TRACE_SYSTEMTAP'= ) ? 'man1' : ''), + 'qemu-trace-stap.1': (stap.found() ? 'man1' : ''), 'virtfs-proxy-helper.1': (have_virtfs_proxy_helper ? 'man1' : ''), 'virtiofsd.1': (have_virtiofsd ? 'man1' : ''), 'qemu.1': 'man1', diff --git a/meson.build b/meson.build index 9c1efa4731..c2bd1a4469 100644 --- a/meson.build +++ b/meson.build @@ -111,6 +111,22 @@ foreach target : edk2_targets endif endforeach =20 +dtrace =3D not_found +stap =3D not_found +if 'dtrace' in get_option('trace_backends') + dtrace =3D find_program('dtrace', required: true) + stap =3D find_program('stap', required: false) + if stap.found() + # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol + # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility + # instead. QEMU --enable-modules depends on this because the SystemTap + # semaphores are linked into the main binary and not the module's shar= ed + # object. + add_global_arguments('-DSTAP_SDT_V2', + native: false, language: ['c', 'cpp', 'objc']) + endif +endif + ################## # Compiler flags # ################## @@ -201,6 +217,19 @@ if get_option('fuzzing') and get_option('fuzzing_engin= e') =3D=3D '' and \ error('Your compiler does not support -fsanitize=3Dfuzzer') endif =20 +if 'ftrace' in get_option('trace_backends') and targetos !=3D 'linux' + error('ftrace is supported only on Linux') +endif +if 'syslog' in get_option('trace_backends') and not cc.compiles(''' + #include + int main(void) { + openlog("qemu", LOG_PID, LOG_DAEMON); + syslog(LOG_INFO, "configure"); + return 0; + }''') + error('syslog is not supported on this system') +endif + if targetos !=3D 'linux' and get_option('mpath').enabled() error('Multipath is supported only on Linux') endif @@ -359,8 +388,9 @@ if 'CONFIG_GIO' in config_host link_args: config_host['GIO_LIBS'].split()) endif lttng =3D not_found -if 'CONFIG_TRACE_UST' in config_host - lttng =3D declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].sp= lit()) +if 'ust' in get_option('trace_backends') + lttng =3D dependency('lttng-ust', required: true, method: 'pkg-config', + kwargs: static_kwargs) endif pixman =3D not_found if have_system or have_tools @@ -1347,6 +1377,11 @@ elif get_option('virtfs').disabled() have_virtfs =3D false endif =20 +foreach k : get_option('trace_backends') + config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) +endforeach +config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file')) + config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_op= tion('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / = qemu_confdir) @@ -1571,7 +1606,7 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.c= ompiles(''' =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] -strings =3D ['HOST_DSOSUF', 'CONFIG_IASL', 'CONFIG_TRACE_FILE'] +strings =3D ['HOST_DSOSUF', 'CONFIG_IASL'] foreach k, v: config_host if ignored.contains(k) # do nothing @@ -2109,7 +2144,7 @@ qapi_gen_depends =3D [ meson.current_source_dir() / '= scripts/qapi/__init__.py', =20 tracetool =3D [ python, files('scripts/tracetool.py'), - '--backend=3D' + config_host['TRACE_BACKENDS'] + '--backend=3D' + ','.join(get_option('trace_backends')) ] tracetool_depends =3D files( 'scripts/tracetool/backend/log.py', @@ -2828,7 +2863,7 @@ foreach target : target_dirs emulators +=3D {exe['name']: emulator} endif =20 - if 'CONFIG_TRACE_SYSTEMTAP' in config_host + if stap.found() foreach stp: [ {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_di= r() / exe['name'], 'install': false}, {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_o= ption('bindir') / exe['name'], 'install': true}, @@ -3009,9 +3044,9 @@ summary_info +=3D {'fuzzing support': get_option('f= uzzing')} if have_system summary_info +=3D {'Audio drivers': ' '.join(audio_drivers_selected)} endif -summary_info +=3D {'Trace backends': config_host['TRACE_BACKENDS']} -if config_host['TRACE_BACKENDS'].split().contains('simple') - summary_info +=3D {'Trace output file': config_host['CONFIG_TRACE_FILE']= + '-'} +summary_info +=3D {'Trace backends': ','.join(get_option('trace_backend= s'))} +if 'simple' in get_option('trace_backends') + summary_info +=3D {'Trace output file': get_option('trace_file') + '-'} endif summary_info +=3D {'QOM debugging': config_host.has_key('CONFIG_QOM_CA= ST_DEBUG')} summary_info +=3D {'vhost-kernel support': config_host.has_key('CONFIG_VHO= ST_KERNEL')} diff --git a/meson_options.txt b/meson_options.txt index 100c30e967..8f9c3b5b17 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -13,6 +13,8 @@ option('audio_drv_list', type: 'array', value: ['default'= ], description: 'Set audio driver list') option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') +option('trace_file', type: 'string', value: 'trace', + description: 'Trace file prefix for simple backend') =20 option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') @@ -146,6 +148,10 @@ option('fuse', type: 'feature', value: 'auto', option('fuse_lseek', type : 'feature', value : 'auto', description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports') =20 +option('trace_backends', type: 'array', value: ['log'], + choices: ['dtrace', 'ftrace', 'log', 'nop', 'simple', 'syslog', 'us= t'], + description: 'Set available tracing backends') + option('alsa', type: 'feature', value: 'auto', description: 'ALSA sound support') option('coreaudio', type: 'feature', value: 'auto', diff --git a/scripts/meson.build b/scripts/meson.build index e8cc63896d..1c89e10a76 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -1,3 +1,3 @@ -if 'CONFIG_TRACE_SYSTEMTAP' in config_host +if stap.found() install_data('qemu-trace-stap', install_dir: get_option('bindir')) endif diff --git a/trace/meson.build b/trace/meson.build index b8f95de200..573dd699c6 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,7 +2,6 @@ specific_ss.add(files('control-target.c')) =20 trace_events_files =3D [] -dtrace =3D find_program('dtrace', required: 'CONFIG_TRACE_DTRACE' in confi= g_host) foreach dir : [ '.' ] + trace_events_subdirs trace_events_file =3D meson.project_source_root() / dir / 'trace-events' trace_events_files +=3D [ trace_events_file ] @@ -21,7 +20,7 @@ foreach dir : [ '.' ] + trace_events_subdirs input: trace_events_file, command: [ tracetool, group, '--format=3Dc', '@I= NPUT@', '@OUTPUT@' ], depend_files: tracetool_depends) - if 'CONFIG_TRACE_UST' in config_host + if 'ust' in get_option('trace_backends') trace_ust_h =3D custom_target(fmt.format('trace-ust', 'h'), output: fmt.format('trace-ust', 'h'), input: trace_events_file, @@ -31,7 +30,7 @@ foreach dir : [ '.' ] + trace_events_subdirs genh +=3D trace_ust_h endif trace_ss.add(trace_h, trace_c) - if 'CONFIG_TRACE_DTRACE' in config_host + if 'dtrace' in get_option('trace_backends') trace_dtrace =3D custom_target(fmt.format('trace-dtrace', 'dtrace'), output: fmt.format('trace-dtrace', 'dtrac= e'), input: trace_events_file, @@ -76,7 +75,7 @@ foreach d : [ specific_ss.add(when: 'CONFIG_TCG', if_true: gen) endforeach =20 -if 'CONFIG_TRACE_UST' in config_host +if 'ust' in get_option('trace_backends') trace_ust_all_h =3D custom_target('trace-ust-all.h', output: 'trace-ust-all.h', input: trace_events_files, @@ -91,7 +90,11 @@ if 'CONFIG_TRACE_UST' in config_host genh +=3D trace_ust_all_h endif =20 -trace_ss.add(when: 'CONFIG_TRACE_SIMPLE', if_true: files('simple.c')) -trace_ss.add(when: 'CONFIG_TRACE_FTRACE', if_true: files('ftrace.c')) +if 'simple' in get_option('trace_backends') + trace_ss.add(files('simple.c')) +endif +if 'ftrace' in get_option('trace_backends') + trace_ss.add(files('ftrace.c')) +endif trace_ss.add(files('control.c')) trace_ss.add(files('qmp.c')) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039938270489.48644305790833; Tue, 12 Oct 2021 04:58:58 -0700 (PDT) Received: from localhost ([::1]:43194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGQr-0004iI-5Q for importer@patchew.org; Tue, 12 Oct 2021 07:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFid-0000Mj-Kk for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:15 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:34747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFib-0007Vp-Ud for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:15 -0400 Received: by mail-ed1-x529.google.com with SMTP id g10so78905351edj.1 for ; Tue, 12 Oct 2021 04:13:13 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TLc81Pj6WdOwOveYsBC0DI90aoKQSzLWZG0retjhzGg=; b=P5ypFm6lAK8684FzRttJiXNmJWW4lBZhGxq4Zc6dRP4KUYfJEnzAoYhONP2KxJhB8P f6BcaUKiDOq9UcFUPJXwaO9wqLPn0S0Vt/WPKFeYqyzFGSI1kzTdpENhd/jfAL3WjqqB sEHpvDeixYpCf6FIhg0nGCCztjsxk5wK5LOH1PX9TdxD/6NQGPYJtjWLW2mE1hYA7dGC 3t9xaWO/9yQFF3+0jb9e2r91hbuMSvoQqBuCRnxe8QET0En2OlSd0OPMJQuBo5h0CuSt Dtz3tC5ooKYjcTOhkmam8EYGO1ON8y4ckzb49/HI/ELGU4VIl+BxyiE/XOMScyCJ1Q7Y olxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TLc81Pj6WdOwOveYsBC0DI90aoKQSzLWZG0retjhzGg=; b=Lwh7KODNvuB7mxVRkrfvKg4T7FZ2YLB/KWXUZaPlL8BFeFSXMK6KNHqXE7Ka1rCyW7 wNNfzF/hNyXMQ72m1aJeW8sZueEEWwNOlrT/pgibEfoWMbV5imU1m7cMHv0NwCxwAgNQ W/lcP8sTvehqa0YlCAQCwZKmnXTbh2P82ZOyNLvZpnHWJL/NnVCsnS4JteqCTSlql2yU 99bwdGDSGF+G3w2R8e7Oz2ghEID2EsvMJ2qlnQtrK/z0va+zkbgne0amtJlGI3Y34fBq EUd1GjHeEJl8qCcgMm8V1QD0noRIohHwpmVrUPs8vKLqwEKWEq3UU7wPEPQ+N3CRk+jN 6FPw== X-Gm-Message-State: AOAM530oPJ1wvKtS+dOw9bSV6azo4QwC39XyGU3t+lpBweGp79yEfeO2 q1Zvbm4tayR3gZPwybbjpj3BIqekK7s= X-Google-Smtp-Source: ABdhPJyATsG3D5BtunBuqrUvB35UBxjQCde7so6Enwdx69PrtBUe4/Evny8sKPMHFeWFPvtYO9eYXA== X-Received: by 2002:a05:6402:5249:: with SMTP id t9mr50375278edd.135.1634037192667; Tue, 12 Oct 2021 04:13:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 10/24] configure, meson: move CONFIG_HOST_DSOSUF to Meson Date: Tue, 12 Oct 2021 13:12:48 +0200 Message-Id: <20211012111302.246627-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039940481100001 This is just a constant string, there is no need to pass it in config-host.= mak. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211007130829.632254-5-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 6 ------ meson.build | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 4bfc5e350d..f91b8e1f0d 100755 --- a/configure +++ b/configure @@ -351,7 +351,6 @@ bigendian=3D"no" mingw32=3D"no" gcov=3D"no" EXESUF=3D"" -HOST_DSOSUF=3D".so" modules=3D"no" module_upgrades=3D"no" prefix=3D"/usr/local" @@ -594,9 +593,6 @@ fi # cross-compiling to one of these OSes then you'll need to specify # the correct CPU with the --cpu option. case $targetos in -Darwin) - HOST_DSOSUF=3D".dylib" - ;; SunOS) # $(uname -m) returns i86pc even on an x86_64 box, so default based on i= sainfo if test -z "$cpu" && test "$(isainfo -k)" =3D "amd64"; then @@ -785,7 +781,6 @@ fi =20 if test "$mingw32" =3D "yes" ; then EXESUF=3D".exe" - HOST_DSOSUF=3D".dll" # MinGW needs -mthreads for TLS and macro _MT. CONFIGURE_CFLAGS=3D"-mthreads $CONFIGURE_CFLAGS" write_c_skeleton; @@ -4636,7 +4631,6 @@ echo "GLIB_LIBS=3D$glib_libs" >> $config_host_mak echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_mak echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak -echo "HOST_DSOSUF=3D$HOST_DSOSUF" >> $config_host_mak echo "LIBS_QGA=3D$libs_qga" >> $config_host_mak if test "$gcov" =3D "yes" ; then echo "CONFIG_GCOV=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index c2bd1a4469..31758400eb 100644 --- a/meson.build +++ b/meson.build @@ -250,6 +250,7 @@ iokit =3D [] emulator_link_args =3D [] nvmm =3Dnot_found hvf =3D not_found +host_dsosuf =3D '.so' if targetos =3D=3D 'windows' socket =3D cc.find_library('ws2_32') winmm =3D cc.find_library('winmm') @@ -258,9 +259,11 @@ if targetos =3D=3D 'windows' version_res =3D win.compile_resources('version.rc', depend_files: files('pc-bios/qemu-ns= is.ico'), include_directories: include_directo= ries('.')) + host_dsosuf =3D '.dll' elif targetos =3D=3D 'darwin' coref =3D dependency('appleframeworks', modules: 'CoreFoundation') iokit =3D dependency('appleframeworks', modules: 'IOKit', required: fals= e) + host_dsosuf =3D '.dylib' elif targetos =3D=3D 'sunos' socket =3D [cc.find_library('socket'), cc.find_library('nsl'), @@ -1458,6 +1461,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.proj= ect_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('= .')[2]) =20 +config_host_data.set_quoted('CONFIG_HOST_DSOSUF', host_dsosuf) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) =20 # has_header @@ -1603,10 +1607,9 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.= compiles(''' return printf("%zu", SIZE_MAX); }''', args: ['-Werror'])) =20 - ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] -strings =3D ['HOST_DSOSUF', 'CONFIG_IASL'] +strings =3D ['CONFIG_IASL'] foreach k, v: config_host if ignored.contains(k) # do nothing @@ -1618,9 +1621,6 @@ foreach k, v: config_host elif k =3D=3D 'ARCH' config_host_data.set('HOST_' + v.to_upper(), 1) elif strings.contains(k) - if not k.startswith('CONFIG_') - k =3D 'CONFIG_' + k.to_upper() - endif config_host_data.set_quoted(k, v) elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('H= OST_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634040476608602.9873592014483; Tue, 12 Oct 2021 05:07:56 -0700 (PDT) Received: from localhost ([::1]:56676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGZX-0005r2-MM for importer@patchew.org; Tue, 12 Oct 2021 08:07:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFig-0000Xx-5E for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:18 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:43702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFid-0007Wq-P5 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:17 -0400 Received: by mail-ed1-x52d.google.com with SMTP id i20so63177254edj.10 for ; Tue, 12 Oct 2021 04:13:15 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X2E66bS33R3PPOnhmYySlBMHCIuzAQUU7BlElA4jftU=; b=l7TrRJUr8lCT/sPxbO943tI0YmtuL0ThqySnwG4jaCfgpIZHEoyn+uYlXdo6kYx0F4 GDE8h1PRdRY0h3xHxhGPtzMu9uS5JVYlMTJ6y8XpJFThG6Fu6GMkuq648+LXDhT3M00a 2ZQjTFc0NjkdHwMoJDR8jByzhgRa1Wg9BgJNPgiAiWRwAAbpztE2kmRHwhJ53GwhE+Uc LRAX8f8XYJeXUBlaUWEsEusBYPJoWqdWWfYW2ZWfv8qbOiNLystQA7RL1S3tQxz3VoLO lfa9Ib/9WsfzY9Ir1e8IHMvkWquGfMiUvASUmxNIdiX+18ScfL1NLKJfOQ6kX4LdEnZU N1Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X2E66bS33R3PPOnhmYySlBMHCIuzAQUU7BlElA4jftU=; b=rioxkEo6jtdmqnwfuW2y5b2Mkfn4VoR/4aFrDW8T54jzEoZD01Ow+9QLWf5vVyOyVr l9uveRvQ+j3pqOw1ch/hfDp+7tFN1k10qDuX77XIq+8MXq9R1egri5LVE9MrV6FhFu8C wNLdFzmFr9uVBvvIKYkPmqloOsSvZczgyH8YbRqAxdzs16RmM9meA6cnD/S6rrsHOUfF 1Yf86fvigGOyFdFIgkTDigdIKWKt+5SlDMt9nUj33M6SBBg84N3hmJlrb9kUBWEgPeRE NZa7u6Kl74bn373RUWizogcIwanNbvMBl3MILSAGDAy+hA/rwqoCTcSYZsbXjlk6sV/j IouA== X-Gm-Message-State: AOAM5303Ch4EJgCxEoaq7K1GOWmaRs2COQvnCHB8Fuk8qiD7nYIHeOdg DrbpdsI4e33Un34vMwnu0G0171JNmqU= X-Google-Smtp-Source: ABdhPJxxCy1YfjqzN+TZ0baBN4tgpB2k8J+NyP52OQFRiR0Jx0AjsnWSTVRfyCh/sdfyA0zq30IiRg== X-Received: by 2002:a05:6402:450:: with SMTP id p16mr49145023edw.162.1634037193435; Tue, 12 Oct 2021 04:13:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 11/24] configure, meson: get HOST_WORDS_BIGENDIAN via the machine object Date: Tue, 12 Oct 2021 13:12:49 +0200 Message-Id: <20211012111302.246627-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634040478374100001 No need to pass it in config-host.mak. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211007130829.632254-6-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 4 ---- meson.build | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure b/configure index f91b8e1f0d..35e25bb960 100755 --- a/configure +++ b/configure @@ -347,7 +347,6 @@ tsan=3D"no" fortify_source=3D"$default_feature" strip_opt=3D"yes" tcg_interpreter=3D"false" -bigendian=3D"no" mingw32=3D"no" gcov=3D"no" EXESUF=3D"" @@ -4262,9 +4261,6 @@ fi if test "$strip_opt" =3D "yes" ; then echo "STRIP=3D${strip}" >> $config_host_mak fi -if test "$bigendian" =3D "yes" ; then - echo "HOST_WORDS_BIGENDIAN=3Dy" >> $config_host_mak -fi if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak if test "$guest_agent_with_vss" =3D "yes" ; then diff --git a/meson.build b/meson.build index 31758400eb..f8992e4b2c 100644 --- a/meson.build +++ b/meson.build @@ -1463,6 +1463,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.proj= ect_version().split('.')[2] =20 config_host_data.set_quoted('CONFIG_HOST_DSOSUF', host_dsosuf) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) +config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() =3D=3D = 'big') =20 # has_header config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) @@ -1622,7 +1623,7 @@ foreach k, v: config_host config_host_data.set('HOST_' + v.to_upper(), 1) elif strings.contains(k) config_host_data.set_quoted(k, v) - elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('H= OST_') + elif k.startswith('CONFIG_') or k.startswith('HAVE_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039383865134.420497162007; Tue, 12 Oct 2021 04:49:43 -0700 (PDT) Received: from localhost ([::1]:48468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGHu-00060u-UP for importer@patchew.org; Tue, 12 Oct 2021 07:49:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFif-0000TZ-4J for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:17 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:36727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFid-0007WS-FS for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:16 -0400 Received: by mail-ed1-x535.google.com with SMTP id d3so52075229edp.3 for ; Tue, 12 Oct 2021 04:13:15 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=66cPKGA4LIApLmGYntyONXoCCycQzNc5PlgBd8qN3y0=; b=N09iytPJg6ojzOnW2Q/ZbNokQG4T7GcXdAOh8ibP/yv+uwXr5yC9N1ObatStnFLx2I tFIHsJjSYi/bZhMYhmIafxyKL0VQHag/clIGxmYlF6Bj1bcopPHVRBdmLDDuJTpbFJaq UbA96TEelNZneW0Odx3NNtgJrfd2jNB/6rT1ONjhgwzNtIIcW7MHjSpXj5Uxkl88EbES zsV5+VbVqh1FN2z1K9nDMtg7EsSInQZbpKs8MgK1Rz3XkaWrdAVNFQX1mLqSeqek5o28 qlYMSm0TjXajEtJCh5EYwRBGF1aoaQo1HUekkTd11LhzdVU+luOKWU5+TKlvWhRnxsfo 094A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=66cPKGA4LIApLmGYntyONXoCCycQzNc5PlgBd8qN3y0=; b=Ws53SdNhyEmbsFQxa9/fgEm6YZPcIKqtyWTKfEx1ywoyXFXU0dhTYNMPwRa7HhX/XP 1XlPYNsFKTuHi9yLmIJkxD9NvVX7r4RrK0TP/TEG0w6L5k34+dj1/3hof0wEhJtp6mr9 BWDWwYjFu9E9/5ZvnTOjmf1XIIWT92KhyZ9Ink0pfEobLzQlgwhy8p9d9dZTu7vd68Ja v/SKf5ZMoB2H3GB6oVv1Vbw/FYB4JEWUrgauFAumBeqhHGfxNkrOeenlWhC2yepusday +rB2kauJGZ2wYoMKliu862Y7pViDPV7bCPUEDGjI+ZX855RafgU7Zc3kS/Zj2s+M3fzd f/Gw== X-Gm-Message-State: AOAM532qKXGjoi0cvD8AieXk0yFMQufq4gpcKxn7FIeqK+un6LkLmWwt 4vb1/VKWDwWUL6iiwxJiJ+rpipy/Fmg= X-Google-Smtp-Source: ABdhPJw9+FgFI3hnzDkYp1S3GvzOymVxDZ4Wd3TExKpB99TzGOc6810jg+PUKXkLBITOoajAiDc6dw== X-Received: by 2002:a05:6402:40d2:: with SMTP id z18mr49270890edb.362.1634037194142; Tue, 12 Oct 2021 04:13:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 12/24] configure, meson: remove CONFIG_GCOV from config-host.mak Date: Tue, 12 Oct 2021 13:12:50 +0200 Message-Id: <20211012111302.246627-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039386046100001 Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-7-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 3 --- meson.build | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index 35e25bb960..499c84859d 100755 --- a/configure +++ b/configure @@ -4628,9 +4628,6 @@ echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_m= ak echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak echo "LIBS_QGA=3D$libs_qga" >> $config_host_mak -if test "$gcov" =3D "yes" ; then - echo "CONFIG_GCOV=3Dy" >> $config_host_mak -fi =20 if test "$rng_none" =3D "yes"; then echo "CONFIG_RNG_NONE=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index f8992e4b2c..b551080523 100644 --- a/meson.build +++ b/meson.build @@ -1402,6 +1402,7 @@ 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_FUZZ', get_option('fuzzing')) +config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039559647749.1723816071151; Tue, 12 Oct 2021 04:52:39 -0700 (PDT) Received: from localhost ([::1]:55766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGKk-0002XN-JU for importer@patchew.org; Tue, 12 Oct 2021 07:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFig-0000Yr-HD for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:18 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:37692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFie-0007XH-41 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:18 -0400 Received: by mail-ed1-x535.google.com with SMTP id y12so66813779eda.4 for ; Tue, 12 Oct 2021 04:13:15 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DDfe8bmDBbBfn69RwFgCJGTvzw7OlkgziGgK1aI31l8=; b=fsMTZOa+G31mumxvxyTeK2ELnslQqdkYS8BEVuhg0CYeIYLbmWD4+c994rCRPZfnIB QlKEcH/pF2cMJGcEHYdd7r1tm11YgGyKUTdz79Lqas01jyU4IGPNqdblaqcdQ1zlC2kr jLW8X4tmqQUgz+nCX+R7vQ+Yf8t/p5CofF1Up/aIMZaQ1xgd9VrY4vIwklsl7bqk7Ezm APeOi6R/bXwuRQY8pB3q5uMPiW36Vz+rtpHKJJgSF5jm2C4JFDxqJftISP+7ah+j31xS 6K5RE7CeXcbYOldDi+1vzkUIwGwY0mnQhXAK+GRiCz35QNGu0C0CFdOe9PWhz1CqvuH+ RU2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DDfe8bmDBbBfn69RwFgCJGTvzw7OlkgziGgK1aI31l8=; b=u06Px5YOXCHcn7+txYdvU5FL66XmGdfdD6nnheR36EiZa2LgyedWKq8QKmHPZQ7pPS XnYGxy6dxiqmuSnvTvIfb8j4bMe88XG4ibkACF01EQJkBXhENisDtw0HnIcaQPUDbrk/ 9pk01iBXbldfwnzci5qV4HjFk/m9xc8FXKzX1FPRrdjURQtBbnH9QG0Ax9AG6iyv0OMy 5V5yXluh0YPm96EqnvUFzZVMgpvRvKYK+mYaKFAG7cVUWcd96DETcOZVP4YL+t6hl6WN LkcGt1tReyshZgYoOHCWHKu4EoKI6Uz1oS4VhhRLFeJj6KbrVcCoeguO4qKX7wetKRg8 v1BA== X-Gm-Message-State: AOAM532j7y8dwBeABZlTv+cA9MqAJXbtnyYUjQaX3fUQMp25r0uj8+q7 9n6MR0kyALm1HgV/KxMzFWwQSccL7Qc= X-Google-Smtp-Source: ABdhPJzmJ5bB1FULO7ksl/8Fz3oBywuRSpbANoXq/8c4ByQgXa0hxxjMSR/omfKgWuiQE/EPCCdrmw== X-Received: by 2002:a05:6402:5209:: with SMTP id s9mr16459879edd.250.1634037194934; Tue, 12 Oct 2021 04:13:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 13/24] configure, meson: move remaining HAVE_* compiler tests to Meson Date: Tue, 12 Oct 2021 13:12:51 +0200 Message-Id: <20211012111302.246627-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039561598100001 Remove some special cases by moving them to Meson. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-8-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 37 ------------------------------------- meson.build | 22 ++++++++++++++++++++-- 2 files changed, 20 insertions(+), 39 deletions(-) diff --git a/configure b/configure index 499c84859d..52f89b05d6 100755 --- a/configure +++ b/configure @@ -2401,18 +2401,6 @@ else l2tpv3=3Dno fi =20 -cat > $TMPC < -int main(int argc, char *argv[]) { - return mlockall(MCL_FUTURE); -} -EOF -if compile_prog "" "" ; then - have_mlockall=3Dyes -else - have_mlockall=3Dno -fi - ######################################### # vhost interdependencies and host support =20 @@ -3840,21 +3828,6 @@ if test "$fortify_source" !=3D "no"; then fi fi =20 -########################################## -# check if struct fsxattr is available via linux/fs.h - -have_fsxattr=3Dno -cat > $TMPC << EOF -#include -struct fsxattr foo; -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - have_fsxattr=3Dyes -fi - ########################################## # check for usable membarrier system call if test "$membarrier" =3D "yes"; then @@ -4356,13 +4329,6 @@ if test "$gdbus_codegen" !=3D "" ; then fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 -# Work around a system header bug with some kernel/XFS header -# versions where they both try to define 'struct fsxattr': -# xfs headers will not try to redefine structs from linux headers -# if this macro is set. -if test "$have_fsxattr" =3D "yes" ; then - echo "HAVE_FSXATTR=3Dy" >> $config_host_mak -fi if test "$xen" =3D "enabled" ; then echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak @@ -4567,9 +4533,6 @@ fi if test "$parallels" =3D "yes" ; then echo "CONFIG_PARALLELS=3Dy" >> $config_host_mak fi -if test "$have_mlockall" =3D "yes" ; then - echo "HAVE_MLOCKALL=3Dy" >> $config_host_mak -fi =20 if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index b551080523..c712963170 100644 --- a/meson.build +++ b/meson.build @@ -1601,6 +1601,23 @@ config_host_data.set('CONFIG_SPLICE', cc.links(gnu_s= ource_prefix + ''' return 0; }''')) =20 +config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + ''' + #include + int main(int argc, char *argv[]) { + return mlockall(MCL_FUTURE); + }''')) + +# Work around a system header bug with some kernel/XFS header +# versions where they both try to define 'struct fsxattr': +# xfs headers will not try to redefine structs from linux headers +# if this macro is set. +config_host_data.set('HAVE_FSXATTR', cc.links(''' + #include ' + struct fsxattr foo; + int main(void) { + return 0; + }''')) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include @@ -1609,7 +1626,8 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.c= ompiles(''' return printf("%zu", SIZE_MAX); }''', args: ['-Werror'])) =20 -ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target +ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target + 'HAVE_GDB_BIN'] arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] strings =3D ['CONFIG_IASL'] foreach k, v: config_host @@ -1624,7 +1642,7 @@ foreach k, v: config_host config_host_data.set('HOST_' + v.to_upper(), 1) elif strings.contains(k) config_host_data.set_quoted(k, v) - elif k.startswith('CONFIG_') or k.startswith('HAVE_') + elif k.startswith('CONFIG_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634040633708938.4799891631117; Tue, 12 Oct 2021 05:10:33 -0700 (PDT) Received: from localhost ([::1]:36262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGc4-0002ie-MS for importer@patchew.org; Tue, 12 Oct 2021 08:10:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFig-0000Zo-Og for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:18 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:38431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFie-0007Xl-RV for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:18 -0400 Received: by mail-ed1-x535.google.com with SMTP id d9so55752977edh.5 for ; Tue, 12 Oct 2021 04:13:16 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SXwJWI5doSd/IDqwD+5r/Ku8HGS7DFHwlBHwHwh8g0I=; b=pDoEVx5zIyC4XxTlljaUsBNPuGZuCcL3LbjMtxngqLhaLMeX1ESVV8Zw+vfxwjbP5x watStRzJ6M8w+0RbnMpUdYeDaYBZtZyvvFFOgMjiHYYn0BXqcEjd+7lo9Seqav8bK30e Zn7zZuIu41bT1DwDx8CZEa06ZvOOHajF1E5kIrtsf8Ly6cHjH12o2nRSHAswgrmBI3ur CKoOVcTir8aLZQn+k3H5aQKGFE471pSrj3eLDiIV/kvz/bNRn2GmvwVteNo90uluMJwb BCYUufi+KiG1AOvB5EU5lLgfnOKqE9/zPD6Zxu6/GIWDnJ5695C0ZBuHAW2TZc0/uyKI ax7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SXwJWI5doSd/IDqwD+5r/Ku8HGS7DFHwlBHwHwh8g0I=; b=EBhPeRPjuL8zviB/WOgetXwCQJye2Y5SvCofXVYCKyMg7nYp1HLCKseYHPesgqHoLI u30eu1GSQ3cdahGjI+UGc+n9h4WZivGsXDs0p6a/zwJMLJg92SVxzbuevH369BJ+aZ/M C8aOGunPYKF/e3XiPyHQjVl0TllJoPdwo6OJO3CPbZOsphwDBd6DCR1UIE3cPEDN1d/s /3bKlJK0aV6Vvmyhk9FhqJe7a+NvorNTtFSlTlaj9/gO+f1xOCPksAOcFxw/Mi/LGdH9 +2B8sPeukJNfktmmfD2ZIgHEV0rgsRUX5YS7wR6PCgR9sZML8ViOFCAET0Ugn/Zc/wqj e67w== X-Gm-Message-State: AOAM531/7yqDlv1nPWDYVEmjwUEQLjTt4gfufYbQEXzByRDqLHXDDqSC 2Z+9Eo74nDeyn2Ei98By3A0n7RPUcXM= X-Google-Smtp-Source: ABdhPJzWf6yDO/Ml3NeRU6V+cEcH8VI4OAhMw24KsbM6ITLON1q6uJ9qt4A1M915/NLK5XVQ3MPmyQ== X-Received: by 2002:a05:6402:2550:: with SMTP id l16mr45602680edb.229.1634037195656; Tue, 12 Oct 2021 04:13:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 14/24] configure, meson: move pthread_setname_np checks to Meson Date: Tue, 12 Oct 2021 13:12:52 +0200 Message-Id: <20211012111302.246627-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634040634898100001 This makes the pthreads check dead in configure, so remove it as well. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-9-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 78 ---------------------------------------- meson.build | 23 ++++++++++++ util/qemu-thread-posix.c | 5 ++- 3 files changed, 25 insertions(+), 81 deletions(-) diff --git a/configure b/configure index 52f89b05d6..a1e142d5f8 100755 --- a/configure +++ b/configure @@ -3146,71 +3146,6 @@ if test "$modules" =3D yes; then fi fi =20 -########################################## -# pthread probe -PTHREADLIBS_LIST=3D"-pthread -lpthread -lpthreadGC2" - -pthread=3Dno -cat > $TMPC << EOF -#include -static void *f(void *p) { return NULL; } -int main(void) { - pthread_t thread; - pthread_create(&thread, 0, f, 0); - return 0; -} -EOF -if compile_prog "" "" ; then - pthread=3Dyes -else - for pthread_lib in $PTHREADLIBS_LIST; do - if compile_prog "" "$pthread_lib" ; then - pthread=3Dyes - break - fi - done -fi - -if test "$mingw32" !=3D yes && test "$pthread" =3D no; then - error_exit "pthread check failed" \ - "Make sure to have the pthread libs and headers installed." -fi - -# check for pthread_setname_np with thread id -pthread_setname_np_w_tid=3Dno -cat > $TMPC << EOF -#include - -static void *f(void *p) { return NULL; } -int main(void) -{ - pthread_t thread; - pthread_create(&thread, 0, f, 0); - pthread_setname_np(thread, "QEMU"); - return 0; -} -EOF -if compile_prog "" "$pthread_lib" ; then - pthread_setname_np_w_tid=3Dyes -fi - -# check for pthread_setname_np without thread id -pthread_setname_np_wo_tid=3Dno -cat > $TMPC << EOF -#include - -static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; } -int main(void) -{ - pthread_t thread; - pthread_create(&thread, 0, f, 0); - return 0; -} -EOF -if compile_prog "" "$pthread_lib" ; then - pthread_setname_np_wo_tid=3Dyes -fi - ########################################## # libssh probe if test "$libssh" !=3D "no" ; then @@ -4496,19 +4431,6 @@ if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak fi =20 -# Hold two types of flag: -# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name = on -# a thread we have a handle to -# CONFIG_PTHREAD_SETNAME_NP_W_TID - A way of doing it on a particular -# platform -if test "$pthread_setname_np_w_tid" =3D "yes" ; then - echo "CONFIG_THREAD_SETNAME_BYTHREAD=3Dy" >> $config_host_mak - echo "CONFIG_PTHREAD_SETNAME_NP_W_TID=3Dy" >> $config_host_mak -elif test "$pthread_setname_np_wo_tid" =3D "yes" ; then - echo "CONFIG_THREAD_SETNAME_BYTHREAD=3Dy" >> $config_host_mak - echo "CONFIG_PTHREAD_SETNAME_NP_WO_TID=3Dy" >> $config_host_mak -fi - if test "$bochs" =3D "yes" ; then echo "CONFIG_BOCHS=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index c712963170..97dda9aee7 100644 --- a/meson.build +++ b/meson.build @@ -1584,6 +1584,29 @@ config_host_data.set('CONFIG_POSIX_MADVISE', cc.link= s(gnu_source_prefix + ''' #include #include int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }''= ')) + +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(''' + #include + + static void *f(void *p) { return NULL; } + int main(void) + { + pthread_t thread; + pthread_create(&thread, 0, f, 0); + pthread_setname_np(thread, "QEMU"); + return 0; + }''', dependencies: threads)) +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(''' + #include + + static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; } + int main(void) + { + pthread_t thread; + pthread_create(&thread, 0, f, 0); + return 0; + }''', dependencies: threads)) + config_host_data.set('CONFIG_SIGNALFD', cc.links(gnu_source_prefix + ''' #include #include diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 6c5004220d..e1225b63bd 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -23,7 +23,8 @@ void qemu_thread_naming(bool enable) { name_threads =3D enable; =20 -#ifndef CONFIG_THREAD_SETNAME_BYTHREAD +#if !defined CONFIG_PTHREAD_SETNAME_NP_W_TID && \ + !defined CONFIG_PTHREAD_SETNAME_NP_WO_TID /* This is a debugging option, not fatal */ if (enable) { fprintf(stderr, "qemu: thread naming not supported on this host\n"= ); @@ -522,7 +523,6 @@ static void *qemu_thread_start(void *args) void *arg =3D qemu_thread_args->arg; void *r; =20 -#ifdef CONFIG_THREAD_SETNAME_BYTHREAD /* Attempt to set the threads name; note that this is for debug, so * we're not going to fail if we can't set it. */ @@ -533,7 +533,6 @@ static void *qemu_thread_start(void *args) pthread_setname_np(qemu_thread_args->name); # endif } -#endif QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name); g_free(qemu_thread_args->name); g_free(qemu_thread_args); --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634038848925110.76362872095046; Tue, 12 Oct 2021 04:40:48 -0700 (PDT) Received: from localhost ([::1]:60150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maG9H-0002n9-KL for importer@patchew.org; Tue, 12 Oct 2021 07:40:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFih-0000di-Jd for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:19 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:42657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFif-0007Y3-JW for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:19 -0400 Received: by mail-ed1-x52d.google.com with SMTP id t16so57844194eds.9 for ; Tue, 12 Oct 2021 04:13:17 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NottOK6IKSHb6MMzIarvvWPjwhgHe9PUz9NKaJzIngo=; b=o5ByMfOburnJE6GrDNMgjyVeYqfr6pZLVi6ZEN2S1HpzE8znSZOl622ly1yFiETAyz ROAtsAQ5kEKGNuASNUYgK8I0RLOd3u0yc3Z55xXyUSxz0sgTB13yf0g7ca2fekp4Vtfe ahdgOhhtRktF1K6U9e9zWY89HNAQUoeb/6E39ZsIV6zhh7rPCvG73erelpnoDETjIjYM aMqbmMyHP3amgEBsGbv5L8HhztVR6olhZYBLB7YwEANiAH9UgOxwUtSj0soZc69mUf6H Fn65kWBQdJs3yWellX6g/UPC0FPOUKhJT7CItPbSaF1Gt+USHa+sY0Oh5dpOywh60zip IP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NottOK6IKSHb6MMzIarvvWPjwhgHe9PUz9NKaJzIngo=; b=PrKygm/Hr9m5EBDFbprfbbIYNEcVi7OAcXWAfE8aA+gempuqWtRXh8eR2B6XO/JcfQ I1l6I7eY6UEhBNJQOw4DKVsE/qYtiwMFcta8Gil0SWGKqqIlYJjTtHkr/nQe8ORwSPHz W4GNoDxWXC+iPPEFs6MYiF3p7pPBVSVcVqV7kDoWb5MSARRVsFreSSQHRpwLPVRAxcxe +zMOQAgerLb7U6jWm3kx1V1gh8EilJq6kW63p4G77ve+P1r9OPo4/aerp1PGBdM7o1Z+ tKyXswEKuOYsKCZuXlWjxL3V4od1cS+Hgh1u6Nno8JIx0DJwkQQVXeHMSALLggbvPD8D zaMw== X-Gm-Message-State: AOAM530s+HKH8XGPGSpVEXrvJWyDIalo9bQKlGsw4nDMMFdhdfYQCDZk DblNdyS6B8Vpwa7jdMePli0gnVm2vQw= X-Google-Smtp-Source: ABdhPJwIMdmkf0cibOANkDyQyWoQP3Xd5iauHdg6ttmwCye52gusteNqm2CdZYbUXlXtKXfzVfdmGA== X-Received: by 2002:a50:cd97:: with SMTP id p23mr50310364edi.206.1634037196385; Tue, 12 Oct 2021 04:13:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 15/24] configure, meson: move libaio check to meson.build Date: Tue, 12 Oct 2021 13:12:53 +0200 Message-Id: <20211012111302.246627-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038851149100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Message-Id: <20211007130829.632254-10-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- block/meson.build | 2 +- configure | 31 ++++--------------------------- meson.build | 10 ++++++++-- meson_options.txt | 2 ++ stubs/meson.build | 4 +++- 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/block/meson.build b/block/meson.build index 66ee11e62c..deb73ca389 100644 --- a/block/meson.build +++ b/block/meson.build @@ -65,7 +65,7 @@ block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-= posix.c'), coref, iokit 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_LINUX_AIO', libaio], if_true: files('linux-aio= .c')) +block_ss.add(when: libaio, if_true: files('linux-aio.c')) block_ss.add(when: linux_io_uring, if_true: files('io_uring.c')) =20 block_modules =3D {} diff --git a/configure b/configure index a1e142d5f8..86bc4b52d7 100755 --- a/configure +++ b/configure @@ -315,7 +315,7 @@ pa=3D"auto" xen=3D${default_feature:+disabled} xen_ctrl_version=3D"$default_feature" xen_pci_passthrough=3D"auto" -linux_aio=3D"$default_feature" +linux_aio=3D"auto" linux_io_uring=3D"auto" cap_ng=3D"auto" attr=3D"auto" @@ -1196,9 +1196,9 @@ for opt do ;; --enable-fdt=3Dsystem) fdt=3D"system" ;; - --disable-linux-aio) linux_aio=3D"no" + --disable-linux-aio) linux_aio=3D"disabled" ;; - --enable-linux-aio) linux_aio=3D"yes" + --enable-linux-aio) linux_aio=3D"enabled" ;; --disable-linux-io-uring) linux_io_uring=3D"disabled" ;; @@ -3161,26 +3161,6 @@ if test "$libssh" !=3D "no" ; then fi fi =20 -########################################## -# linux-aio probe - -if test "$linux_aio" !=3D "no" ; then - cat > $TMPC < -#include -#include -int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0)= ; return 0; } -EOF - if compile_prog "" "-laio" ; then - linux_aio=3Dyes - else - if test "$linux_aio" =3D "yes" ; then - feature_not_found "linux AIO" "Install libaio devel" - fi - linux_aio=3Dno - fi -fi - ########################################## # TPM emulation is only on POSIX =20 @@ -4270,9 +4250,6 @@ if test "$xen" =3D "enabled" ; then echo "XEN_CFLAGS=3D$xen_cflags" >> $config_host_mak echo "XEN_LIBS=3D$xen_libs" >> $config_host_mak fi -if test "$linux_aio" =3D "yes" ; then - echo "CONFIG_LINUX_AIO=3Dy" >> $config_host_mak -fi if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak fi @@ -4772,7 +4749,7 @@ if test "$skip_meson" =3D no; then $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ - -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file \ + -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index 97dda9aee7..5f16b17c97 100644 --- a/meson.build +++ b/meson.build @@ -400,9 +400,14 @@ if have_system or have_tools pixman =3D dependency('pixman-1', required: have_system, version:'>=3D0.= 21.8', method: 'pkg-config', kwargs: static_kwargs) endif -libaio =3D cc.find_library('aio', required: false) zlib =3D dependency('zlib', required: true, kwargs: static_kwargs) =20 +libaio =3D not_found +if not get_option('linux_aio').auto() or have_block + libaio =3D cc.find_library('aio', has_headers: ['libaio.h'], + required: get_option('linux_aio'), + kwargs: static_kwargs) +endif linux_io_uring =3D not_found if not get_option('linux_io_uring').auto() or have_block linux_io_uring =3D dependency('liburing', required: get_option('linux_io= _uring'), @@ -1427,6 +1432,7 @@ config_host_data.set('CONFIG_EBPF', libbpf.found()) config_host_data.set('CONFIG_LIBDAXCTL', libdaxctl.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) +config_host_data.set('CONFIG_LINUX_AIO', libaio.found()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) config_host_data.set('CONFIG_RBD', rbd.found()) @@ -3288,7 +3294,7 @@ summary_info +=3D {'JACK support': jack} summary_info +=3D {'brlapi support': brlapi} summary_info +=3D {'vde support': config_host.has_key('CONFIG_VDE')} summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} -summary_info +=3D {'Linux AIO support': config_host.has_key('CONFIG_LINUX_= AIO')} +summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} summary_info +=3D {'ATTR/XATTR support': libattr} summary_info +=3D {'RDMA support': config_host.has_key('CONFIG_RDMA')} diff --git a/meson_options.txt b/meson_options.txt index 8f9c3b5b17..904e15d54c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -103,6 +103,8 @@ option('libusb', type : 'feature', value : 'auto', description: 'libusb support for USB passthrough') option('libxml2', type : 'feature', value : 'auto', description: 'libxml2 support for Parallels image format') +option('linux_aio', type : 'feature', value : 'auto', + description: 'Linux AIO support') option('linux_io_uring', type : 'feature', value : 'auto', description: 'Linux io_uring support') option('lzfse', type : 'feature', value : 'auto', diff --git a/stubs/meson.build b/stubs/meson.build index beee31ec73..f6aa3aa94f 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -20,7 +20,9 @@ endif stub_ss.add(files('iothread-lock.c')) stub_ss.add(files('isa-bus.c')) stub_ss.add(files('is-daemonized.c')) -stub_ss.add(when: 'CONFIG_LINUX_AIO', if_true: files('linux-aio.c')) +if libaio.found() + stub_ss.add(files('linux-aio.c')) +endif stub_ss.add(files('migr-blocker.c')) stub_ss.add(files('module-opts.c')) stub_ss.add(files('monitor.c')) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039199339822.2788939934684; Tue, 12 Oct 2021 04:46:39 -0700 (PDT) Received: from localhost ([::1]:38152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGEw-0007Ix-0X for importer@patchew.org; Tue, 12 Oct 2021 07:46:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFii-0000jC-Jo for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:20 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:46791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFig-0007YJ-LF for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:20 -0400 Received: by mail-ed1-x532.google.com with SMTP id z20so79576233edc.13 for ; Tue, 12 Oct 2021 04:13:18 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JGULwIH3Wvj2zfTBa8J3XaHIsDoJNKVZwpnyWH+amok=; b=ks3HrbqTg72ngtj4Bt2qrKtZzYfqvd5FeEloPF+CSWUMm3tHT1gO5vgZPXue+YFbuP TkLATb8IchvgJc6zDJffUtmj9gqkKtuiGNpybQfQGX+Xn3twjbGLbmSlX85wrH6oxwHS WGUDIcrx3Qxv6Ucpwqt7Nsg0t1MTl2uXVgcQlf43V0sLRv7LQP1Ow2qonA3pj3DhyVTY 8gISUBnYVY7SZN0qM5FcoglSu/mBJRjxl2d5iNtiaTV8mnI9HodXdOfWK1qKk5kvAmQB 67w14OwuyiWd+udrIFg1m9OfnEjuv+Q7OvHUI6Wzgq/V8jVNlqbksUUfX081LgxXgy0t UwEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JGULwIH3Wvj2zfTBa8J3XaHIsDoJNKVZwpnyWH+amok=; b=UhHYTVjLRzw4Cpzuh+HLC4p7a2z92wUF6B/yEFFkVbxeTbfPhnmP8cuuI6peI8uujB qM8SV75rW2zBWXwIHbRopbaMKMwCLvMr8TDOtYIBvjvFS5Z6rII3AD6rIz4tLDNg8Hrj rVtn8cRBcYRX+9Klvm2Zrz64VnbwLcg9CKlSkW95ImwzCWATyFA9tem5Z26knosWFQYk t5yZFaSGgOLLajHsy47M/fxygUhEW0XKp8WW0Qetk8Z5CXT7qyGfLm/KWVpvUCqgloky Ei/awb2Br4J+pwnL5i7n1MjtBIKuNp6HCrxC38DNuFBGVRTVl3x4hWwljGBPCoNGPF9B wiwg== X-Gm-Message-State: AOAM531PChzMVMPVQy/PlbTx1PbGAk/T+9a9FTBDMTmCXeL67Q8VH5ja 3s9GvZreo3F8kXwMGyDlMNva32Jfbr0= X-Google-Smtp-Source: ABdhPJzL89VErq+GGCVFNbqBFWcQxlIwLZGB39s6ylTGbWc8+aXfGxnDtmKAQim2FbPsP+a+MbLIKg== X-Received: by 2002:aa7:d9c1:: with SMTP id v1mr23634009eds.175.1634037197107; Tue, 12 Oct 2021 04:13:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 16/24] configure, meson: move vde detection to meson Date: Tue, 12 Oct 2021 13:12:54 +0200 Message-Id: <20211012111302.246627-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039200208100001 Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-11-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 35 ++++------------------------------- meson.build | 26 +++++++++++++++++++++++--- meson_options.txt | 2 ++ net/meson.build | 2 +- 4 files changed, 30 insertions(+), 35 deletions(-) diff --git a/configure b/configure index 86bc4b52d7..a2b1d54be8 100755 --- a/configure +++ b/configure @@ -301,7 +301,7 @@ libudev=3D"auto" mpath=3D"auto" vnc=3D"auto" sparse=3D"auto" -vde=3D"$default_feature" +vde=3D"auto" vnc_sasl=3D"auto" vnc_jpeg=3D"auto" vnc_png=3D"auto" @@ -1022,9 +1022,9 @@ for opt do ;; --enable-slirp=3Dsystem) slirp=3D"system" ;; - --disable-vde) vde=3D"no" + --disable-vde) vde=3D"disabled" ;; - --enable-vde) vde=3D"yes" + --enable-vde) vde=3D"enabled" ;; --disable-netmap) netmap=3D"no" ;; @@ -2901,30 +2901,6 @@ EOF fi fi =20 -########################################## -# vde libraries probe -if test "$vde" !=3D "no" ; then - vde_libs=3D"-lvdeplug" - cat > $TMPC << EOF -#include -int main(void) -{ - struct vde_open_args a =3D {0, 0, 0}; - char s[] =3D ""; - vde_open(s, s, &a); - return 0; -} -EOF - if compile_prog "" "$vde_libs" ; then - vde=3Dyes - else - if test "$vde" =3D "yes" ; then - feature_not_found "vde" "Install vde (Virtual Distributed Ethernet) = devel" - fi - vde=3Dno - fi -fi - ########################################## # netmap support probe # Apart from looking for netmap headers, we make sure that the host API ve= rsion @@ -4197,10 +4173,6 @@ if test "$slirp_smbd" =3D "yes" ; then echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak fi -if test "$vde" =3D "yes" ; then - echo "CONFIG_VDE=3Dy" >> $config_host_mak - echo "VDE_LIBS=3D$vde_libs" >> $config_host_mak -fi if test "$netmap" =3D "yes" ; then echo "CONFIG_NETMAP=3Dy" >> $config_host_mak fi @@ -4750,6 +4722,7 @@ if test "$skip_meson" =3D no; then -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ + -Dvde=3D$vde \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index 5f16b17c97..e98efd3480 100644 --- a/meson.build +++ b/meson.build @@ -500,9 +500,28 @@ else xkbcommon =3D dependency('xkbcommon', required: get_option('xkbcommon'), method: 'pkg-config', kwargs: static_kwargs) endif + vde =3D not_found -if config_host.has_key('CONFIG_VDE') - vde =3D declare_dependency(link_args: config_host['VDE_LIBS'].split()) +if not get_option('vde').auto() or have_system or have_tools + vde =3D cc.find_library('vdeplug', has_headers: ['libvdeplug.h'], + required: get_option('vde'), + kwargs: static_kwargs) +endif +if vde.found() and not cc.links(''' + #include + int main(void) + { + struct vde_open_args a =3D {0, 0, 0}; + char s[] =3D ""; + vde_open(s, s, &a); + return 0; + }''', dependencies: vde) + vde =3D not_found + if get_option('cap_ng').enabled() + error('could not link libvdeplug') + else + warning('could not link libvdeplug, disabling') + endif endif =20 pulse =3D not_found @@ -1441,6 +1460,7 @@ config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.fo= und()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) +config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) @@ -3292,7 +3312,7 @@ if targetos =3D=3D 'linux' endif summary_info +=3D {'JACK support': jack} summary_info +=3D {'brlapi support': brlapi} -summary_info +=3D {'vde support': config_host.has_key('CONFIG_VDE')} +summary_info +=3D {'vde support': vde} summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} diff --git a/meson_options.txt b/meson_options.txt index 904e15d54c..7d0fa1c7f4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -129,6 +129,8 @@ option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', description: 'libusbredir support') +option('vde', type : 'feature', value : 'auto', + description: 'vde network backend support') option('virglrenderer', type : 'feature', value : 'auto', description: 'virgl rendering support') option('vnc', type : 'feature', value : 'auto', diff --git a/net/meson.build b/net/meson.build index 1076b0a7ab..491144a697 100644 --- a/net/meson.build +++ b/net/meson.build @@ -20,7 +20,7 @@ softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter= -replay.c')) =20 softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) softmmu_ss.add(when: slirp, if_true: files('slirp.c')) -softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c')) +softmmu_ss.add(when: vde, if_true: files('vde.c')) softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c')) vhost_user_ss =3D ss.source_set() vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'= ), if_false: files('vhost-user-stub.c')) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039362993456.5884577201001; Tue, 12 Oct 2021 04:49:22 -0700 (PDT) Received: from localhost ([::1]:46570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGHZ-0004kj-Uc for importer@patchew.org; Tue, 12 Oct 2021 07:49:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFij-0000lT-02 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:21 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:37692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFih-0007ZD-6B for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:20 -0400 Received: by mail-ed1-x534.google.com with SMTP id y12so66814303eda.4 for ; Tue, 12 Oct 2021 04:13:18 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=egO8CcBP38r8vMR00kJzKnE8qCDEvtuqwYl8X7EjwHM=; b=GTYdQR6oD7lLmyUo0HkNtVp9RE/24gQ4y+U+iGs6FhVxmq07WpwNCSTvAKUaae09Ck eJ0COvnd6qtUXw2Z3fbmqZ9VkV0q34bs0RscvTQyayf/PXqE4oQ0QgmJW+NJOfxW4WNg pWVjq+X7fzL3zeevddz4gGHOhNriMT+PZSb48tqzqAHoLed5aIh7vhDaujzwiEP5/NPs 6KLwy//a5FrPdfxU8em2sr36bLm+xWVACQQda9BkeGDdQinHMziEa11GO+do93rhzIoy ydR4oiBrUUwm5MzWSlkTVqjLGei33J+MgCrcdPwbsa5osd9NeTPxd0hz6On3/CbLj9Yt SyIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=egO8CcBP38r8vMR00kJzKnE8qCDEvtuqwYl8X7EjwHM=; b=Soog2QdlKcAl1eGrak9ynCyyAq53pUm8aPG1XJ5K8cR2PpXskNL4bg9nsW2lxQiOxO 9V5Ogc2Wlg2a1FcV3eEEYI3D6jp8J3/SxwNM2IiAk+U7mGdqsLydE2sDqoTP0xO2UIDc wa+SHoJuFRtZN8q8vB/WUl0DYsYbaveHeT9YtlmEjh2RAVB2/WeM1BW/DX4r7fYGZJoi /lS6fzbvTB0a7mq7myv7XUT20xkqK2xGRv6DfuNoZiWLIzoJCvJ/qZDSIgkW7vvynFv8 Bp0y3nCSrWpNJVlYsLF9qQ/dHYxSjamvq2Oe7xwJa3KNaeENFAQqmf3f7kv+mYbw0wOW kXug== X-Gm-Message-State: AOAM533I2X534ruRCejqx4ONxkZ107Xv40fo5uaEMYGFLDl6++Q25YYA vurKrmjVaMn4ZU6kpFhNWtncw0sFCMc= X-Google-Smtp-Source: ABdhPJzEtwoEYhLhyiUJQsOEp+o8VrfXG1diBJKSZ6D2N5uaWTat9zv1aq/toSBut/+wiLc92HTSlQ== X-Received: by 2002:a50:d9c5:: with SMTP id x5mr50171050edj.37.1634037197890; Tue, 12 Oct 2021 04:13:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 17/24] configure, meson: move netmap detection to meson Date: Tue, 12 Oct 2021 13:12:55 +0200 Message-Id: <20211012111302.246627-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039364869100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Message-Id: <20211007130829.632254-12-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 40 ++++------------------------------------ meson.build | 19 ++++++++++++++++++- meson_options.txt | 2 ++ net/meson.build | 4 +++- 4 files changed, 27 insertions(+), 38 deletions(-) diff --git a/configure b/configure index a2b1d54be8..bb3bb3e58f 100755 --- a/configure +++ b/configure @@ -292,7 +292,7 @@ iconv=3D"auto" curses=3D"auto" docs=3D"auto" fdt=3D"auto" -netmap=3D"no" +netmap=3D"auto" sdl=3D"auto" sdl_image=3D"auto" virtiofsd=3D"auto" @@ -701,7 +701,6 @@ FreeBSD) bsd_user=3D"yes" make=3D"${MAKE-gmake}" # needed for kinfo_getvmmap(3) in libutil.h - netmap=3D"" # enable netmap autodetect ;; DragonFly) bsd=3D"yes" @@ -1026,9 +1025,9 @@ for opt do ;; --enable-vde) vde=3D"enabled" ;; - --disable-netmap) netmap=3D"no" + --disable-netmap) netmap=3D"disabled" ;; - --enable-netmap) netmap=3D"yes" + --enable-netmap) netmap=3D"enabled" ;; --disable-xen) xen=3D"disabled" ;; @@ -2901,34 +2900,6 @@ EOF fi fi =20 -########################################## -# netmap support probe -# Apart from looking for netmap headers, we make sure that the host API ve= rsion -# supports the netmap backend (>=3D11). The upper bound (15) is meant to s= imulate -# a minor/major version number. Minor new features will be marked with val= ues up -# to 15, and if something happens that requires a change to the backend we= will -# move above 15, submit the backend fixes and modify this two bounds. -if test "$netmap" !=3D "no" ; then - cat > $TMPC << EOF -#include -#include -#include -#include -#if (NETMAP_API < 11) || (NETMAP_API > 15) -#error -#endif -int main(void) { return 0; } -EOF - if compile_prog "" "" ; then - netmap=3Dyes - else - if test "$netmap" =3D "yes" ; then - feature_not_found "netmap" - fi - netmap=3Dno - fi -fi - ########################################## # plugin linker support probe =20 @@ -4173,9 +4144,6 @@ if test "$slirp_smbd" =3D "yes" ; then echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak fi -if test "$netmap" =3D "yes" ; then - echo "CONFIG_NETMAP=3Dy" >> $config_host_mak -fi if test "$l2tpv3" =3D "yes" ; then echo "CONFIG_L2TPV3=3Dy" >> $config_host_mak fi @@ -4722,7 +4690,7 @@ if test "$skip_meson" =3D no; then -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ - -Dvde=3D$vde \ + -Dnetmap=3D$netmap -Dvde=3D$vde \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index e98efd3480..68bf65a923 100644 --- a/meson.build +++ b/meson.build @@ -1656,6 +1656,23 @@ config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_s= ource_prefix + ''' return mlockall(MCL_FUTURE); }''')) =20 +have_netmap =3D false +if not get_option('netmap').disabled() and have_system + have_netmap =3D cc.compiles(''' + #include + #include + #include + #include + #if (NETMAP_API < 11) || (NETMAP_API > 15) + #error + #endif + int main(void) { return 0; }''') + if not have_netmap and get_option('netmap').enabled() + error('Netmap headers not available') + endif +endif +config_host_data.set('CONFIG_NETMAP', have_netmap) + # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr': # xfs headers will not try to redefine structs from linux headers @@ -3313,7 +3330,7 @@ endif summary_info +=3D {'JACK support': jack} summary_info +=3D {'brlapi support': brlapi} summary_info +=3D {'vde support': vde} -summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} +summary_info +=3D {'netmap support': have_netmap} summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} summary_info +=3D {'ATTR/XATTR support': libattr} diff --git a/meson_options.txt b/meson_options.txt index 7d0fa1c7f4..d8e67ae481 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -129,6 +129,8 @@ option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', description: 'libusbredir support') +option('netmap', type : 'feature', value : 'auto', + description: 'netmap network backend support') option('vde', type : 'feature', value : 'auto', description: 'vde network backend support') option('virglrenderer', type : 'feature', value : 'auto', diff --git a/net/meson.build b/net/meson.build index 491144a697..94383e7460 100644 --- a/net/meson.build +++ b/net/meson.build @@ -21,7 +21,9 @@ softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter= -replay.c')) softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) softmmu_ss.add(when: slirp, if_true: files('slirp.c')) softmmu_ss.add(when: vde, if_true: files('vde.c')) -softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c')) +if have_netmap + softmmu_ss.add(files('netmap.c')) +endif vhost_user_ss =3D ss.source_set() vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'= ), if_false: files('vhost-user-stub.c')) softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss) --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039530125382.82642959337943; Tue, 12 Oct 2021 04:52:10 -0700 (PDT) Received: from localhost ([::1]:54370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGKG-0001bX-Md for importer@patchew.org; Tue, 12 Oct 2021 07:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFik-0000on-5E for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:22 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:36729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFih-0007ZX-Th for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:21 -0400 Received: by mail-ed1-x535.google.com with SMTP id d3so52076019edp.3 for ; Tue, 12 Oct 2021 04:13:19 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rFWlNHgZp+u4/R/Eh7ozjTenLSMf75mKcf5hLBHebxA=; b=YtkyqJCubKRYi5ShqbT8OhWYfUn1IucA5hZcuvTDABxx1AI7xGg904HBD8zLvZ/DYn 8LF1TGaXlgCL4UECVP+/JFzvovhzIDSJ37jweu1H5VFEj7F1iFK28gQ6CP4AmX+uxJ87 CDj2FZGNIthSXJWzRXa87jUJ/ru3wr148r/PS0n9Y9fQNyWMFnCuyazjoMfGVxPC+b3c 8NTJ8fX+TgqHvn0oFQTQiswNLfRnM5Viq9O9UHQtEzP4e8bstxrZkfIc/FnBqfDl6RhE 9mSZr7krRfjOayBDf5rBe5BN7jzgKqyVMFo9USkz+cGa9lMczK5gtnn37PsbL/AkgzsV WVgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rFWlNHgZp+u4/R/Eh7ozjTenLSMf75mKcf5hLBHebxA=; b=abZ8zX2ohYra0/7p5Nh0sZvISbXr0C4BbotGfKSYMTXOcGJYKGYsgTcfku+IG6dIqv i3EsN3bi5bDal3PATlG5VdBeLUMMV3ZI+wcYyKHZ0KIclGifkKCFtvAGVFLgmxD9955c HeAi+sufDLUdEjNjZ+LLOHAdLFpKgC2K0rJeVObGU1VFS8M0JFL6MiOs/y8YxlcFDZhB p/86ZTpYo45iGcO6C1MS2r0EfKpfShO4rSS9kpptNq2au3KERlWmLb9PJFKzPJ5Tbtlv jN85iCS2m9cchftaDq3Z54WQzbqZAFPu8mxN55ULDI1BDKC0Mu7j5IeUxNqisTqWdqpS dwFw== X-Gm-Message-State: AOAM5307nLusXDfqeDL1XC5kj6jcRPkWIiZvf8/A/Swa6+RQpkb9mhLu WlJbDIWPvtH2Ull3+Jzk925N1bis93Y= X-Google-Smtp-Source: ABdhPJwuxm1pVTQ2lWP1kCHwnRPslf54QG+71FG0Z8yoVWzyM1WInimzV1sv5bWkQMA8Vq1AYNe0cw== X-Received: by 2002:a05:6402:2552:: with SMTP id l18mr30099608edb.370.1634037198639; Tue, 12 Oct 2021 04:13:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 18/24] configure, meson: move Spice configure handling to meson Date: Tue, 12 Oct 2021 13:12:56 +0200 Message-Id: <20211012111302.246627-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039530875100001 From: Marc-Andr=C3=A9 Lureau Add meson feature options for Spice and Spice protocol, and move detection logic out of configure. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007102453.978041-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini Message-Id: <20211007130829.632254-13-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- chardev/meson.build | 2 +- configure | 47 +-------------------------------------------- meson.build | 29 +++++++++++++++++----------- meson_options.txt | 4 ++++ ui/meson.build | 4 ++-- 5 files changed, 26 insertions(+), 60 deletions(-) diff --git a/chardev/meson.build b/chardev/meson.build index 32377af383..325ba2bdb9 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -35,7 +35,7 @@ if brlapi.found() chardev_modules +=3D { 'baum': module_ss } endif =20 -if config_host.has_key('CONFIG_SPICE') +if spice.found() module_ss =3D ss.source_set() module_ss.add(when: [spice], if_true: files('spice.c')) chardev_modules +=3D { 'spice': module_ss } diff --git a/configure b/configure index bb3bb3e58f..016814d23b 100755 --- a/configure +++ b/configure @@ -369,7 +369,7 @@ pie=3D"" qom_cast_debug=3D"yes" trace_backends=3D"log" trace_file=3D"trace" -spice=3D"$default_feature" +spice=3D"auto" spice_protocol=3D"auto" rbd=3D"auto" smartcard=3D"auto" @@ -3229,41 +3229,6 @@ EOF fi fi =20 -########################################## -# spice probe -if test "$spice_protocol" !=3D "no" ; then - spice_protocol_cflags=3D$($pkg_config --cflags spice-protocol 2>/dev/nul= l) - if $pkg_config --atleast-version=3D0.12.3 spice-protocol; then - spice_protocol=3D"yes" - else - if test "$spice_protocol" =3D "yes" ; then - feature_not_found "spice_protocol" \ - "Install spice-protocol(>=3D0.12.3) devel" - fi - spice_protocol=3D"no" - fi -fi - -if test "$spice" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { spice_server_new(); return 0; } -EOF - spice_cflags=3D$($pkg_config --cflags spice-protocol spice-server 2>/dev= /null) - spice_libs=3D$($pkg_config --libs spice-protocol spice-server 2>/dev/nul= l) - if $pkg_config --atleast-version=3D0.12.5 spice-server && \ - test "$spice_protocol" =3D "yes" && \ - compile_prog "$spice_cflags" "$spice_libs" ; then - spice=3D"yes" - else - if test "$spice" =3D "yes" ; then - feature_not_found "spice" \ - "Install spice-server(>=3D0.12.5) devel" - fi - spice=3D"no" - fi -fi - ########################################## # check if we have VSS SDK headers for win =20 @@ -4233,16 +4198,6 @@ if test "$tcg" =3D "enabled" -a "$tcg_interpreter" = =3D "true" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak fi =20 -if test "$spice_protocol" =3D "yes" ; then - echo "CONFIG_SPICE_PROTOCOL=3Dy" >> $config_host_mak - echo "SPICE_PROTOCOL_CFLAGS=3D$spice_protocol_cflags" >> $config_host_mak -fi -if test "$spice" =3D "yes" ; then - echo "CONFIG_SPICE=3Dy" >> $config_host_mak - echo "SPICE_CFLAGS=3D$spice_cflags $spice_protocol_cflags" >> $config_ho= st_mak - echo "SPICE_LIBS=3D$spice_libs" >> $config_host_mak -fi - if test "$opengl" =3D "yes" ; then echo "CONFIG_OPENGL=3Dy" >> $config_host_mak echo "OPENGL_CFLAGS=3D$opengl_cflags" >> $config_host_mak diff --git a/meson.build b/meson.build index 68bf65a923..bf1b372a4a 100644 --- a/meson.build +++ b/meson.build @@ -540,17 +540,20 @@ if not get_option('jack').auto() or have_system method: 'pkg-config', kwargs: static_kwargs) endif =20 -spice =3D not_found -spice_headers =3D not_found spice_protocol =3D not_found -if 'CONFIG_SPICE' in config_host - spice =3D declare_dependency(compile_args: config_host['SPICE_CFLAGS'].s= plit(), - link_args: config_host['SPICE_LIBS'].split()) - spice_headers =3D declare_dependency(compile_args: config_host['SPICE_CF= LAGS'].split()) +if not get_option('spice_protocol').auto() or have_system + spice_protocol =3D dependency('spice-protocol', version: '>=3D0.12.3', + required: get_option('spice_protocol'), + method: 'pkg-config', kwargs: static_kwargs) endif -if 'CONFIG_SPICE_PROTOCOL' in config_host - spice_protocol =3D declare_dependency(compile_args: config_host['SPICE_P= ROTOCOL_CFLAGS'].split()) +spice =3D not_found +if not get_option('spice').auto() or have_system + spice =3D dependency('spice-server', version: '>=3D0.12.5', + required: get_option('spice'), + method: 'pkg-config', kwargs: static_kwargs) endif +spice_headers =3D spice.partial_dependency(compile_args: true, includes: t= rue) + rt =3D cc.find_library('rt', required: false) libdl =3D not_found if 'CONFIG_PLUGIN' in config_host @@ -1481,6 +1484,8 @@ 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_SPICE_PROTOCOL', spice_protocol.found()) +config_host_data.set('CONFIG_SPICE', spice.found()) config_host_data.set('CONFIG_X11', x11.found()) config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version(= ))) @@ -1761,7 +1766,7 @@ have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD= ') host_kconfig =3D \ (get_option('fuzzing') ? ['CONFIG_FUZZ=3Dy'] : []) + \ ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ - ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ + (spice.found() ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ @@ -3339,8 +3344,10 @@ summary_info +=3D {'PVRDMA support': config_host.= has_key('CONFIG_PVRDMA')} summary_info +=3D {'fdt support': fdt_opt =3D=3D 'disabled' ? false = : fdt_opt} summary_info +=3D {'libcap-ng support': libcap_ng} summary_info +=3D {'bpf support': libbpf} -# TODO: add back protocol and server version -summary_info +=3D {'spice support': config_host.has_key('CONFIG_SPICE'= )} +summary_info +=3D {'spice protocol support': spice_protocol} +if spice_protocol.found() + summary_info +=3D {' spice server support': spice} +endif summary_info +=3D {'rbd support': rbd} summary_info +=3D {'xfsctl support': config_host.has_key('CONFIG_XFS')} summary_info +=3D {'smartcard support': cacard} diff --git a/meson_options.txt b/meson_options.txt index d8e67ae481..5a140af7f7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -125,6 +125,10 @@ option('smartcard', type : 'feature', value : 'auto', description: 'CA smartcard emulation support') option('snappy', type : 'feature', value : 'auto', description: 'snappy compression support') +option('spice', type : 'feature', value : 'auto', + description: 'Spice server support') +option('spice_protocol', type : 'feature', value : 'auto', + description: 'Spice protocol support') option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', diff --git a/ui/meson.build b/ui/meson.build index a73beb0e54..ee8ef27714 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -89,7 +89,7 @@ if sdl.found() ui_modules +=3D {'sdl' : sdl_ss} endif =20 -if config_host.has_key('CONFIG_SPICE') +if spice.found() spice_core_ss =3D ss.source_set() spice_core_ss.add(spice, pixman, files( 'spice-core.c', @@ -99,7 +99,7 @@ if config_host.has_key('CONFIG_SPICE') ui_modules +=3D {'spice-core' : spice_core_ss} endif =20 -if config_host.has_key('CONFIG_SPICE') and config_host.has_key('CONFIG_GIO= ') +if spice.found() and config_host.has_key('CONFIG_GIO') spice_ss =3D ss.source_set() spice_ss.add(spice, gio, pixman, files('spice-app.c')) ui_modules +=3D {'spice-app': spice_ss} --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634040811234286.36469358121997; Tue, 12 Oct 2021 05:13:31 -0700 (PDT) Received: from localhost ([::1]:42504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGew-00076o-1V for importer@patchew.org; Tue, 12 Oct 2021 08:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFik-0000pG-7e for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:22 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:37690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFii-0007Zf-Nb for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:21 -0400 Received: by mail-ed1-x531.google.com with SMTP id y12so66814519eda.4 for ; Tue, 12 Oct 2021 04:13:20 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uBCh3FBpRTKb8F3VLtXmr6hJ+AmaUFecRv60QOVixJM=; b=OvGpb2yMB648VzBT62bJiqv2FJz9dkYEUGsRvRa0jvwZ6/9ABTPYQDSmFMoPzJyZAG XYsZxWyqq6JZIUMttIo+OnCbUK4lyjze3pc0ErpWdUkUNNV/LHo+9iX0ER9K57hBNAKW NvVlPEbZ2n+r3aAzNXsh4lArg+2hM3OHM4nutYU7DBRn9xG4aQWzO7aTAXvKxP96PXjz Z9urLUzF0VLnKCA6VK9ey5YFLAtfDaSwlV9srJVKuLNUqwR7rNSBew52uBF4HOyp+c+8 DV8YUMB397gcXPkXgsTacq0e1/7NEafiURqTkNrbsLMv25IeLotD38iAyh5/YyCbO0N/ /YpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uBCh3FBpRTKb8F3VLtXmr6hJ+AmaUFecRv60QOVixJM=; b=zMOPadwqMVI5PtYFaMn9dh53MJVLHTV4oKvV5+gwWct+J9BSnSrUqEkrzHasleVIZa AhL9ppvT63obODZLoGZ/jjkhqZjw6UV5DASBszq6aGruKV8mQgak/AKHXMmvAnJOsFGe f4aatmF8PM15C1bYbKfn7R4sbsSZMZIxlJVxSH1wY7egqYvq0FIfSIyCkzqtA2ZQFc2A NJznumS7crznPp3Y9kz2SNsvV0Zs1+56am9LB7Wqy9CQyJRWweM8aL8Fa5yosfbr9i5t R2NF6+C6omkFLdbj8eR+2BpAck2TeKiOi4FT9tpE1npLCFc+yUXx0CKo4a6HQwRAwmNf QOUg== X-Gm-Message-State: AOAM533FnCfc99dMGfWD21e6/6soldGjWrE/jZmLhjMCZjbSKnQjJW49 bJC0IkrWgCoBJSpRFmPG/8kgb6F2/Tc= X-Google-Smtp-Source: ABdhPJxMJOWb3lhu2ZIzVRR2k5lZCh5+SNHzJivsbYm7icgez6LtB2N04GJsCBbbZi9cvZ41dnwSig== X-Received: by 2002:a17:906:9414:: with SMTP id q20mr33205971ejx.241.1634037199349; Tue, 12 Oct 2021 04:13:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 19/24] configure: remove obsolete Solaris ar check Date: Tue, 12 Oct 2021 13:12:57 +0200 Message-Id: <20211012111302.246627-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634040812133100001 Meson already has its own logic to find the "ar" binary, so remove the Solaris specific check. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Thomas Huth Message-Id: <20211007130829.632254-14-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/configure b/configure index 016814d23b..2091844ad6 100755 --- a/configure +++ b/configure @@ -2284,21 +2284,6 @@ EOF fi fi =20 -######################################### -# Solaris specific configure tool chain decisions - -if test "$solaris" =3D "yes" ; then - if has ar; then - : - else - if test -f /usr/ccs/bin/ar ; then - error_exit "No path includes ar" \ - "Add /usr/ccs/bin to your path and rerun configure" - fi - error_exit "No path includes ar" - fi -fi - if test "$tcg" =3D "enabled"; then git_submodules=3D"$git_submodules tests/fp/berkeley-testfloat-3" git_submodules=3D"$git_submodules tests/fp/berkeley-softfloat-3" --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039669403563.9495190577001; Tue, 12 Oct 2021 04:54:29 -0700 (PDT) Received: from localhost ([::1]:33818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGMW-0006fe-Ag for importer@patchew.org; Tue, 12 Oct 2021 07:54:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFim-0000tj-9k for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:24 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:40752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFij-0007Zr-CW for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:22 -0400 Received: by mail-ed1-x52d.google.com with SMTP id g8so79736759edt.7 for ; Tue, 12 Oct 2021 04:13:21 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1fuusyPU1muAnX8OHmMRKHrFEYQim3jxp9adT/chl64=; b=FeiutYi1ey45hYJjnH2QasLbvdKo55TfllCro+QR31uCd31h9IdVR5GWbH67D5+0mD Lqc8Le5MKSI1fbZXGr54f9oPx0kpmLkiLmI6yeAyCmY5QdIOrEm4fMuMNXgM8rrkaHaU jGbTJMU3upJO1wFZVRJj2j1TF1ViexJ5RLZ2bsVYzIfUXt0b/HrtNk9nIuDrhyFFNyQI MhriPz8r4NM/si8/ucYBN4tOU5ZTpAM6aoUToG98KJdX8G1eeBnFhV6qaqAbulsGss6Y 13uRHkIBb6qoR+GhFgjY6/2ntb8IifjxPCvO62QApQcCdsXcaD4+05MqYBXpGIU8RF3Z uNjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1fuusyPU1muAnX8OHmMRKHrFEYQim3jxp9adT/chl64=; b=5u05lFns/v4l9F/VeY1c7cjgL0dfdTKvgSFNets4NQ/3JZWJNGJI363XLsv/Pm3z3r ZfnFBgYYgxiCsz/DzcmT/rOEAILt0yJ+8MYREgoGlAGTQujwE/KPoyrB5PXuluFOWpfX L+LHKoZqwcou8slFlqtD1Dg/R4+99jt+z4ao7gVJlZYTuQrJaZk6XdDDzv/7BU1hTL13 84XP9KzsB61brOdNvgdLPc3zW3xRHFpfxT9Ia8w4k4UiqlmMzKa9wjUZcZFKO17jk93Z bz5Z0yPIXeXlwMRbZQkcKz70qMwYvGzedJXhrOEH1VCM6XxLdlcDYZl7nwdN+C7PSDvU OBaQ== X-Gm-Message-State: AOAM531ASLBeKUuGJPeBQVDxbTFmtAh7QJ62FmtkwNgvvH7u6YUxB2D9 /jiVT30TQxN1J5dDuk4qgqxLBILNs8E= X-Google-Smtp-Source: ABdhPJyk7i0iOQJ7FZwMfHcNyTtG04XxzifgTDsRB3yX4ijmXCGp0xYLNHn68kYllLxoUIwu+hTgZw== X-Received: by 2002:a17:906:70c5:: with SMTP id g5mr34043238ejk.63.1634037200067; Tue, 12 Oct 2021 04:13:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 20/24] configure, meson: move more compiler checks to Meson Date: Tue, 12 Oct 2021 13:12:58 +0200 Message-Id: <20211012111302.246627-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039669767100001 Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-15-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 91 ------------------------------------------------ meson.build | 44 +++++++++++++++++++++++ util/meson.build | 4 ++- 3 files changed, 47 insertions(+), 92 deletions(-) diff --git a/configure b/configure index 2091844ad6..33d330dcc9 100755 --- a/configure +++ b/configure @@ -3108,19 +3108,6 @@ elif test "$tpm" =3D "yes"; then fi fi =20 -########################################## -# iovec probe -cat > $TMPC < -#include -#include -int main(void) { return sizeof(struct iovec); } -EOF -iovec=3Dno -if compile_prog "" "" ; then - iovec=3Dyes -fi - ########################################## # fdt probe =20 @@ -3562,42 +3549,6 @@ EOF fi fi =20 -######################################### -# See if 64-bit atomic operations are supported. -# Note that without __atomic builtins, we can only -# assume atomic loads/stores max at pointer size. - -cat > $TMPC << EOF -#include -int main(void) -{ - uint64_t x =3D 0, y =3D 0; - y =3D __atomic_load_n(&x, __ATOMIC_RELAXED); - __atomic_store_n(&x, y, __ATOMIC_RELAXED); - __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, __ATOMIC_REL= AXED); - __atomic_exchange_n(&x, y, __ATOMIC_RELAXED); - __atomic_fetch_add(&x, y, __ATOMIC_RELAXED); - return 0; -} -EOF -if compile_prog "" "" ; then - atomic64=3Dyes -fi - -######################################## -# check if getauxval is available. - -getauxval=3Dno -cat > $TMPC << EOF -#include -int main(void) { - return getauxval(AT_HWCAP) =3D=3D 0; -} -EOF -if compile_prog "" "" ; then - getauxval=3Dyes -fi - ######################################## # check if ccache is interfering with # semantic analysis of macros @@ -3671,33 +3622,6 @@ else membarrier=3Dno fi =20 -########################################## -# check for usable AF_VSOCK environment -have_af_vsock=3Dno -cat > $TMPC << EOF -#include -#include -#include -#if !defined(AF_VSOCK) -# error missing AF_VSOCK flag -#endif -#include -int main(void) { - int sock, ret; - struct sockaddr_vm svm; - socklen_t len =3D sizeof(svm); - sock =3D socket(AF_VSOCK, SOCK_STREAM, 0); - ret =3D getpeername(sock, (struct sockaddr *)&svm, &len); - if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { - return 0; - } - return -1; -} -EOF -if compile_prog "" "" ; then - have_af_vsock=3Dyes -fi - ########################################## # check for usable AF_ALG environment have_afalg=3Dno @@ -4173,9 +4097,6 @@ fi if test "$vhost_user_fs" =3D "yes" ; then echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak fi -if test "$iovec" =3D "yes" ; then - echo "CONFIG_IOVEC=3Dy" >> $config_host_mak -fi if test "$membarrier" =3D "yes" ; then echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_mak fi @@ -4245,14 +4166,6 @@ if test "$cmpxchg128" =3D "yes" ; then echo "CONFIG_CMPXCHG128=3Dy" >> $config_host_mak fi =20 -if test "$atomic64" =3D "yes" ; then - echo "CONFIG_ATOMIC64=3Dy" >> $config_host_mak -fi - -if test "$getauxval" =3D "yes" ; then - echo "CONFIG_GETAUXVAL=3Dy" >> $config_host_mak -fi - if test "$libssh" =3D "yes" ; then echo "CONFIG_LIBSSH=3Dy" >> $config_host_mak echo "LIBSSH_CFLAGS=3D$libssh_cflags" >> $config_host_mak @@ -4280,10 +4193,6 @@ if test "$replication" =3D "yes" ; then echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak fi =20 -if test "$have_af_vsock" =3D "yes" ; then - echo "CONFIG_AF_VSOCK=3Dy" >> $config_host_mak -fi - if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index bf1b372a4a..ca7b9d60af 100644 --- a/meson.build +++ b/meson.build @@ -1550,6 +1550,8 @@ config_host_data.set('CONFIG_INOTIFY', cc.has_header_symbol('sys/inotify.h', 'inotify_init')) config_host_data.set('CONFIG_INOTIFY1', cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) +config_host_data.set('CONFIG_IOVEC', + cc.has_header_symbol('sys/uio.h', 'struct iovec')) config_host_data.set('CONFIG_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include @@ -1697,6 +1699,48 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.= compiles(''' return printf("%zu", SIZE_MAX); }''', args: ['-Werror'])) =20 +# See if 64-bit atomic operations are supported. +# Note that without __atomic builtins, we can only +# assume atomic loads/stores max at pointer size. +config_host_data.set('CONFIG_ATOMIC64', cc.links(''' + #include + int main(void) + { + uint64_t x =3D 0, y =3D 0; + y =3D __atomic_load_n(&x, __ATOMIC_RELAXED); + __atomic_store_n(&x, y, __ATOMIC_RELAXED); + __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, __ATOMIC_R= ELAXED); + __atomic_exchange_n(&x, y, __ATOMIC_RELAXED); + __atomic_fetch_add(&x, y, __ATOMIC_RELAXED); + return 0; + }''')) + +config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + ''' + #include + int main(void) { + return getauxval(AT_HWCAP) =3D=3D 0; + }''')) + +config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + #if !defined(AF_VSOCK) + # error missing AF_VSOCK flag + #endif + #include + int main(void) { + int sock, ret; + struct sockaddr_vm svm; + socklen_t len =3D sizeof(svm); + sock =3D socket(AF_VSOCK, SOCK_STREAM, 0); + ret =3D getpeername(sock, (struct sockaddr *)&svm, &len); + if ((ret =3D=3D -1) && (errno =3D=3D ENOTCONN)) { + return 0; + } + return -1; + }''')) + ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] diff --git a/util/meson.build b/util/meson.build index 779f413c86..05b593055a 100644 --- a/util/meson.build +++ b/util/meson.build @@ -1,5 +1,7 @@ util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu-timer-common.c= ')) -util_ss.add(when: 'CONFIG_ATOMIC64', if_false: files('atomic64.c')) +if not config_host_data.get('CONFIG_ATOMIC64') + util_ss.add(files('atomic64.c')) +endif util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c')) if config_host_data.get('CONFIG_EPOLL_CREATE1') --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163403829544392.79471023007204; Tue, 12 Oct 2021 04:31:35 -0700 (PDT) Received: from localhost ([::1]:43748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maG0M-00085R-Ck for importer@patchew.org; Tue, 12 Oct 2021 07:31:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFil-0000uh-Fe for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:23 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:41717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFik-0007aL-1n for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:23 -0400 Received: by mail-ed1-x52f.google.com with SMTP id a25so63797251edx.8 for ; Tue, 12 Oct 2021 04:13:21 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z6UgxE/8tlX9AdbKXPGLp6eGWQ6K18vN2+aOdIn9xwc=; b=GKWE/kVlIvUy0UIu27gXt4BMIpaP34YYWklnEI9tZ1pDTLSrLbG9puKeSiG+x2/JwF AS0na46Rxfpdj2OTsP3dpKoFQ+3GvoUTAyYcIXqKg8aZimT7fwCj8zEUVW42GU7TZMK+ edxTOsCy+BnDqtRojLc71zO03GVUEY7u+hCq/uF43X5zdYlykwKRCMPAoHWxd/S86QC3 9Y189OglzbrTva/g7OiWx22evka7wZGGnnepVygiw6xQ4gvpCMPNNuSCMjJZ7OeVqF1m ajIz70rDc6XzuFyceENTQZjLiBpibNEedD8uiKiWnsZ0X2876Wgf3Ht31DE2x8oSny08 +7yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Z6UgxE/8tlX9AdbKXPGLp6eGWQ6K18vN2+aOdIn9xwc=; b=2ChPehu//kJCXdDREUFCtrVVQrEGHCuaF8dNL2idIV1eUKsq6Za4eZCXx5L96chFZj 95mGBR1NX0PQPbX5GRypa0HLdjfJ8CoU5GlmNL9/EVqU0BYa2CZAqcmQs4HJspRdAqvN nPPgB5GCmaA87f14z2gGNqDhMZn6Lhvcvh5xnTApCp4Yg40sYxWhRlw+1HH8Uflth7ki q8nno4JCaIYm8TO0ghzWy5L2eWk69Lber5w4VAmU+m6Vf9dxclBf6ZZyotUslScGxX5A f02y57MC1v2Jmwv76ez8CVEdsLXGvEhDUtcg4tf5F7H4sNe4SVGTF4SYFfH10c6CTJkI Qp3w== X-Gm-Message-State: AOAM531lwNR4KJbP38KixWHzvVeZ4kb3iA+kw8n49jjysjjtrD2oXqZQ w4JGxvoy3YJzlBD2LRlccIC7GvMNnZI= X-Google-Smtp-Source: ABdhPJyDi+xAUxFl2X2U3kX4Dqy+EnGYGdOlCIjap5c/hI9MGgcfJ8SWYm7BuXqQ114qCK1F+CuUnQ== X-Received: by 2002:aa7:db85:: with SMTP id u5mr49615494edt.234.1634037200742; Tue, 12 Oct 2021 04:13:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 21/24] configure: remove deprecated --{enable, disable}-git-update Date: Tue, 12 Oct 2021 13:12:59 +0200 Message-Id: <20211012111302.246627-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634038297607100001 The options were deprecated in 6.0. That said, we do not really have a formal deprecation cycle for build-time changes, since they do not affect users. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-16-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 8 -------- 1 file changed, 8 deletions(-) diff --git a/configure b/configure index 33d330dcc9..d00ba0cbd2 100755 --- a/configure +++ b/configure @@ -1483,14 +1483,6 @@ for opt do ;; --with-git=3D*) git=3D"$optarg" ;; - --enable-git-update) - git_submodules_action=3D"update" - echo "--enable-git-update deprecated, use --with-git-submodules=3Dup= date" - ;; - --disable-git-update) - git_submodules_action=3D"validate" - echo "--disable-git-update deprecated, use --with-git-submodules=3Dv= alidate" - ;; --with-git-submodules=3D*) git_submodules_action=3D"$optarg" ;; --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039648004951.6441804460766; Tue, 12 Oct 2021 04:54:08 -0700 (PDT) Received: from localhost ([::1]:60984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGMA-0005yM-RX for importer@patchew.org; Tue, 12 Oct 2021 07:54:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFin-0000xt-5k for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:25 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:38430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFik-0007ar-M4 for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:24 -0400 Received: by mail-ed1-x531.google.com with SMTP id d9so55753874edh.5 for ; Tue, 12 Oct 2021 04:13:22 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2OGn+S76MId8XJEbb53T+rgcMaIZkJDsd20b1SjwZfQ=; b=a/8AWxdh2Xp33i9wRjmkkjqRhIgPxhui4SRbj3zs9pPzrvFc1EP36k5VTNNCrHvzUk ujV4iPHFoSfNdJoC2/HPCljMuuhXrcWJFiQJ/uUaDr2W4ouIAdEg2eoLiqZORQAIe1Zc qB1f9uN5xSsE7EXybMy+yWRebGcvMbQVBqyDKp7OV6N6A8PiAUgsqPSgddZU00XW4lef xPEqdln0+Ap5fB3hFyIsw6BkPjliAVGmaK/R67tnv1BPOUWJWtRaNn60Q3RznJysG9Az bIltWhlLhaLy9rLIJ44YTv/JZjnliuvqlKb4JcvBMYFUP3bvqJ9rSfGHINZwzLzkX4G5 P71g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2OGn+S76MId8XJEbb53T+rgcMaIZkJDsd20b1SjwZfQ=; b=Ol2hseejD22jGZ0WUck7O/lgWkykyuvGS5Pw3N4nb1u7d1xLUQoh+5bPVcbMKEvxGU DfrGLsIMAGS+u5LahqU1t/HZSajWeGjbf1VrBw+fpeclLGaDyExdxlVdvMRBNxlKAE8V e6JFQQdJcJn7kf/bEJhAhGkqmgYTlLfae6jKwvHGxT142ir5VLNxXUZJLwVCb8DTtX0O s7lZ+vHqHNF1IPrutMYZtay6W2/qVkq5kQzx2EDoKgZMtTgfnctVBNvQd+jQC5XvF4WM jIX2CmGUBDxwXBJDdk+YvJ37Iw8GxkxiT4DYmPSX9xbvtgAeJIGKas6KRf+dv9aOWM9s Mg8g== X-Gm-Message-State: AOAM530LeJqkwoTCQVbrh0Vapbwa0Dq53BuVn4L4OWiN64lFntGxpknm qkhA1tjn9mEIhAc0388P68zgt/n7/fw= X-Google-Smtp-Source: ABdhPJz1/eQytysYrxWEgthJCnDSWw+Pltr6I7k1EloSIs/n6Q/ZQg3NaQjTJih3V057YF6XcoKFVQ== X-Received: by 2002:a17:906:2f94:: with SMTP id w20mr33766340eji.14.1634037201430; Tue, 12 Oct 2021 04:13:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 22/24] configure: accept "internal" for --enable-capstone/slirp/fdt Date: Tue, 12 Oct 2021 13:13:00 +0200 Message-Id: <20211012111302.246627-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039648516100001 Options such as "--enable-capstone=3Dgit" do not make much sense when build= ing from a tarball. Accept "internal" for consistency with the meson options. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211007130829.632254-17-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index d00ba0cbd2..d2f754d5d1 100755 --- a/configure +++ b/configure @@ -1019,7 +1019,7 @@ for opt do ;; --enable-slirp=3Dgit) slirp=3D"internal" ;; - --enable-slirp=3Dsystem) slirp=3D"system" + --enable-slirp=3D*) slirp=3D"$optarg" ;; --disable-vde) vde=3D"disabled" ;; @@ -1193,7 +1193,7 @@ for opt do ;; --enable-fdt=3Dgit) fdt=3D"internal" ;; - --enable-fdt=3Dsystem) fdt=3D"system" + --enable-fdt=3D*) fdt=3D"$optarg" ;; --disable-linux-aio) linux_aio=3D"disabled" ;; @@ -1479,7 +1479,7 @@ for opt do ;; --enable-capstone=3Dgit) capstone=3D"internal" ;; - --enable-capstone=3Dsystem) capstone=3D"system" + --enable-capstone=3D*) capstone=3D"$optarg" ;; --with-git=3D*) git=3D"$optarg" ;; --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634039972156340.6393300335018; Tue, 12 Oct 2021 04:59:32 -0700 (PDT) Received: from localhost ([::1]:45006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGRP-0005tr-25 for importer@patchew.org; Tue, 12 Oct 2021 07:59:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFin-0000zD-Iy for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:27 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:39575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFil-0007b7-Hk for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:25 -0400 Received: by mail-ed1-x52b.google.com with SMTP id ec8so29963410edb.6 for ; Tue, 12 Oct 2021 04:13:23 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1SB+Zef0GLzpb6lGFeOX5f4gKa33nByd5TY4QhXmE4w=; b=jeFqqU11EehqZvDVfy95+MvgG814IxK3HE/nyvm5PZPP77DUX8R4BrQUSRvyvng33w Ap3Lcb5aqTcb/WUpXfE+bVZabA5bODndiGQNrErcMw7kj7OabotK5tvJFI9f59Dd5BoJ mlig2yxOulae4oC9H6DTuU9rzifxue4IEeXsQM0L+QKuAqc030LrkEEvWNuj300jqmn/ hnt/4Ux5xcJG/cHHZ6RR4dlJq0zr2oUkQSVXG5D2N3/U5RuXUv7o9gK3IGb79W085PqM +kTGAmRHwlKWWc1rXE5r5Ry1HBb8bDvweVFdJz/G5+r1K1Aud5M5o4wNos2x/zxwExrx r8fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1SB+Zef0GLzpb6lGFeOX5f4gKa33nByd5TY4QhXmE4w=; b=JdR3UYgRVDnjgLzQe1auroazHFTLA9htaOymFEghr+F+N7RAPZABOI3a+w/X8xbCB4 k4I8BmN2RrE6DN/ELxt3+GXf28rm6r6cRNG3V1MfaYMQgfEKeBSF/A9bp2PXHzXzUBHw BcCHNRMaH69Y6KSILKGIdNN72N6orPox1g1fQeOLAUD9ZCjOJq8LeP+DdQro+jquQ4Zo oPKYjKcym/fPd77r7Hzj31JcIbRK0IaY+3tiDpkXnhxVumcNX3B60r5s0CMf6nSjRo5L bm7/IQxxgWyxHFQJvvHH8BFvZL97e588+EVyTe0pBI+S+uqqGf14tWuuetjt+ooa9pWA 9BkA== X-Gm-Message-State: AOAM533VmnFuZP+KlL2OtMtaF1XxKjW+REUy5ToXr0aUNHUqcngP6Eyp gYLOET4eZmKjY48jtwaRd8RsKtkp7J8= X-Google-Smtp-Source: ABdhPJzHuNhsWsEeEGxC4EmwEJEJ515Mpc/0GLj9fVI0jiDrZzNxeuLPzmc1S+H3+uechfE8KDB2+w== X-Received: by 2002:a17:906:b184:: with SMTP id w4mr31251714ejy.418.1634037202177; Tue, 12 Oct 2021 04:13:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 23/24] configure: prepare for auto-generated option parsing Date: Tue, 12 Oct 2021 13:13:01 +0200 Message-Id: <20211012111302.246627-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634039973464100001 Content-Type: text/plain; charset="utf-8" Prepare the configure script and Makefile for automatically generated help and parsing. Because we need to run the script to generate the full help, we cannot rely on the user supplying the path to a Python interpreter with --python; therefore, the introspection output is parsed into shell functions and stored in scripts/. The converter is written in Python as standard for QEMU, and this commit contains a stub. Signed-off-by: Paolo Bonzini Tested-by: Thomas Huth Message-Id: <20211007130829.632254-18-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- Makefile | 8 ++++- configure | 31 ++++++++++++----- scripts/meson-buildoptions.py | 64 +++++++++++++++++++++++++++++++++++ scripts/meson-buildoptions.sh | 13 +++++++ 4 files changed, 106 insertions(+), 10 deletions(-) create mode 100755 scripts/meson-buildoptions.py create mode 100644 scripts/meson-buildoptions.sh diff --git a/Makefile b/Makefile index 401c623a65..fe9415ac64 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ x :=3D $(shell rm -rf meson-private meson-info meson-logs) endif =20 # 1. ensure config-host.mak is up-to-date -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VER= SION +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildopti= ons.sh $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION @echo config-host.mak is out-of-date, running configure @if test -f meson-private/coredata.dat; then \ ./config.status --skip-meson; \ @@ -124,6 +124,12 @@ ifneq ($(MESON),) Makefile.mtest: build.ninja scripts/mtest2make.py $(MESON) introspect --targets --tests --benchmarks | $(PYTHON) scripts/mt= est2make.py > $@ -include Makefile.mtest + +.PHONY: update-buildoptions +all update-buildoptions: $(SRC_PATH)/scripts/meson-buildoptions.sh +$(SRC_PATH)/scripts/meson-buildoptions.sh: $(SRC_PATH)/meson_options.txt + $(MESON) introspect --buildoptions $(SRC_PATH)/meson.build | $(PYTHON) \ + scripts/meson-buildoptions.py > $@.tmp && mv $@.tmp $@ endif =20 # 4. Rules to bridge to other makefiles diff --git a/configure b/configure index d2f754d5d1..d979476e03 100755 --- a/configure +++ b/configure @@ -789,6 +789,18 @@ fi =20 werror=3D"" =20 +. $source_path/scripts/meson-buildoptions.sh + +meson_options=3D +meson_option_parse() { + meson_options=3D"$meson_options $(_meson_option_parse "$@")" + if test $? -eq 1; then + echo "ERROR: unknown option $1" + echo "Try '$0 --help' for more information" + exit 1 + fi +} + for opt do optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') case "$opt" in @@ -1548,6 +1560,8 @@ for opt do ;; --disable-slirp-smbd) slirp_smbd=3Dno ;; + --enable-* | --disable-*) meson_option_parse "$opt" "$optarg" + ;; *) echo "ERROR: unknown option $opt" echo "Try '$0 --help' for more information" @@ -1802,11 +1816,9 @@ Advanced options (experts only): enable plugins via shared library loading --disable-containers don't use containers for cross-building --gdb=3DGDB-path gdb to use for gdbstub tests [$gdb_bin] - -Optional features, enabled with --enable-FEATURE and -disabled with --disable-FEATURE, default is enabled if available -(unless built with --without-default-features): - +EOF + meson_options_help +cat << EOF system all system emulation targets user supported user emulation targets linux-user all linux usermode emulation targets @@ -4487,7 +4499,8 @@ if test "$skip_meson" =3D no; then mv $cross config-meson.cross =20 rm -rf meson-private meson-info meson-logs - NINJA=3D$ninja $meson setup \ + run_meson() { + NINJA=3D$ninja $meson setup \ --prefix "$prefix" \ --libdir "$libdir" \ --libexecdir "$libexecdir" \ @@ -4532,9 +4545,9 @@ if test "$skip_meson" =3D no; then -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ -Dnetmap=3D$netmap -Dvde=3D$vde \ - $cross_arg \ - "$PWD" "$source_path" - + "$@" $cross_arg "$PWD" "$source_path" + } + eval run_meson $meson_options if test "$?" -ne 0 ; then error_exit "meson setup failed" fi diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py new file mode 100755 index 0000000000..71ee56bd22 --- /dev/null +++ b/scripts/meson-buildoptions.py @@ -0,0 +1,64 @@ +#! /usr/bin/env python3 + +# Generate configure command line options handling code, based on Meson's +# user build options introspection data +# +# Copyright (C) 2021 Red Hat, Inc. +# +# Author: Paolo Bonzini +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import json +import textwrap +import shlex +import sys + +def sh_print(line=3D""): + print(' printf "%s\\n"', shlex.quote(line)) + + +def load_options(json): + json =3D [ + x + for x in json + if x["section"] =3D=3D "user" + and ":" not in x["name"] + and x["name"] not in SKIP_OPTIONS + ] + return sorted(json, key=3Dlambda x: x["name"]) + + +def print_help(options): + print("meson_options_help() {") + sh_print() + sh_print("Optional features, enabled with --enable-FEATURE and") + sh_print("disabled with --disable-FEATURE, default is enabled if avail= able") + sh_print("(unless built with --without-default-features):") + sh_print() + print("}") + + +def print_parse(options): + print("_meson_option_parse() {") + print(" case $1 in") + print(" *) return 1 ;;") + print(" esac") + print("}") + + +options =3D load_options(json.load(sys.stdin)) +print("# This file is generated by meson-buildoptions.py, do not edit!") +print_help(options) +print_parse(options) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh new file mode 100644 index 0000000000..c8ae205601 --- /dev/null +++ b/scripts/meson-buildoptions.sh @@ -0,0 +1,13 @@ +# This file is generated by meson-buildoptions.py, do not edit! +meson_options_help() { + printf "%s\n" '' + printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' + printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' + printf "%s\n" '(unless built with --without-default-features):' + printf "%s\n" '' +} +_meson_option_parse() { + case $1 in + *) return 1 ;; + esac +} --=20 2.31.1 From nobody Tue Apr 23 12:07:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634040999323169.4873625220314; Tue, 12 Oct 2021 05:16:39 -0700 (PDT) Received: from localhost ([::1]:46966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maGhx-0002N0-Tn for importer@patchew.org; Tue, 12 Oct 2021 08:16:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFir-00011X-ED for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:29 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:35376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFim-0007bT-QC for qemu-devel@nongnu.org; Tue, 12 Oct 2021 07:13:28 -0400 Received: by mail-ed1-x533.google.com with SMTP id w19so19750435edd.2 for ; Tue, 12 Oct 2021 04:13:24 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m23sm4742802eja.6.2021.10.12.04.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 04:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iiQz9Qf03wLCY+gATn/L/RznjhG5KiQ4F67KjCAHknY=; b=f5Em4+AmbZBWHLQbNJCjYcEvU22e3FY9rqMOHNG0l06ohs9LAWkrkPEogFomuzpbnt Pcbg7CCqa/BzPWFL1AllaUodstpSiLVQMwFXsFRdnAAjbrzfBRQvFdgx2t0AHunJHPuW 7/TPdQaOVHM2q6EFeqsc0wNfJajqNAU073mcAN5jvYWox5zY1YUjg41TSki6/uPs5ug4 m5MZvkpwAZZ3bzJ5bVgCKBrmKQrr6KT53meg8ARkh12EnntkkU498Pt0simCSfI1J+8a Wd7D0VUZpJmEdZaJFdwp5NziSnOfFqBod45LvXaCh1NObuZ/fVhzL8levNYp6FQipaKZ LZ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iiQz9Qf03wLCY+gATn/L/RznjhG5KiQ4F67KjCAHknY=; b=jrrlhiUGa4wbjB8NipdE9isdf5KOD8SLEapdhyUpu9vaqUvAt8XegaKrMS70WY/BdY RyrLpuU1Us5eVNO2HD0ZxyQ3pl/GUWU9lYsOfIk70JYKKo5LB5qcA3RTWtdIyu8zrrtB crs/koHTznxgGUosixjggdjfG833NTOSPo2EG16+KnDzjuagqTEJrjONp0ZTQDFG6s7c kWHX4wykTWwYPYk1kyFXjgIAdbChMXbfhvfIkeC3u4aER5JOdtbJhgwMRfnXRYPigL+z xYBjWa2ulLOrkeTfY3kaGULFJblRFxpFiwHaYaSh4WOgfR+qPDEWvnzzcRv9TU7/APQa pxrQ== X-Gm-Message-State: AOAM532JavwcHT3HcHsG2WY5wTstw/1JFDzWoj0Cd6yjVgrdFlEGqoQK cLj3g02FcJhqegoCi/qhpwDJkr/2IQQ= X-Google-Smtp-Source: ABdhPJy4RUx1vpNsUvqyd4uyrDL8f1sOLI4T+SfKBfFxZAWBUJOIyUaAKuhxAANY7WiJjbu8byJu5w== X-Received: by 2002:a17:906:5482:: with SMTP id r2mr31163217ejo.348.1634037203155; Tue, 12 Oct 2021 04:13:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH v2 24/24] configure: automatically parse command line for meson -D options Date: Tue, 12 Oct 2021 13:13:02 +0200 Message-Id: <20211012111302.246627-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012111302.246627-1-pbonzini@redhat.com> References: <20211012111302.246627-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1634041001280100001 Content-Type: text/plain; charset="utf-8" Right now meson_options.txt lists about 90 options. Each option needs code in configure to parse it and pass the option down to Meson as a -D command-line argument; in addition the default must be duplicated between configure and meson_options.txt. This series tries to remove the code duplication by generating the case statement for those --enable and --disable options, as well as the corresponding help text. About 80% of the options can be handled completely by the new mechanism. Eight meson options are not of the --enable/--disable kind. Six more need to be parsed in configure for various reasons documented in the patch, but they still have their help automatically generated. The advantages are: - less code in configure - parsing and help is more consistent (for example --enable-blobs was not supported) - options are described entirely in one place, meson_options.txt. This make it more attractive to use Meson options instead of hand-crafted configure options and config-host.mak A few options change name: --enable-tcmalloc and --enable-jemalloc become --enable-malloc=3D{tcmalloc,jemalloc}; --disable-blobs becomes --disable-install-blobs; --enable-trace-backend becomes --enable-trace-backends. Signed-off-by: Paolo Bonzini Message-Id: <20211007130829.632254-19-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 550 +++------------------------------- docs/devel/build-system.rst | 132 ++++---- meson_options.txt | 8 + scripts/meson-buildoptions.py | 92 ++++++ scripts/meson-buildoptions.sh | 256 ++++++++++++++++ 5 files changed, 458 insertions(+), 580 deletions(-) diff --git a/configure b/configure index d979476e03..d4b714f789 100755 --- a/configure +++ b/configure @@ -286,41 +286,8 @@ for opt do esac done =20 -brlapi=3D"auto" -curl=3D"auto" -iconv=3D"auto" -curses=3D"auto" -docs=3D"auto" -fdt=3D"auto" -netmap=3D"auto" -sdl=3D"auto" -sdl_image=3D"auto" -virtiofsd=3D"auto" -virtfs=3D"auto" -libudev=3D"auto" -mpath=3D"auto" -vnc=3D"auto" -sparse=3D"auto" -vde=3D"auto" -vnc_sasl=3D"auto" -vnc_jpeg=3D"auto" -vnc_png=3D"auto" -xkbcommon=3D"auto" -alsa=3D"auto" -coreaudio=3D"auto" -dsound=3D"auto" -jack=3D"auto" -oss=3D"auto" -pa=3D"auto" -xen=3D${default_feature:+disabled} xen_ctrl_version=3D"$default_feature" -xen_pci_passthrough=3D"auto" -linux_aio=3D"auto" -linux_io_uring=3D"auto" -cap_ng=3D"auto" -attr=3D"auto" xfs=3D"$default_feature" -tcg=3D"enabled" membarrier=3D"$default_feature" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" @@ -328,15 +295,8 @@ vhost_crypto=3D"$default_feature" vhost_scsi=3D"$default_feature" vhost_vsock=3D"$default_feature" vhost_user=3D"no" -vhost_user_blk_server=3D"auto" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" -bpf=3D"auto" -kvm=3D"auto" -hax=3D"auto" -hvf=3D"auto" -whpx=3D"auto" -nvmm=3D"auto" rdma=3D"$default_feature" pvrdma=3D"$default_feature" gprof=3D"no" @@ -346,7 +306,6 @@ sanitizers=3D"no" tsan=3D"no" fortify_source=3D"$default_feature" strip_opt=3D"yes" -tcg_interpreter=3D"false" mingw32=3D"no" gcov=3D"no" EXESUF=3D"" @@ -354,62 +313,32 @@ modules=3D"no" module_upgrades=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" -slirp=3D"auto" bsd=3D"no" linux=3D"no" solaris=3D"no" profiler=3D"no" -cocoa=3D"auto" softmmu=3D"yes" linux_user=3D"no" bsd_user=3D"no" -blobs=3D"true" pkgversion=3D"" pie=3D"" qom_cast_debug=3D"yes" trace_backends=3D"log" trace_file=3D"trace" -spice=3D"auto" -spice_protocol=3D"auto" -rbd=3D"auto" -smartcard=3D"auto" -u2f=3D"auto" -libusb=3D"auto" -usb_redir=3D"auto" opengl=3D"$default_feature" cpuid_h=3D"no" avx2_opt=3D"$default_feature" -capstone=3D"auto" -lzo=3D"auto" -snappy=3D"auto" -bzip2=3D"auto" -lzfse=3D"auto" -zstd=3D"auto" guest_agent=3D"$default_feature" guest_agent_with_vss=3D"no" guest_agent_ntddscsi=3D"no" -guest_agent_msi=3D"auto" vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" want_tools=3D"$default_feature" -libiscsi=3D"auto" -libnfs=3D"auto" coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" crypto_afalg=3D"no" -cfi=3D"false" -cfi_debug=3D"false" -seccomp=3D"auto" -glusterfs=3D"auto" -gtk=3D"auto" tls_priority=3D"NORMAL" -gnutls=3D"auto" -nettle=3D"auto" -gcrypt=3D"auto" -auth_pam=3D"auto" -vte=3D"auto" -virglrenderer=3D"auto" tpm=3D"$default_feature" libssh=3D"$default_feature" live_block_migration=3D${default_feature:-yes} @@ -427,24 +356,34 @@ qed=3D${default_feature:-yes} parallels=3D${default_feature:-yes} libxml2=3D"auto" debug_mutex=3D"no" -libpmem=3D"auto" -default_devices=3D"true" plugins=3D"$default_feature" -fuzzing=3D"false" rng_none=3D"no" secret_keyring=3D"$default_feature" libdaxctl=3D"auto" meson=3D"" +meson_args=3D"" ninja=3D"" +gio=3D"$default_feature" skip_meson=3Dno -gettext=3D"auto" -fuse=3D"auto" -fuse_lseek=3D"auto" -multiprocess=3D"auto" slirp_smbd=3D"$default_feature" =20 -malloc_trim=3D"auto" -gio=3D"$default_feature" +# The following Meson options are handled manually (still they +# are included in the automatically generated help message) + +# 1. Track which submodules are needed +capstone=3D"auto" +fdt=3D"auto" +slirp=3D"auto" + +# 2. Support --with/--without option +default_devices=3D"true" + +# 3. Automatically enable/disable other options +tcg=3D"enabled" +cfi=3D"false" + +# 4. Detection partly done in configure +xen=3D${default_feature:+disabled} =20 # parse CC options second for opt do @@ -874,11 +813,6 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --enable-trace-backends=3D*) trace_backends=3D"$optarg" - ;; - # XXX: backwards compatibility - --enable-trace-backend=3D*) trace_backends=3D"$optarg" - ;; --with-trace-file=3D*) trace_file=3D"$optarg" ;; --with-default-devices) default_devices=3D"true" @@ -941,42 +875,10 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --disable-sdl) sdl=3D"disabled" - ;; - --enable-sdl) sdl=3D"enabled" - ;; - --disable-sdl-image) sdl_image=3D"disabled" - ;; - --enable-sdl-image) sdl_image=3D"enabled" - ;; --disable-qom-cast-debug) qom_cast_debug=3D"no" ;; --enable-qom-cast-debug) qom_cast_debug=3D"yes" ;; - --disable-virtfs) virtfs=3D"disabled" - ;; - --enable-virtfs) virtfs=3D"enabled" - ;; - --disable-libudev) libudev=3D"disabled" - ;; - --enable-libudev) libudev=3D"enabled" - ;; - --disable-virtiofsd) virtiofsd=3D"disabled" - ;; - --enable-virtiofsd) virtiofsd=3D"enabled" - ;; - --disable-mpath) mpath=3D"disabled" - ;; - --enable-mpath) mpath=3D"enabled" - ;; - --disable-vnc) vnc=3D"disabled" - ;; - --enable-vnc) vnc=3D"enabled" - ;; - --disable-gettext) gettext=3D"disabled" - ;; - --enable-gettext) gettext=3D"enabled" - ;; --audio-drv-list=3D*) audio_drv_list=3D"$optarg" ;; --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') @@ -1007,24 +909,8 @@ for opt do ;; --disable-tsan) tsan=3D"no" ;; - --enable-sparse) sparse=3D"enabled" - ;; - --disable-sparse) sparse=3D"disabled" - ;; --disable-strip) strip_opt=3D"no" ;; - --disable-vnc-sasl) vnc_sasl=3D"disabled" - ;; - --enable-vnc-sasl) vnc_sasl=3D"enabled" - ;; - --disable-vnc-jpeg) vnc_jpeg=3D"disabled" - ;; - --enable-vnc-jpeg) vnc_jpeg=3D"enabled" - ;; - --disable-vnc-png) vnc_png=3D"disabled" - ;; - --enable-vnc-png) vnc_png=3D"enabled" - ;; --disable-slirp) slirp=3D"disabled" ;; --enable-slirp) slirp=3D"enabled" @@ -1033,113 +919,17 @@ for opt do ;; --enable-slirp=3D*) slirp=3D"$optarg" ;; - --disable-vde) vde=3D"disabled" - ;; - --enable-vde) vde=3D"enabled" - ;; - --disable-netmap) netmap=3D"disabled" - ;; - --enable-netmap) netmap=3D"enabled" - ;; --disable-xen) xen=3D"disabled" ;; --enable-xen) xen=3D"enabled" ;; - --disable-xen-pci-passthrough) xen_pci_passthrough=3D"disabled" - ;; - --enable-xen-pci-passthrough) xen_pci_passthrough=3D"enabled" - ;; - --disable-alsa) alsa=3D"disabled" - ;; - --enable-alsa) alsa=3D"enabled" - ;; - --disable-coreaudio) coreaudio=3D"disabled" - ;; - --enable-coreaudio) coreaudio=3D"enabled" - ;; - --disable-dsound) dsound=3D"disabled" - ;; - --enable-dsound) dsound=3D"enabled" - ;; - --disable-jack) jack=3D"disabled" - ;; - --enable-jack) jack=3D"enabled" - ;; - --disable-oss) oss=3D"disabled" - ;; - --enable-oss) oss=3D"enabled" - ;; - --disable-pa) pa=3D"disabled" - ;; - --enable-pa) pa=3D"enabled" - ;; - --disable-brlapi) brlapi=3D"disabled" - ;; - --enable-brlapi) brlapi=3D"enabled" - ;; - --disable-kvm) kvm=3D"disabled" - ;; - --enable-kvm) kvm=3D"enabled" - ;; - --disable-hax) hax=3D"disabled" - ;; - --enable-hax) hax=3D"enabled" - ;; - --disable-hvf) hvf=3D"disabled" - ;; - --enable-hvf) hvf=3D"enabled" - ;; - --disable-nvmm) nvmm=3D"disabled" - ;; - --enable-nvmm) nvmm=3D"enabled" - ;; - --disable-whpx) whpx=3D"disabled" - ;; - --enable-whpx) whpx=3D"enabled" - ;; - --disable-tcg-interpreter) tcg_interpreter=3D"false" - ;; - --enable-tcg-interpreter) tcg_interpreter=3D"true" - ;; - --disable-cap-ng) cap_ng=3D"disabled" - ;; - --enable-cap-ng) cap_ng=3D"enabled" - ;; --disable-tcg) tcg=3D"disabled" plugins=3D"no" ;; --enable-tcg) tcg=3D"enabled" ;; - --disable-malloc-trim) malloc_trim=3D"disabled" - ;; - --enable-malloc-trim) malloc_trim=3D"enabled" - ;; - --disable-spice) spice=3D"no" - ;; - --enable-spice) - spice_protocol=3D"yes" - spice=3D"yes" - ;; - --disable-spice-protocol) - spice_protocol=3D"no" - spice=3D"no" - ;; - --enable-spice-protocol) spice_protocol=3D"yes" - ;; - --disable-libiscsi) libiscsi=3D"disabled" - ;; - --enable-libiscsi) libiscsi=3D"enabled" - ;; - --disable-libnfs) libnfs=3D"disabled" - ;; - --enable-libnfs) libnfs=3D"enabled" - ;; --enable-profiler) profiler=3D"yes" ;; - --disable-cocoa) cocoa=3D"disabled" - ;; - --enable-cocoa) cocoa=3D"enabled" - ;; --disable-system) softmmu=3D"no" ;; --enable-system) softmmu=3D"yes" @@ -1183,22 +973,6 @@ for opt do ;; --disable-cfi) cfi=3D"false" ;; - --enable-cfi-debug) cfi_debug=3D"true" - ;; - --disable-cfi-debug) cfi_debug=3D"false" - ;; - --disable-curses) curses=3D"disabled" - ;; - --enable-curses) curses=3D"enabled" - ;; - --disable-iconv) iconv=3D"disabled" - ;; - --enable-iconv) iconv=3D"enabled" - ;; - --disable-curl) curl=3D"disabled" - ;; - --enable-curl) curl=3D"enabled" - ;; --disable-fdt) fdt=3D"disabled" ;; --enable-fdt) fdt=3D"enabled" @@ -1207,28 +981,10 @@ for opt do ;; --enable-fdt=3D*) fdt=3D"$optarg" ;; - --disable-linux-aio) linux_aio=3D"disabled" - ;; - --enable-linux-aio) linux_aio=3D"enabled" - ;; - --disable-linux-io-uring) linux_io_uring=3D"disabled" - ;; - --enable-linux-io-uring) linux_io_uring=3D"enabled" - ;; - --disable-attr) attr=3D"disabled" - ;; - --enable-attr) attr=3D"enabled" - ;; --disable-membarrier) membarrier=3D"no" ;; --enable-membarrier) membarrier=3D"yes" ;; - --disable-bpf) bpf=3D"disabled" - ;; - --enable-bpf) bpf=3D"enabled" - ;; - --disable-blobs) blobs=3D"false" - ;; --with-pkgversion=3D*) pkgversion=3D"$optarg" ;; --with-coroutine=3D*) coroutine=3D"$optarg" @@ -1243,10 +999,6 @@ for opt do ;; --disable-crypto-afalg) crypto_afalg=3D"no" ;; - --disable-docs) docs=3D"disabled" - ;; - --enable-docs) docs=3D"enabled" - ;; --disable-vhost-net) vhost_net=3D"no" ;; --enable-vhost-net) vhost_net=3D"yes" @@ -1263,10 +1015,6 @@ for opt do ;; --enable-vhost-vsock) vhost_vsock=3D"yes" ;; - --disable-vhost-user-blk-server) vhost_user_blk_server=3D"disabled" - ;; - --enable-vhost-user-blk-server) vhost_user_blk_server=3D"enabled" - ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" @@ -1275,60 +1023,16 @@ for opt do ;; --enable-opengl) opengl=3D"yes" ;; - --disable-rbd) rbd=3D"disabled" - ;; - --enable-rbd) rbd=3D"enabled" - ;; --disable-xfsctl) xfs=3D"no" ;; --enable-xfsctl) xfs=3D"yes" ;; - --disable-smartcard) smartcard=3D"disabled" - ;; - --enable-smartcard) smartcard=3D"enabled" - ;; - --disable-u2f) u2f=3D"disabled" - ;; - --enable-u2f) u2f=3D"enabled" - ;; - --disable-libusb) libusb=3D"disabled" - ;; - --enable-libusb) libusb=3D"enabled" - ;; - --disable-usb-redir) usb_redir=3D"disabled" - ;; - --enable-usb-redir) usb_redir=3D"enabled" - ;; --disable-zlib-test) ;; - --disable-lzo) lzo=3D"disabled" - ;; - --enable-lzo) lzo=3D"enabled" - ;; - --disable-snappy) snappy=3D"disabled" - ;; - --enable-snappy) snappy=3D"enabled" - ;; - --disable-bzip2) bzip2=3D"disabled" - ;; - --enable-bzip2) bzip2=3D"enabled" - ;; - --enable-lzfse) lzfse=3D"enabled" - ;; - --disable-lzfse) lzfse=3D"disabled" - ;; - --disable-zstd) zstd=3D"disabled" - ;; - --enable-zstd) zstd=3D"enabled" - ;; --enable-guest-agent) guest_agent=3D"yes" ;; --disable-guest-agent) guest_agent=3D"no" ;; - --enable-guest-agent-msi) guest_agent_msi=3D"enabled" - ;; - --disable-guest-agent-msi) guest_agent_msi=3D"disabled" - ;; --with-vss-sdk) vss_win32_sdk=3D"" ;; --with-vss-sdk=3D*) vss_win32_sdk=3D"$optarg" @@ -1345,12 +1049,6 @@ for opt do ;; --disable-tools) want_tools=3D"no" ;; - --enable-seccomp) seccomp=3D"enabled" - ;; - --disable-seccomp) seccomp=3D"disabled" - ;; - --disable-glusterfs) glusterfs=3D"disabled" - ;; --disable-avx2) avx2_opt=3D"no" ;; --enable-avx2) avx2_opt=3D"yes" @@ -1359,9 +1057,6 @@ for opt do ;; --enable-avx512f) avx512f_opt=3D"yes" ;; - - --enable-glusterfs) glusterfs=3D"enabled" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -1371,28 +1066,8 @@ for opt do --enable-uuid|--disable-uuid) echo "$0: $opt is obsolete, UUID support is always built" >&2 ;; - --disable-gtk) gtk=3D"disabled" - ;; - --enable-gtk) gtk=3D"enabled" - ;; --tls-priority=3D*) tls_priority=3D"$optarg" ;; - --disable-gnutls) gnutls=3D"disabled" - ;; - --enable-gnutls) gnutls=3D"enabled" - ;; - --disable-nettle) nettle=3D"disabled" - ;; - --enable-nettle) nettle=3D"enabled" - ;; - --disable-gcrypt) gcrypt=3D"disabled" - ;; - --enable-gcrypt) gcrypt=3D"enabled" - ;; - --disable-auth-pam) auth_pam=3D"disabled" - ;; - --enable-auth-pam) auth_pam=3D"enabled" - ;; --enable-rdma) rdma=3D"yes" ;; --disable-rdma) rdma=3D"no" @@ -1401,14 +1076,6 @@ for opt do ;; --disable-pvrdma) pvrdma=3D"no" ;; - --disable-vte) vte=3D"disabled" - ;; - --enable-vte) vte=3D"enabled" - ;; - --disable-virglrenderer) virglrenderer=3D"disabled" - ;; - --enable-virglrenderer) virglrenderer=3D"enabled" - ;; --disable-tpm) tpm=3D"no" ;; --enable-tpm) tpm=3D"yes" @@ -1425,18 +1092,6 @@ for opt do ;; --enable-numa) numa=3D"yes" ;; - --disable-libxml2) libxml2=3D"disabled" - ;; - --enable-libxml2) libxml2=3D"enabled" - ;; - --disable-tcmalloc) tcmalloc=3D"no" - ;; - --enable-tcmalloc) tcmalloc=3D"yes" - ;; - --disable-jemalloc) jemalloc=3D"no" - ;; - --enable-jemalloc) jemalloc=3D"yes" - ;; --disable-replication) replication=3D"no" ;; --enable-replication) replication=3D"yes" @@ -1502,14 +1157,6 @@ for opt do ;; --disable-debug-mutex) debug_mutex=3Dno ;; - --enable-libpmem) libpmem=3D"enabled" - ;; - --disable-libpmem) libpmem=3D"disabled" - ;; - --enable-xkbcommon) xkbcommon=3D"enabled" - ;; - --disable-xkbcommon) xkbcommon=3D"disabled" - ;; --enable-plugins) if test "$mingw32" =3D "yes"; then error_exit "TCG plugins not currently supported on= Windows platforms" else @@ -1522,10 +1169,6 @@ for opt do ;; --disable-containers) use_containers=3D"no" ;; - --enable-fuzzing) fuzzing=3Dtrue - ;; - --disable-fuzzing) fuzzing=3Dfalse - ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; --enable-rng-none) rng_none=3Dyes @@ -1536,22 +1179,6 @@ for opt do ;; --disable-keyring) secret_keyring=3D"no" ;; - --enable-libdaxctl) libdaxctl=3D"enabled" - ;; - --disable-libdaxctl) libdaxctl=3D"disabled" - ;; - --enable-fuse) fuse=3D"enabled" - ;; - --disable-fuse) fuse=3D"disabled" - ;; - --enable-fuse-lseek) fuse_lseek=3D"enabled" - ;; - --disable-fuse-lseek) fuse_lseek=3D"disabled" - ;; - --enable-multiprocess) multiprocess=3D"enabled" - ;; - --disable-multiprocess) multiprocess=3D"disabled" - ;; --enable-gio) gio=3Dyes ;; --disable-gio) gio=3Dno @@ -1560,6 +1187,16 @@ for opt do ;; --disable-slirp-smbd) slirp_smbd=3Dno ;; + # backwards compatibility options + --enable-trace-backend=3D*) meson_option_parse "--enable-trace-backends= =3D$optarg" "$optarg" + ;; + --disable-blobs) meson_option_parse --disable-install-blobs "" + ;; + --enable-tcmalloc) meson_option_parse --enable-malloc=3Dtcmalloc tcmalloc + ;; + --enable-jemalloc) meson_option_parse --enable-malloc=3Djemalloc jemalloc + ;; + # everything else has the same name in configure and meson --enable-* | --disable-*) meson_option_parse "$opt" "$optarg" ;; *) @@ -1714,9 +1351,6 @@ for config in $mak_wilds; do fi done =20 -# Enumerate public trace backends for --help output -trace_backend_list=3D$(echo $(grep -le '^PUBLIC =3D True$' "$source_path"/= scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/')) - if test x"$show_help" =3D x"yes" ; then cat << EOF =20 @@ -1793,18 +1427,12 @@ Advanced options (experts only): (by default affects only QEMU, not tools like q= emu-img) --enable-block-drv-whitelist-in-tools use block whitelist also in tools instead of on= ly QEMU - --enable-trace-backends=3DB Set trace backend - Available backends: $trace_backend_list --with-trace-file=3DNAME Full PATH,NAME of file to store traces Default:trace- - --disable-slirp disable SLIRP userspace network connectivity - --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, expe= rimental and slow) - --enable-malloc-trim enable libc malloc_trim() for memory optimizati= on --cpu=3DCPU Build for host CPU [$cpu] --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --enable-gcov enable test coverage analysis with gcov - --disable-blobs disable installing provided firmware blobs --with-vss-sdk=3DSDK-path enable Windows VSS support in QEMU Guest Agent --with-win-sdk=3DSDK-path path to Windows Platform SDK (to build VSS .t= lb) --tls-priority default TLS protocol/cipher priority string @@ -1823,9 +1451,7 @@ cat << EOF user supported user emulation targets linux-user all linux usermode emulation targets bsd-user all BSD usermode emulation targets - docs build documentation guest-agent build the QEMU Guest Agent - guest-agent-msi build guest agent Windows MSI installation package pie Position Independent Executables modules modules support (non-Windows) module-upgrades try to load modules from alternate paths for upgrades @@ -1835,98 +1461,26 @@ cat << EOF sparse sparse checker safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - cfi Enable Control-Flow Integrity for indirect function call= s. - In case of a cfi violation, QEMU is terminated with SIGI= LL - Depends on lto and is incompatible with modules - Automatically enables Link-Time Optimization (lto) - cfi-debug In case of a cfi violation, a message containing the lin= e that - triggered the error is written to stderr. After the erro= r, - QEMU is still terminated with SIGILL - gnutls GNUTLS cryptography support - nettle nettle cryptography support - gcrypt libgcrypt cryptography support - auth-pam PAM access control - sdl SDL UI - sdl-image SDL Image support for icons - gtk gtk UI - vte vte support for the gtk UI - curses curses UI - iconv font glyph conversion support - vnc VNC UI support - vnc-sasl SASL encryption for VNC server - vnc-jpeg JPEG lossy compression for VNC server - vnc-png PNG compression for VNC server - cocoa Cocoa UI (Mac OS X only) - virtfs VirtFS - virtiofsd build virtiofs daemon (virtiofsd) - libudev Use libudev to enumerate host devices - mpath Multipath persistent reservation passthrough - xen xen backend driver support - xen-pci-passthrough PCI passthrough support for Xen - alsa ALSA sound support - coreaudio CoreAudio sound support - dsound DirectSound sound support - jack JACK sound support - oss OSS sound support - pa PulseAudio sound support - brlapi BrlAPI (Braile) - curl curl connectivity membarrier membarrier system call (for Linux 4.14+ or Windows) - fdt fdt device tree - kvm KVM acceleration support - hax HAX acceleration support - hvf Hypervisor.framework acceleration support - nvmm NVMM acceleration support - whpx Windows Hypervisor Platform acceleration support rdma Enable RDMA-based migration pvrdma Enable PVRDMA support - vde support for vde network - netmap support for netmap network - linux-aio Linux AIO support - linux-io-uring Linux io_uring support - cap-ng libcap-ng support - attr attr and xattr support vhost-net vhost-net kernel acceleration support vhost-vsock virtio sockets device support vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support vhost-user vhost-user backend support - vhost-user-blk-server vhost-user-blk server support vhost-vdpa vhost-vdpa kernel backend support - bpf BPF kernel support - spice spice - spice-protocol spice-protocol - rbd rados block device (rbd) - libiscsi iscsi support - libnfs nfs support - smartcard smartcard support (libcacard) - u2f U2F support (u2f-emu) - libusb libusb (for usb passthrough) live-block-migration Block migration in the main migration stream - usb-redir usb network redirection support - lzo support of lzo compression library - snappy support of snappy compression library - bzip2 support of bzip2 compression library - (for reading bzip2-compressed dmg images) - lzfse support of lzfse compression library - (for reading lzfse-compressed dmg images) - zstd support for zstd compression library - (for migration compression and qcow2 cluster compression) - seccomp seccomp support coroutine-pool coroutine freelist (better performance) - glusterfs GlusterFS backend tpm TPM support libssh ssh block device support numa libnuma support libxml2 for Parallels image format - tcmalloc tcmalloc support - jemalloc jemalloc support avx2 AVX2 optimization support avx512f AVX512F optimization support replication replication support opengl opengl support - virglrenderer virgl rendering support xfsctl xfsctl support qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools @@ -1939,15 +1493,8 @@ cat << EOF qed qed image format support parallels parallels image format support crypto-afalg Linux AF_ALG crypto backend driver - capstone capstone disassembler support debug-mutex mutex debugging support - libpmem libpmem support - xkbcommon xkbcommon support rng-none dummy RNG, avoid using /dev/(u)random and getrandom() - libdaxctl libdaxctl support - fuse FUSE block device export - fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports - multiprocess Out of process device emulation support gio libgio support slirp-smbd use smbd (at path --smbd=3D*) in slirp networking =20 @@ -3171,16 +2718,6 @@ EOF fi fi =20 -malloc=3Dsystem -if test "$tcmalloc" =3D "yes" && test "$jemalloc" =3D "yes" ; then - echo "ERROR: tcmalloc && jemalloc can't be used at the same time" - exit 1 -elif test "$tcmalloc" =3D "yes" ; then - malloc=3Dtcmalloc -elif test "$jemalloc" =3D "yes" ; then - malloc=3Djemalloc -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -4511,40 +4048,23 @@ if test "$skip_meson" =3D no; then --sysconfdir "$sysconfdir" \ --localedir "$localedir" \ --localstatedir "$local_statedir" \ + -Daudio_drv_list=3D$audio_drv_list \ + -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ + -Dsphinx_build=3D"$sphinx_build" \ + -Dtrace_file=3D"$trace_file" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ -Dstrip=3D$(if test "$strip_opt" =3D yes; then echo true; else ech= o false; fi) \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dcfi_debug=3D$cfi_debug -Dfuzzing=3D$= fuzzing \ + -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg -Dxen=3D$xen \ + -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ - -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim -Dsparse=3D$sparse= \ - -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf -Dnvmm=3D$nv= mm \ - -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ - -Dcocoa=3D$cocoa -Dgtk=3D$gtk -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_= image=3D$sdl_image \ - -Dlibusb=3D$libusb -Dsmartcard=3D$smartcard -Dusb_redir=3D$usb_red= ir -Dvte=3D$vte \ - -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ - -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ - -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ - -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ - -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ - -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse -Dli= bxml2=3D$libxml2 \ - -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem -Dlinux_io_uring=3D$= linux_io_uring \ - -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ - -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ - -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ - -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ - -Dvhost_user_blk_server=3D$vhost_user_blk_server -Dmultiprocess=3D= $multiprocess \ - -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek -Dguest_agent_msi=3D$gue= st_agent_msi -Dbpf=3D$bpf\ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ - -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ - -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ - -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ - -Dnetmap=3D$netmap -Dvde=3D$vde \ "$@" $cross_arg "$PWD" "$source_path" } eval run_meson $meson_options diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 0f636d620e..7f106d2f1c 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -42,73 +42,21 @@ perform a build: ../configure make =20 -For now, checks on the compilation environment are found in configure -rather than meson.build, though this is expected to change. The command -line is parsed in the configure script and, whenever needed, converted -into the appropriate options to Meson. - -New checks should be added to Meson, which usually comprises the -following tasks: - - - Add a Meson build option to meson_options.txt. - - - Add support to the command line arg parser to handle any new - ``--enable-XXX``/``--disable-XXX`` flags required by the feature. - - - Add information to the help output message to report on the new - feature flag. - - - Add code to perform the actual feature check. - - - Add code to include the feature status in ``config-host.h`` - - - Add code to print out the feature status in the configure summary - upon completion. - - -Taking the probe for SDL2_Image as an example, we have the following pieces -in configure:: - - # Initial variable state - sdl_image=3Dauto - - ..snip.. - - # Configure flag processing - --disable-sdl-image) sdl_image=3Ddisabled - ;; - --enable-sdl-image) sdl_image=3Denabled - ;; - - ..snip.. - - # Help output feature message - sdl-image SDL Image support for icons - - ..snip.. - - # Meson invocation - -Dsdl_image=3D$sdl_image - -In meson_options.txt:: - - option('sdl', type : 'feature', value : 'auto', - description: 'SDL Image support for icons') - -In meson.build:: - - # Detect dependency - sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image'), - method: 'pkg-config', - kwargs: static_kwargs) - - # Create config-host.h (if applicable) - config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) - - # Summary - summary_info +=3D {'SDL image support': sdl_image.found()} +The configure script automatically recognizes +command line options for which a same-named Meson option exists; +dashes in the command line are replaced with underscores. =20 +Many checks on the compilation environment are still found in configure +rather than `meson.build`, but new checks should be added directly to +`meson.build`. =20 +Patches are also welcome to move existing checks from the configure +phase to `meson.build`. When doing so, ensure that `meson.build` does +not use anymore the keys that you have removed from `config-host.mak`. +Typically these will be replaced in `meson.build` by boolean variables, +``get_option('optname')`` invocations, or `dep.found()` expressions. +In general, the remaining checks have little or no interdependencies, +so they can be moved one by one. =20 Helper functions ---------------- @@ -335,6 +283,60 @@ new target, or enabling new devices or hardware for a = particular system/userspace emulation target =20 =20 +Adding checks +------------- + +New checks should be added to Meson. Compiler checks can be as simple as +the following:: + + config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) + +A more complex task such as adding a new dependency usually +comprises the following tasks: + + - Add a Meson build option to meson_options.txt. + + - Add code to perform the actual feature check. + + - Add code to include the feature status in `config-host.h` + + - Add code to print out the feature status in the configure summary + upon completion. + +Taking the probe for SDL2_Image as an example, we have the following +in ``meson_options.txt``:: + + option('sdl_image', type : 'feature', value : 'auto', + description: 'SDL Image support for icons') + +Unless the option was given a non-``auto`` value (on the configure +command line), the detection code must be performed only if the +dependency will be used:: + + sdl_image =3D not_found + if not get_option('sdl_image').auto() or have_system + sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image= '), + method: 'pkg-config', + static: enable_static) + endif + +This avoids warnings on static builds of user-mode emulators, for example. +Most of the libraries used by system-mode emulators are not available for +static linking. + +The other supporting code is generally simple:: + + # Create config-host.h (if applicable) + config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) + + # Summary + summary_info +=3D {'SDL image support': sdl_image.found()} + +For the configure script to parse the new option, the +``scripts/meson-buildoptions.sh`` file must be up-to-date; ``make +update-buildoptions`` (or just `make`) will take care of updating it. + + Support scripts --------------- =20 diff --git a/meson_options.txt b/meson_options.txt index 5a140af7f7..4ab4570125 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,7 @@ +# These options do not correspond to a --enable/--disable-* option +# on the configure script command line. If you add more, list them in +# scripts/meson-buildoptions.py's SKIP_OPTIONS constant too. + option('qemu_suffix', type : 'string', value: 'qemu', description: 'Suffix for QEMU data/modules/config directories (can = be empty)') option('docdir', type : 'string', value : 'doc', @@ -16,6 +20,10 @@ option('fuzzing_engine', type : 'string', value : '', option('trace_file', type: 'string', value: 'trace', description: 'Trace file prefix for simple backend') =20 +# Everything else can be set via --enable/--disable-* option +# on the configure script command line. After adding an option +# here make sure to run "make update-buildoptions". + option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') option('fuzzing', type : 'boolean', value: false, diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 71ee56bd22..54b591d8a4 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -25,10 +25,71 @@ import shlex import sys =20 +SKIP_OPTIONS =3D { + "audio_drv_list", + "default_devices", + "docdir", + "fuzzing_engine", + "qemu_firmwarepath", + "qemu_suffix", + "sphinx_build", + "trace_file", +} + +LINE_WIDTH =3D 76 + + +# Convert the default value of an option to the string used in +# the help message +def value_to_help(value): + if isinstance(value, list): + return ",".join(value) + if isinstance(value, bool): + return "enabled" if value else "disabled" + return str(value) + + +def wrap(left, text, indent): + spaces =3D " " * indent + if len(left) >=3D indent: + yield left + left =3D spaces + else: + left =3D (left + spaces)[0:indent] + yield from textwrap.wrap( + text, width=3DLINE_WIDTH, initial_indent=3Dleft, subsequent_indent= =3Dspaces + ) + + def sh_print(line=3D""): print(' printf "%s\\n"', shlex.quote(line)) =20 =20 +def help_line(left, opt, indent, long): + right =3D f"{opt['description']}" + if long: + value =3D value_to_help(opt["value"]) + if value !=3D "auto": + right +=3D f" [{value}]" + if "choices" in opt and long: + choices =3D "/".join(sorted(opt["choices"])) + right +=3D f" (choices: {choices})" + for x in wrap(" " + left, right, indent): + sh_print(x) + + +# Return whether the option (a dictionary) can be used with +# arguments. Booleans can never be used with arguments; +# combos allow an argument only if they accept other values +# than "auto", "enabled", and "disabled". +def allow_arg(opt): + if opt["type"] =3D=3D "boolean": + return False + if opt["type"] !=3D "combo": + return True + return not (set(opt["choices"]) <=3D {"auto", "disabled", "enabled"}) + + def load_options(json): json =3D [ x @@ -42,17 +103,48 @@ def load_options(json): =20 def print_help(options): print("meson_options_help() {") + for opt in options: + key =3D opt["name"].replace("_", "-") + # The first section includes options that have an arguments, + # and booleans (i.e., only one of enable/disable makes sense) + if opt["type"] =3D=3D "boolean": + left =3D f"--disable-{key}" if opt["value"] else f"--enable-{k= ey}" + help_line(left, opt, 27, False) + elif allow_arg(opt): + if opt["type"] =3D=3D "combo" and "enabled" in opt["choices"]: + left =3D f"--enable-{key}[=3DCHOICE]" + else: + left =3D f"--enable-{key}=3DCHOICE" + help_line(left, opt, 27, True) + sh_print() sh_print("Optional features, enabled with --enable-FEATURE and") sh_print("disabled with --disable-FEATURE, default is enabled if avail= able") sh_print("(unless built with --without-default-features):") sh_print() + for opt in options: + key =3D opt["name"].replace("_", "-") + if opt["type"] !=3D "boolean" and not allow_arg(opt): + help_line(key, opt, 18, False) print("}") =20 =20 def print_parse(options): print("_meson_option_parse() {") print(" case $1 in") + for opt in options: + key =3D opt["name"].replace("_", "-") + name =3D opt["name"] + if opt["type"] =3D=3D "boolean": + print(f' --enable-{key}) printf "%s" -D{name}=3Dtrue ;;') + print(f' --disable-{key}) printf "%s" -D{name}=3Dfalse ;;') + else: + if opt["type"] =3D=3D "combo" and "enabled" in opt["choices"]: + print(f' --enable-{key}) printf "%s" -D{name}=3Denabled= ;;') + if opt["type"] =3D=3D "combo" and "disabled" in opt["choices"]: + print(f' --disable-{key}) printf "%s" -D{name}=3Ddisabl= ed ;;') + if allow_arg(opt): + print(f' --enable-{key}=3D*) quote_sh "-D{name}=3D$2" ;= ;') print(" *) return 1 ;;") print(" esac") print("}") diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index c8ae205601..12188c2530 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,13 +1,269 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --enable-capstone[=3DCHOICE]' + printf "%s\n" ' Whether and how to find the ca= pstone library' + printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' + printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)' + printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI = violation' + printf "%s\n" ' --enable-fdt[=3DCHOICE] Whether and how to find the = libfdt library' + printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' + printf "%s\n" ' --enable-fuzzing build fuzzing targets' + printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' + printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' + printf "%s\n" ' jemalloc/system/tcmalloc)' + printf "%s\n" ' --enable-slirp[=3DCHOICE] Whether and how to find the = slirp library' + printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' + printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (experimental and' + printf "%s\n" ' slow)' + printf "%s\n" ' --enable-trace-backends=3DCHOICE' + printf "%s\n" ' Set available tracing backends= [log]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' printf "%s\n" '(unless built with --without-default-features):' printf "%s\n" '' + printf "%s\n" ' alsa ALSA sound support' + printf "%s\n" ' attr attr/xattr support' + printf "%s\n" ' auth-pam PAM access control' + printf "%s\n" ' bpf eBPF support' + printf "%s\n" ' brlapi brlapi character device driver' + printf "%s\n" ' bzip2 bzip2 support for DMG images' + printf "%s\n" ' cap-ng cap_ng support' + printf "%s\n" ' cocoa Cocoa user interface (macOS only)' + printf "%s\n" ' coreaudio CoreAudio sound support' + printf "%s\n" ' curl CURL block device driver' + printf "%s\n" ' curses curses UI' + printf "%s\n" ' docs Documentations build support' + printf "%s\n" ' dsound DirectSound sound support' + printf "%s\n" ' fuse FUSE block device export' + printf "%s\n" ' fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE ex= ports' + printf "%s\n" ' gcrypt libgcrypt cryptography support' + printf "%s\n" ' gettext Localization of the GTK+ user interface' + printf "%s\n" ' glusterfs Glusterfs block device driver' + printf "%s\n" ' gnutls GNUTLS cryptography support' + printf "%s\n" ' gtk GTK+ user interface' + printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Ag= ent' + printf "%s\n" ' hax HAX acceleration support' + printf "%s\n" ' hvf HVF acceleration support' + printf "%s\n" ' iconv Font glyph conversion support' + printf "%s\n" ' jack JACK sound support' + printf "%s\n" ' kvm KVM acceleration support' + printf "%s\n" ' libdaxctl libdaxctl support' + printf "%s\n" ' libiscsi libiscsi userspace initiator' + printf "%s\n" ' libnfs libnfs block device driver' + printf "%s\n" ' libpmem libpmem support' + printf "%s\n" ' libudev Use libudev to enumerate host devices' + printf "%s\n" ' libusb libusb support for USB passthrough' + printf "%s\n" ' libxml2 libxml2 support for Parallels image for= mat' + printf "%s\n" ' linux-aio Linux AIO support' + printf "%s\n" ' linux-io-uring Linux io_uring support' + printf "%s\n" ' lzfse lzfse support for DMG images' + printf "%s\n" ' lzo lzo compression support' + printf "%s\n" ' malloc-trim enable libc malloc_trim() for memory op= timization' + printf "%s\n" ' mpath Multipath persistent reservation passth= rough' + printf "%s\n" ' multiprocess Out of process device emulation support' + printf "%s\n" ' netmap netmap network backend support' + printf "%s\n" ' nettle nettle cryptography support' + printf "%s\n" ' nvmm NVMM acceleration support' + printf "%s\n" ' oss OSS sound support' + printf "%s\n" ' pa PulseAudio sound support' + printf "%s\n" ' rbd Ceph block device driver' + printf "%s\n" ' sdl SDL user interface' + printf "%s\n" ' sdl-image SDL Image support for icons' + printf "%s\n" ' seccomp seccomp support' + printf "%s\n" ' smartcard CA smartcard emulation support' + printf "%s\n" ' snappy snappy compression support' + printf "%s\n" ' sparse sparse checker' + printf "%s\n" ' spice Spice server support' + printf "%s\n" ' spice-protocol Spice protocol support' + printf "%s\n" ' tcg TCG support' + printf "%s\n" ' u2f U2F emulation support' + printf "%s\n" ' usb-redir libusbredir support' + printf "%s\n" ' vde vde network backend support' + printf "%s\n" ' vhost-user-blk-server' + printf "%s\n" ' build vhost-user-blk server' + printf "%s\n" ' virglrenderer virgl rendering support' + printf "%s\n" ' virtfs virtio-9p support' + printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)' + printf "%s\n" ' vnc VNC server' + printf "%s\n" ' vnc-jpeg JPEG lossy compression for VNC server' + printf "%s\n" ' vnc-png PNG compression for VNC server' + printf "%s\n" ' vnc-sasl SASL authentication for VNC server' + printf "%s\n" ' vte vte support for the gtk UI' + printf "%s\n" ' whpx WHPX acceleration support' + printf "%s\n" ' xen Xen backend support' + printf "%s\n" ' xen-pci-passthrough' + printf "%s\n" ' Xen PCI passthrough support' + printf "%s\n" ' xkbcommon xkbcommon support' + printf "%s\n" ' zstd zstd compression support' } _meson_option_parse() { case $1 in + --enable-alsa) printf "%s" -Dalsa=3Denabled ;; + --disable-alsa) printf "%s" -Dalsa=3Ddisabled ;; + --enable-attr) printf "%s" -Dattr=3Denabled ;; + --disable-attr) printf "%s" -Dattr=3Ddisabled ;; + --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; + --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; + --enable-bpf) printf "%s" -Dbpf=3Denabled ;; + --disable-bpf) printf "%s" -Dbpf=3Ddisabled ;; + --enable-brlapi) printf "%s" -Dbrlapi=3Denabled ;; + --disable-brlapi) printf "%s" -Dbrlapi=3Ddisabled ;; + --enable-bzip2) printf "%s" -Dbzip2=3Denabled ;; + --disable-bzip2) printf "%s" -Dbzip2=3Ddisabled ;; + --enable-cap-ng) printf "%s" -Dcap_ng=3Denabled ;; + --disable-cap-ng) printf "%s" -Dcap_ng=3Ddisabled ;; + --enable-capstone) printf "%s" -Dcapstone=3Denabled ;; + --disable-capstone) printf "%s" -Dcapstone=3Ddisabled ;; + --enable-capstone=3D*) quote_sh "-Dcapstone=3D$2" ;; + --enable-cfi) printf "%s" -Dcfi=3Dtrue ;; + --disable-cfi) printf "%s" -Dcfi=3Dfalse ;; + --enable-cfi-debug) printf "%s" -Dcfi_debug=3Dtrue ;; + --disable-cfi-debug) printf "%s" -Dcfi_debug=3Dfalse ;; + --enable-cocoa) printf "%s" -Dcocoa=3Denabled ;; + --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; + --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; + --disable-coreaudio) printf "%s" -Dcoreaudio=3Ddisabled ;; + --enable-curl) printf "%s" -Dcurl=3Denabled ;; + --disable-curl) printf "%s" -Dcurl=3Ddisabled ;; + --enable-curses) printf "%s" -Dcurses=3Denabled ;; + --disable-curses) printf "%s" -Dcurses=3Ddisabled ;; + --enable-docs) printf "%s" -Ddocs=3Denabled ;; + --disable-docs) printf "%s" -Ddocs=3Ddisabled ;; + --enable-dsound) printf "%s" -Ddsound=3Denabled ;; + --disable-dsound) printf "%s" -Ddsound=3Ddisabled ;; + --enable-fdt) printf "%s" -Dfdt=3Denabled ;; + --disable-fdt) printf "%s" -Dfdt=3Ddisabled ;; + --enable-fdt=3D*) quote_sh "-Dfdt=3D$2" ;; + --enable-fuse) printf "%s" -Dfuse=3Denabled ;; + --disable-fuse) printf "%s" -Dfuse=3Ddisabled ;; + --enable-fuse-lseek) printf "%s" -Dfuse_lseek=3Denabled ;; + --disable-fuse-lseek) printf "%s" -Dfuse_lseek=3Ddisabled ;; + --enable-fuzzing) printf "%s" -Dfuzzing=3Dtrue ;; + --disable-fuzzing) printf "%s" -Dfuzzing=3Dfalse ;; + --enable-gcrypt) printf "%s" -Dgcrypt=3Denabled ;; + --disable-gcrypt) printf "%s" -Dgcrypt=3Ddisabled ;; + --enable-gettext) printf "%s" -Dgettext=3Denabled ;; + --disable-gettext) printf "%s" -Dgettext=3Ddisabled ;; + --enable-glusterfs) printf "%s" -Dglusterfs=3Denabled ;; + --disable-glusterfs) printf "%s" -Dglusterfs=3Ddisabled ;; + --enable-gnutls) printf "%s" -Dgnutls=3Denabled ;; + --disable-gnutls) printf "%s" -Dgnutls=3Ddisabled ;; + --enable-gtk) printf "%s" -Dgtk=3Denabled ;; + --disable-gtk) printf "%s" -Dgtk=3Ddisabled ;; + --enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Denabled ;; + --disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Ddisabled ;; + --enable-hax) printf "%s" -Dhax=3Denabled ;; + --disable-hax) printf "%s" -Dhax=3Ddisabled ;; + --enable-hvf) printf "%s" -Dhvf=3Denabled ;; + --disable-hvf) printf "%s" -Dhvf=3Ddisabled ;; + --enable-iconv) printf "%s" -Diconv=3Denabled ;; + --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; + --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; + --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; + --enable-jack) printf "%s" -Djack=3Denabled ;; + --disable-jack) printf "%s" -Djack=3Ddisabled ;; + --enable-kvm) printf "%s" -Dkvm=3Denabled ;; + --disable-kvm) printf "%s" -Dkvm=3Ddisabled ;; + --enable-libdaxctl) printf "%s" -Dlibdaxctl=3Denabled ;; + --disable-libdaxctl) printf "%s" -Dlibdaxctl=3Ddisabled ;; + --enable-libiscsi) printf "%s" -Dlibiscsi=3Denabled ;; + --disable-libiscsi) printf "%s" -Dlibiscsi=3Ddisabled ;; + --enable-libnfs) printf "%s" -Dlibnfs=3Denabled ;; + --disable-libnfs) printf "%s" -Dlibnfs=3Ddisabled ;; + --enable-libpmem) printf "%s" -Dlibpmem=3Denabled ;; + --disable-libpmem) printf "%s" -Dlibpmem=3Ddisabled ;; + --enable-libudev) printf "%s" -Dlibudev=3Denabled ;; + --disable-libudev) printf "%s" -Dlibudev=3Ddisabled ;; + --enable-libusb) printf "%s" -Dlibusb=3Denabled ;; + --disable-libusb) printf "%s" -Dlibusb=3Ddisabled ;; + --enable-libxml2) printf "%s" -Dlibxml2=3Denabled ;; + --disable-libxml2) printf "%s" -Dlibxml2=3Ddisabled ;; + --enable-linux-aio) printf "%s" -Dlinux_aio=3Denabled ;; + --disable-linux-aio) printf "%s" -Dlinux_aio=3Ddisabled ;; + --enable-linux-io-uring) printf "%s" -Dlinux_io_uring=3Denabled ;; + --disable-linux-io-uring) printf "%s" -Dlinux_io_uring=3Ddisabled ;; + --enable-lzfse) printf "%s" -Dlzfse=3Denabled ;; + --disable-lzfse) printf "%s" -Dlzfse=3Ddisabled ;; + --enable-lzo) printf "%s" -Dlzo=3Denabled ;; + --disable-lzo) printf "%s" -Dlzo=3Ddisabled ;; + --enable-malloc=3D*) quote_sh "-Dmalloc=3D$2" ;; + --enable-malloc-trim) printf "%s" -Dmalloc_trim=3Denabled ;; + --disable-malloc-trim) printf "%s" -Dmalloc_trim=3Ddisabled ;; + --enable-mpath) printf "%s" -Dmpath=3Denabled ;; + --disable-mpath) printf "%s" -Dmpath=3Ddisabled ;; + --enable-multiprocess) printf "%s" -Dmultiprocess=3Denabled ;; + --disable-multiprocess) printf "%s" -Dmultiprocess=3Ddisabled ;; + --enable-netmap) printf "%s" -Dnetmap=3Denabled ;; + --disable-netmap) printf "%s" -Dnetmap=3Ddisabled ;; + --enable-nettle) printf "%s" -Dnettle=3Denabled ;; + --disable-nettle) printf "%s" -Dnettle=3Ddisabled ;; + --enable-nvmm) printf "%s" -Dnvmm=3Denabled ;; + --disable-nvmm) printf "%s" -Dnvmm=3Ddisabled ;; + --enable-oss) printf "%s" -Doss=3Denabled ;; + --disable-oss) printf "%s" -Doss=3Ddisabled ;; + --enable-pa) printf "%s" -Dpa=3Denabled ;; + --disable-pa) printf "%s" -Dpa=3Ddisabled ;; + --enable-rbd) printf "%s" -Drbd=3Denabled ;; + --disable-rbd) printf "%s" -Drbd=3Ddisabled ;; + --enable-sdl) printf "%s" -Dsdl=3Denabled ;; + --disable-sdl) printf "%s" -Dsdl=3Ddisabled ;; + --enable-sdl-image) printf "%s" -Dsdl_image=3Denabled ;; + --disable-sdl-image) printf "%s" -Dsdl_image=3Ddisabled ;; + --enable-seccomp) printf "%s" -Dseccomp=3Denabled ;; + --disable-seccomp) printf "%s" -Dseccomp=3Ddisabled ;; + --enable-slirp) printf "%s" -Dslirp=3Denabled ;; + --disable-slirp) printf "%s" -Dslirp=3Ddisabled ;; + --enable-slirp=3D*) quote_sh "-Dslirp=3D$2" ;; + --enable-smartcard) printf "%s" -Dsmartcard=3Denabled ;; + --disable-smartcard) printf "%s" -Dsmartcard=3Ddisabled ;; + --enable-snappy) printf "%s" -Dsnappy=3Denabled ;; + --disable-snappy) printf "%s" -Dsnappy=3Ddisabled ;; + --enable-sparse) printf "%s" -Dsparse=3Denabled ;; + --disable-sparse) printf "%s" -Dsparse=3Ddisabled ;; + --enable-spice) printf "%s" -Dspice=3Denabled ;; + --disable-spice) printf "%s" -Dspice=3Ddisabled ;; + --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; + --disable-spice-protocol) printf "%s" -Dspice_protocol=3Ddisabled ;; + --enable-tcg) printf "%s" -Dtcg=3Denabled ;; + --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; + --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; + --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dfalse ;; + --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; + --enable-u2f) printf "%s" -Du2f=3Denabled ;; + --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; + --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; + --disable-usb-redir) printf "%s" -Dusb_redir=3Ddisabled ;; + --enable-vde) printf "%s" -Dvde=3Denabled ;; + --disable-vde) printf "%s" -Dvde=3Ddisabled ;; + --enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=3D= enabled ;; + --disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server= =3Ddisabled ;; + --enable-virglrenderer) printf "%s" -Dvirglrenderer=3Denabled ;; + --disable-virglrenderer) printf "%s" -Dvirglrenderer=3Ddisabled ;; + --enable-virtfs) printf "%s" -Dvirtfs=3Denabled ;; + --disable-virtfs) printf "%s" -Dvirtfs=3Ddisabled ;; + --enable-virtiofsd) printf "%s" -Dvirtiofsd=3Denabled ;; + --disable-virtiofsd) printf "%s" -Dvirtiofsd=3Ddisabled ;; + --enable-vnc) printf "%s" -Dvnc=3Denabled ;; + --disable-vnc) printf "%s" -Dvnc=3Ddisabled ;; + --enable-vnc-jpeg) printf "%s" -Dvnc_jpeg=3Denabled ;; + --disable-vnc-jpeg) printf "%s" -Dvnc_jpeg=3Ddisabled ;; + --enable-vnc-png) printf "%s" -Dvnc_png=3Denabled ;; + --disable-vnc-png) printf "%s" -Dvnc_png=3Ddisabled ;; + --enable-vnc-sasl) printf "%s" -Dvnc_sasl=3Denabled ;; + --disable-vnc-sasl) printf "%s" -Dvnc_sasl=3Ddisabled ;; + --enable-vte) printf "%s" -Dvte=3Denabled ;; + --disable-vte) printf "%s" -Dvte=3Ddisabled ;; + --enable-whpx) printf "%s" -Dwhpx=3Denabled ;; + --disable-whpx) printf "%s" -Dwhpx=3Ddisabled ;; + --enable-xen) printf "%s" -Dxen=3Denabled ;; + --disable-xen) printf "%s" -Dxen=3Ddisabled ;; + --enable-xen-pci-passthrough) printf "%s" -Dxen_pci_passthrough=3Denab= led ;; + --disable-xen-pci-passthrough) printf "%s" -Dxen_pci_passthrough=3Ddis= abled ;; + --enable-xkbcommon) printf "%s" -Dxkbcommon=3Denabled ;; + --disable-xkbcommon) printf "%s" -Dxkbcommon=3Ddisabled ;; + --enable-zstd) printf "%s" -Dzstd=3Denabled ;; + --disable-zstd) printf "%s" -Dzstd=3Ddisabled ;; *) return 1 ;; esac } --=20 2.31.1