From nobody Mon May 20 13:08:11 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 1633612316488102.59135475363689; Thu, 7 Oct 2021 06:11:56 -0700 (PDT) Received: from localhost ([::1]:36730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTBj-00033P-Dc for importer@patchew.org; Thu, 07 Oct 2021 09:11:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT6n-0002VO-5c for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:49 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:45028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT6Y-0006rB-OI for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:48 -0400 Received: by mail-ed1-x535.google.com with SMTP id v18so22957769edc.11 for ; Thu, 07 Oct 2021 06:06:34 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ca4sm10167543ejb.1.2021.10.07.06.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:06:32 -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=OlayNTJNr8js8hz3DL48sPeNKKh14xHKjjrOf+SQ96U=; b=XFhzkkUlqDY1HAyCtNZJm5pg4A5W72J1mYsF4dOaeP0BshtdmJ4yPu8O/x2N3kBtPp 8jFcypbAWRwsx8u63eBOQsiQXKZpB2kZYKcAL8VjIOESxc4TtHaGyrOkOFRSjwo3G2sB GEgBKP3OkjESRpiDwImTDs7XhNFGdu9XbRagx9SMHt4ICxcr1cIiy/BDb7tjeCvY3RMj +If552w9LdseU7h4yh09q06wt4oQnmcTnDj/ZEPK5uFHZgOhMJr4vfRwTiIT7wCtjJRC RS/tgg/xTrOz15QAsu2fPEdAFEe1vTkL4Vk57cGrGGO2x1ijZFo5fwhptPH0+7qM89iS KtEg== 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=OlayNTJNr8js8hz3DL48sPeNKKh14xHKjjrOf+SQ96U=; b=RmUn88I11HAWye9PGJFNyrW7wCWH7uUp08kiSGuD8piuslKQeEX9BP2HSvCIQTQQp8 xTiQqu2Tz4zdd9auOru9PTOVNtpPd8LtQsmuBeguZGNejhaU2U0KLIjKC6d4hKJs6+ax yaCXObiHCXibmH4mmmNk6AbtDPJx8xnZgEAVrAby/ihr+vqhLdtUVPQuo71BARBt6Qeu iBbswiM621PsLOuiwwc9Ys6v6ibAw31TDQyJJ9Ai8ojWdl/9t0zNRw8ac4e7++iyZIYD mOk6QU+mvsv5IdHsuT5WCmEtZQHBzOo8R0iwoB1JiATHbEpWcQFa7W1/z11wFzZC4SyH Iwcg== X-Gm-Message-State: AOAM531VZrW4pDWrp68DmDp6TQBQ7Ddwn56L9ByEPPvrKF3ccCuP6ZID BL9sx2UExgDbWaLRKx9EFXAIyuXaQ50= X-Google-Smtp-Source: ABdhPJx+UTeaR+NU+OPy7XaTPRA8V9LXK7zqQw2U8EQoJZtCBKJMvQDMqksRMeM1JgLEbfqWlSohxQ== X-Received: by 2002:a50:d802:: with SMTP id o2mr5998046edj.331.1633611993152; Thu, 07 Oct 2021 06:06:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/24] configure: remove --oss-lib Date: Thu, 7 Oct 2021 15:06:07 +0200 Message-Id: <20211007130630.632028-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?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: 1633612318459100001 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 --- 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 Mon May 20 13:08:11 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 1633612164563184.00379348747595; Thu, 7 Oct 2021 06:09:24 -0700 (PDT) Received: from localhost ([::1]:57230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYT9H-0006Cz-Bx for importer@patchew.org; Thu, 07 Oct 2021 09:09:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT6f-00024j-MM for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:41 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:40637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT6d-00077p-9P for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:41 -0400 Received: by mail-ed1-x529.google.com with SMTP id g8so22860211edt.7 for ; Thu, 07 Oct 2021 06:06:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ca4sm10167543ejb.1.2021.10.07.06.06.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:06:33 -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=Y1bn4TnWehEVd2MxT1WgUiKTLzFekpfK4F+S/RtUMuM=; b=SBd773ubybdzgJg8k4l0mJmCf4q9yuWJwIm2s9OS74YRAr0YdZlWdJ+v45ZmtrewcM jBpJwxY1KNBPXnGRgSwaeWJusUSo7bJ7hEIeLib/9L4vgOlyX/DcW9tsqWWM/+XAp5+U FO+YvV1hziHgl+LM1pExlQvaVpprSQYGFzQ4bm4Jafw2WmAwWfg5uxOrvtm00i5f87g5 1aFXVQS2RzlY0wpqGeolff/6pEZPKtacyzB7EF/ufUwHdjVoNIwef9krVUPupQLaVWCV d26aUWOkHfGFj1HvmlwEULcRdAHKwN+YQEgBjak9VHpx2A1oNgb+21ojTcOVsGpP6VGU e76w== 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=Y1bn4TnWehEVd2MxT1WgUiKTLzFekpfK4F+S/RtUMuM=; b=izcuW9HGntv3vKjV5oQO8PXD4g5LRyKk88PDzhNlPKgyT/MNfH3tQn1YGOzLd5r7or ZSqgqewpHpE+6E/C3URp1ALfFwUOQj/LEz5IYFFJFZJPMsQOBtjYIx0pJig9plZIGDJ1 ZI3FdZYUEZjZyeWz7wGx9niLZQW2XmWFTmbO7BdYe3bAOkC99g9hmi491d3SyWaA/Miz Un6k6vE02YU2ncQfv01EuAdy872yj7LAMQPyrtbYCAdQw3dpA7nZa7Z4dl7oY2mpc2HR 36m49KFX0PvWv5QtaqgaMqpU8jwWH0VyJQhiZGGtpQtPyo0gCstu8Lh6kSux4UBRl0/Y CB7A== X-Gm-Message-State: AOAM532/a/SxskI8bU9eS5ngoD+odcF5y0SuJnOYhT9qtCwFcWpUIGfa R1rZPOZoHl4ohMyrb0fb9FzTsHE+MNo= X-Google-Smtp-Source: ABdhPJwXd43nqC/UUIxNECn6IOJsSmxljOiD5lX9Wy04Ec538WzpgRuUq5otcP8d6pjqSMqxMd06hw== X-Received: by 2002:a50:9d42:: with SMTP id j2mr6298270edk.7.1633611994171; Thu, 07 Oct 2021 06:06:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/24] audio: remove CONFIG_AUDIO_WIN_INT Date: Thu, 7 Oct 2021 15:06:08 +0200 Message-Id: <20211007130630.632028-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?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: 1633612165097100001 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 --- 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 Mon May 20 13:08:11 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 1633612154983168.8291643146689; Thu, 7 Oct 2021 06:09:14 -0700 (PDT) Received: from localhost ([::1]:56224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYT97-0005Sq-OI for importer@patchew.org; Thu, 07 Oct 2021 09:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT6h-0002B9-Kg for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:43 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:36426) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT6e-0007J3-Fu for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:43 -0400 Received: by mail-ed1-x52a.google.com with SMTP id l7so23127328edq.3 for ; Thu, 07 Oct 2021 06:06:39 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ca4sm10167543ejb.1.2021.10.07.06.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:06:36 -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=QxUAx8yF+xggeK4LspIJ3j3yR3fI7Sni6oMJokDGu2E=; b=pJhlAXvDx0l7IAprsrgGkFPHW4OKY5Wo5cbBOwnCYq9ECK9S+mrTaNZ22VylTg+cPx mJPm7uFm+0745g/pvk/grtWWv89yICLUgImKzmDx+8qnwtcub6r8xQqSzK4WS5I43ByS 7az8fJDCfh/+FDJj03oI6Bn8gfHeIM1cd+8mZfqpQsaYU7drqGnAyMa1hxTYuMuGP7MM 7SaUfmlQCk9F+RH0t/BqSI7bEC+YWGoS/C+jKAZpn5lA7BihA2SEP54gbs459ranjb7y Dd3u0LEC9AFJxJwczTstCv0lmtWZcp+qaXBTyKBRaomyqy2aQ+7JUL0Ol1zTWvNBRFg+ qHDw== 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=QxUAx8yF+xggeK4LspIJ3j3yR3fI7Sni6oMJokDGu2E=; b=UHDZGdGe5F8D7F1BdRATwDZrc1KjeGKFFG7XgsrF4pvRrF3cHvTGuQBYpVdRfrsyOA 1Q8nf4jXorDkcsTOWJzXxSRONUcph5g9tvrqZz8HQvqzLzw8BP2LiMsUBB310woGg/yU cO7CPfHQvUq/vBxzksu9UDdij7/MviEOVKaouLDqW3jHQ0u/FHWhjyCfCjvXkYtUPB/X WIqOCdqCIISpxj3gZap1EGrrvgbBSA5dGyUY2zGsfA7hJVa8r5PqlO+svkPa5VnzJGqz B7/W0cvNURJwpyyZ9mR3ZyuY+m1MQ53ruHdkF8eRXTVvv7o+VeBrWJCQxGkjjH2+9AR3 2XTQ== X-Gm-Message-State: AOAM5311av8Vzyr1KxWdwBTNfFJ9stM6DjbpZab18keD8vPpTiLHtXlG KNz72xP95uy1RQbQ0/DCRkpORmPPdjk= X-Google-Smtp-Source: ABdhPJyABT5/5+ki94kqJDKRh/RCYeoUiXrn2oeIkebOc+x0KmBVDumZcwIgk7KrJy57E8pNlieAgw== X-Received: by 2002:a17:906:8893:: with SMTP id ak19mr3877925ejc.124.1633611996611; Thu, 07 Oct 2021 06:06:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/24] configure, meson: move audio driver detection to Meson Date: Thu, 7 Oct 2021 15:06:09 +0200 Message-Id: <20211007130630.632028-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?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: 1633612156305100001 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 --- 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 7b596fdcd9..13b725181a 100644 --- a/meson.build +++ b/meson.build @@ -430,20 +430,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 @@ -803,16 +806,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 @@ -1158,6 +1204,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 @@ -1201,10 +1290,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 @@ -1449,7 +1534,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) @@ -2885,7 +2970,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') @@ -3073,6 +3158,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 Mon May 20 13:08:11 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 1633612322207589.7633939349939; Thu, 7 Oct 2021 06:12:02 -0700 (PDT) Received: from localhost ([::1]:37388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTBp-0003TW-64 for importer@patchew.org; Thu, 07 Oct 2021 09:12:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT6h-00029E-4p for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:43 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:36432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT6f-0007Mk-94 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:42 -0400 Received: by mail-ed1-x530.google.com with SMTP id l7so23127430edq.3 for ; Thu, 07 Oct 2021 06:06:40 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ca4sm10167543ejb.1.2021.10.07.06.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:06:37 -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=OVlTEKspqDgNLmcgjTl/5S2TMmoesf/a0v+UFUMZ2ao=; b=JL/IX28tFpkhEkWWPdC8MI9Q170iw2nL1jaI/gc+u05ZAV/pD4BOvp06Fm7An1zVZu /lYyfgvwTsSgRw6B6LrF6tipdTPvf5aGNC30XufCzmTMfVrs4l+TOaHXT05MUwtorPDa ox07I5OtT/7tWeXLKaKMcf9KJ7/e/LJWIHUAH89cBkUbH0HZTbniROacjpWl669eZz/y qMxQPzg9U2jy9Dp4maKukIjJbTVsorrZq0T5h9l4ZgU1tAEOFFCI/f3Ietsx1hh+ZIx5 e0cxm4n4kmYcSyr1TUwiOEgENemz5tJV5icL/B/4kax9gBe9UNBq2c5vClXirmhaareF DDCg== 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=OVlTEKspqDgNLmcgjTl/5S2TMmoesf/a0v+UFUMZ2ao=; b=8E+yY8zyfvnGCKuHpGVgRg+ojey3cPo8/HWxMnFEYY5z6gilu/CkAkkdCTo2wpdbYc r/6jg8TRk2f9u1feC6olKu0/kY/1noHSKu0U4uTMWSIfAsevPKPeipMP/gleCicsmcr1 WA+pmh2wt8OIDgiwHK3Zp70L7DXeg9QCiY6WL+Djzy/xEJJ49OpEA3LYnPBPO4WWxDny if4Mk8OwWUX8gtpwO+D3OXMax3PpjnRYSoCfd48sEy2ggPI20gLRW1nK8iL0Ps2YJJ5T vtywsOIW1yxJkgzwx1V5CAsdVfsHXQL4hTLLbXzzUHvz9l0yJn65yhtEwlZENWvfWToC vdkw== X-Gm-Message-State: AOAM5324HITgyQALiCiE11kzBwAeYB2NGTxbx4vH8DBZfyBeVtgzNXgY 7q5qp+XKzwQeF9b4u/zRHUef5B0T0EU= X-Google-Smtp-Source: ABdhPJyRjF/ORRTHb9/Qjdx66U/DvIZ0vpiXwZsB4V1uRtPyjkpFP/6w+xLHPJezDdCee7g+EVI+TA== X-Received: by 2002:a50:d885:: with SMTP id p5mr6071269edj.255.1633611997475; Thu, 07 Oct 2021 06:06:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/24] meson: define symbols for all available audio drivers Date: Thu, 7 Oct 2021 15:06:10 +0200 Message-Id: <20211007130630.632028-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::530; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?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: 1633612323058100001 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 --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 13b725181a..0e9733a833 100644 --- a/meson.build +++ b/meson.build @@ -1219,6 +1219,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 \ @@ -1241,9 +1244,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 Mon May 20 13:08:11 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 1633612443481641.3225954591234; Thu, 7 Oct 2021 06:14:03 -0700 (PDT) Received: from localhost ([::1]:42094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTDm-0006aw-ES for importer@patchew.org; Thu, 07 Oct 2021 09:14:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT6h-0002Ao-IX for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:43 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:41854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT6f-0007M7-Kv for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:06:43 -0400 Received: by mail-ed1-x531.google.com with SMTP id a25so7219408edx.8 for ; Thu, 07 Oct 2021 06:06:40 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ca4sm10167543ejb.1.2021.10.07.06.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:06:37 -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=x6Ie3yL7NYkxjE0ns/nXhQ+jNDpQbZB2Hilw1SZ8aW0=; b=cwsUta+ApoC5achuUBwIPwNumJOTBUv7k+LRv63hKZns0uPcNFj4jKcdtEqk/uE+c6 avkE0J8cHsRA0hxMWeI8wECQSVL/w/Gv2FSMAsnZLDZoo+lV73cpho0A5L9IAK6zruur TLNfYHsa/Cze+7pMwolDCfFVWyTTc0W2c2ODFn9Van9Prxww+BKczYvqHiopY/jPmFhL vHokDYoNmotbSUwPjVx61MMBoMhFXe/EoifSnsiq8rxUTGGQcwR50iUtf4fINfiDfPHQ kJEgc1elvpoZZhOcwo8rnmvdT30nzvfTiKYmQAXMGeoVvucs72CwZWTB2HGKWGmRBkMI qrsQ== 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=x6Ie3yL7NYkxjE0ns/nXhQ+jNDpQbZB2Hilw1SZ8aW0=; b=cwl5XhO+nffirvvk7zDukEJsguT+rkEmf0Xy5x3K/GNrRLLvNabL6uVu2CmuupZc4Z SDNMmN3ISitDzob2aqm0PyKcv4hUH+6pgFIlUpEouiVK73U/KotbWCIQVqDCqqhjCmJF tmeNqYbvRxtZ4atmnqeLxu6d1colvHlMi7ehdC26uulwnWBtXIQSps3XuskobsuEPs6v LD4DwLL4ZRyUcg6hhItPSfHmovyZaeNXPwaos+UjC4WhNyILgIYIqEBEVSoKLFIHqiTF gLKfH5/i6K+BjAZF3oOMtPj/Ft7CDKyJSThhWmC4i4oT9IZU+yx+N/EeDNaMoJ6P+VJR CllQ== X-Gm-Message-State: AOAM531QZ3ZQbkLXREaUryutS8UVmUMDpiuUjr1Q91vdEQVqBYVZXVZO LLYvP8oYH93P3v8bxUIuiPug/fKm4Eg= X-Google-Smtp-Source: ABdhPJyzTbfzdCul7PdFh42F0ZZNqeqlpFyk7WThJspWgy9Dq1QRtoQW9fysIHjbfEIFTnFkPygOVQ== X-Received: by 2002:a17:906:5051:: with SMTP id e17mr5455377ejk.481.1633611998164; Thu, 07 Oct 2021 06:06:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/24] configure: add command line options for audio drivers Date: Thu, 7 Oct 2021 15:06:11 +0200 Message-Id: <20211007130630.632028-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?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: 1633612445590100001 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 --- 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 Mon May 20 13:08:11 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 16336128881391018.3220737106839; Thu, 7 Oct 2021 06:21:28 -0700 (PDT) Received: from localhost ([::1]:57548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTKx-0000L3-2n for importer@patchew.org; Thu, 07 Oct 2021 09:21:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8c-0005TU-1C for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:42 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:43711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Y-0007mz-TT for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:41 -0400 Received: by mail-ed1-x52e.google.com with SMTP id i20so7295407edj.10 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:30 -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=sVXcDCgvpoipTSD644966o8P2yiX+3lqStOLYb7lTDY=; b=pwnl+YVxc69x9BIxvWHfBWluMvlnvdDfuXTw8NEpwIDOFAhRvi1V0QOrBcZNCDSHo0 lDW4m2tYOsZS0k4eQ8JFnhYyKXg+3sS0sS5MetIUCTE+9ysbfkCnlMFlB2+pO+v+41KD qDM3UENvnPJbtCnUsJYp+knv/PIx+wRuPf/ofLVukbnbMT3l5SVWTTsywUbfzS+HJRkO GJ9VjBeM9/wNjraTntLHh8Bt+ycrZwIb/Cn0nuvDc+hEygosm3Xole5nqO/IgpKgeIqy j+iravB+HtEMkUqqeX0AzVnw5HeOC4lkk5UA2ZaMwwrp/WMNdsdbrf08y8FYqStWemC6 sj2Q== 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=sVXcDCgvpoipTSD644966o8P2yiX+3lqStOLYb7lTDY=; b=kzeOlFOz8GWXCKQ/IiKPldlA8OgVDmRsqngvq/dwV1eiztEPY5L2u70xyGXMnQVwlq Ux1XRD/UWWS/Ox8fj3ukClniuOlWJ20wVMAYue/5izd/iJR73IXsuk+IoT3LMvdMn87F GUACLkJ/Gjpmx2b9ErGkEyCeK/9hAB4yblcQmjYrEptUbRiNgtGCoO5Ux78sYP0CUlhK r4rqbXQzqZm5qJzyKDz3oBNXS3cFRIUWdjhCFokKPHBQ95t0G586Dfl28h+Bbg6UA/dd BcwriV5uk7Xv2kQFcdt9qJEyOjr1LvissWue8cEqPbhZKKPntYn0sE05E4Fkk1rZYRjr RLLg== X-Gm-Message-State: AOAM532cGw0PFE3cewQA4x4zTywyLE1KU+9IPIT963/rM8EHgutPUQwq F2HSCyVkmV6IlLZnrAvzOHSYBtZflls= X-Google-Smtp-Source: ABdhPJy4AYq/gUd/4W9R9CvHi2WKETs2nEODnBLHz2RnNV2SVqq6KeNSqb3FZbYTgLzuc92qHGlJpw== X-Received: by 2002:a17:906:7847:: with SMTP id p7mr5249475ejm.335.1633612110872; Thu, 07 Oct 2021 06:08:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/24] kconfig: split CONFIG_SPARSE_MEM from fuzzing Date: Thu, 7 Oct 2021 15:08:11 +0200 Message-Id: <20211007130829.632254-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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: 1633612888550100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 0e9733a833..f03bfff7a1 100644 --- a/meson.build +++ b/meson.build @@ -1602,6 +1602,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 Mon May 20 13:08:11 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 1633612687711847.0115877507473; Thu, 7 Oct 2021 06:18:07 -0700 (PDT) Received: from localhost ([::1]:50748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTHi-00047j-GI for importer@patchew.org; Thu, 07 Oct 2021 09:18:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8W-0005IF-0i for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:36 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:42544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8U-0007jP-0W for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:35 -0400 Received: by mail-ed1-x533.google.com with SMTP id t16so1024417eds.9 for ; Thu, 07 Oct 2021 06:08:33 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:31 -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=253DHPUaQfSlfr/I1gEiZWVlFhz2hinLphlD3e30Mkk=; b=VIEFHeY156iESrIfjDWjjjGZXmQlatBsyhXjiIRQu0XtPrpNhI9WtI2ARkuWpE/XTG m0HOblKy6v6e7Ey7Orn/LOGqeTJ0OVYTM7kQPtJqIQcZsOa1hk2c42BmpRz9ViOHILXV 4vmMhGeevZe+UxSUF6IDANw53jpDEB2sHYEWrbuVLsdUw6mGFoxxnM+Ly41RVUdezk04 S81zkjn/r+pFdQyoDbC68wL43b6yV7AVbdWLfs1OdJsu7qpiKMbYSja+ASa8w/C3Sm+l qQUppYsEowAVx7arHTkaKTrRipbp7Lz/ymnRrrsboOFB03msCSsol8MMs+AkQF8BteVb TGHQ== 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=253DHPUaQfSlfr/I1gEiZWVlFhz2hinLphlD3e30Mkk=; b=wE/oJVPkEukyYc0JhUisL5lag1ElA+vMDag/pkRSygdHzLLXHkzTaCTK41BY9YUm9I kOgOCKFWeQBtDTq1QVd4OPGr/U/esGe0AVzwTh5yDVCP9Atgur657bM2KwMYeQarXfHI JmrkrH+kTHzBFxo4Dec1wJFids8VUTVCyDy1oH50sXJKAIiHRQFn1VnMpKryGSDe0jDq JqSiv3zLiZXabF9N7sYwSLOOUqQSsGsPWu9rYyGogfBGCvEcRbt1gm6sAj9PiujVuLs6 fg/rWJS+ZlKFPWQboReZ7bEQjB2rVeVXMHaH+kDuMkmjWEtcLT/+MmLv+zwobC26LLcz WV5g== X-Gm-Message-State: AOAM5328v7EI3PsSYbo4mcU4Fhhwbh254Gf7vMeBzsO1CQC8UB9JH1b9 yftGtmDfU/hpe2kX/nmyF/+9bx9kBuI= X-Google-Smtp-Source: ABdhPJzt/GQq4raQdE9fpEnK1b9ppL4envs0HiLr2DzQPYUUBx2WJgLulKMwAaJFDf9cx3YOoVgeiQ== X-Received: by 2002:a05:6402:26d1:: with SMTP id x17mr4532101edd.367.1633612111591; Thu, 07 Oct 2021 06:08:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/24] configure, meson: move fuzzing configuration to Meson Date: Thu, 7 Oct 2021 15:08:12 +0200 Message-Id: <20211007130829.632254-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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: 1633612689559100001 Content-Type: text/plain; charset="utf-8" Cc: Alexander Oleinik Signed-off-by: Paolo Bonzini Reviewed-by: Alexander Bulekov Tested-by: Alexander Bulekov --- 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 f03bfff7a1..745b8c3c46 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 @@ -1327,6 +1365,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()) @@ -1602,7 +1641,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'] : []) + \ @@ -2729,7 +2768,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, @@ -2969,7 +3008,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 Mon May 20 13:08:11 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 1633612198829659.3291177683973; Thu, 7 Oct 2021 06:09:58 -0700 (PDT) Received: from localhost ([::1]:60156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYT9p-0008AQ-M0 for importer@patchew.org; Thu, 07 Oct 2021 09:09:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8W-0005K3-L7 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:36 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:39655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8T-0007jy-PV for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:36 -0400 Received: by mail-ed1-x52d.google.com with SMTP id x7so22273920edd.6 for ; Thu, 07 Oct 2021 06:08:33 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:31 -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=rGWLqLZqbjLbWaTFBwtDPnR5RfeNUARQ5s5ewQw2PBk=; b=QnT9n1UX5gQiOVrKvkX2ZarRC9Hz+gIcyz+j3hoO6LC2k3EESWW9HBJ9lw3CyfXtD+ V6v67Z/FpeGnQ3pOG1eZxtSuPBYcU0cNdENeg8tpy2BPv/Mn8jSuggoK4cLM0IQx7LXb ZaorMfAuew0pHRHjpiNU48CEP8sTFaVL8Y5uKsA3jxFBE2z8H33k799EH1bEFQiaO1tT qrVNoRfxM0/SF6t4Ao+18tEmLS+YXCrIR90GF1w0Bp3c1m/4/CW25i6Iu/dOJXZ0N5/B wCfiyZo15hsGQQK/E5MueGFJ/eA7kw9KtrBYEzHzp1a+fzdkDe9dvkSkmM8XeyemiVwg MmFA== 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=rGWLqLZqbjLbWaTFBwtDPnR5RfeNUARQ5s5ewQw2PBk=; b=jN9kWyyR00POGyHORvSHJ0Ljp5Hm0ovjMqqKKlVZKaL1CkbiB79AdSgHXsjcB7wSnw KulqeBs/tOtkWhKUI5duJ628tIMmSHt98WE4BESK2fWiqTvLrizdr8l0WbJZbS3xe/vV uDTRP0Nj2ictkJdrU+/7xQ/QubXQL7ZydTPjZtSHuTdhVlFkQ8Gyc8ygUiX67VYGNkph jKn9mZN99MF7NFrgEtU9Z6GZHaHNchMz+yGgd7KxnGKtEk/LeM7bjWKzn/PYC+Wa2rjq IQCqF14AdvTKBKNlKNPA5cApHkLYx4ZXX8eevQsenwGUOqeTuoBIy0PF9u6kTpE/p87U c33w== X-Gm-Message-State: AOAM532MUFuKyoVl8paLmDhgu9uzuMg1UU3evdvYXihP9WtD6gb0m/aU hCfdgdyM5uz/pMBOOXFMQW8de0XsUDc= X-Google-Smtp-Source: ABdhPJyxBKYpazDgwJpJKkl6dfKW7kilHUoHq9dKNHGkEZYOJZ8puq75m7V5F/YQ+aG0X3ibEMc0rA== X-Received: by 2002:a05:6402:40d3:: with SMTP id z19mr6166919edb.393.1633612112325; Thu, 07 Oct 2021 06:08:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/24] trace: simple: pass trace_file unmodified to config-host.h Date: Thu, 7 Oct 2021 15:08:13 +0200 Message-Id: <20211007130829.632254-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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: 1633612200978100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 745b8c3c46..8752b757cc 100644 --- a/meson.build +++ b/meson.build @@ -1574,7 +1574,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 Mon May 20 13:08:11 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 163361277458382.45660439668154; Thu, 7 Oct 2021 06:19:34 -0700 (PDT) Received: from localhost ([::1]:54606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTJ6-0006iL-EL for importer@patchew.org; Thu, 07 Oct 2021 09:19:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8Y-0005Ng-3A for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:38 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:37376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8V-0007k2-NH for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:37 -0400 Received: by mail-ed1-x536.google.com with SMTP id y12so9295010eda.4 for ; Thu, 07 Oct 2021 06:08:34 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:32 -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=9rCH4wctxN8WcMyAfwBozRtnI26L6A54B5lz96SaiQI=; b=CWX+KF1KB78D4apYggdFF2PeR87aDjt/bo4FlQM8OsuDKXYbGvH56EfVyKP8wd4S5z UsjfEO1TKqM9ejAZQnqAi7J224DbR7k9IWhJxsMjittYiQLofXbki4DqcvSsf0T48qLJ Ep6FGCAXT41v5+dP2rOgUuS3M6jNShIfBDUppUaQGmUYf5UhygPxEP+6/ciD033Gtw/G r4CTdTtiAVfSrzSOZfAEFkyFqTpmS9t/WKGdZyBUEK/IilPFVEcwE5HBkxMKRTTT9S4Y 5IMNmE2kIonh9Eim99+QG5G703Sr0vGlqROSDykvf8KGGjqSgfCnpdooTaDvIMQuWRWU jigg== 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=9rCH4wctxN8WcMyAfwBozRtnI26L6A54B5lz96SaiQI=; b=Os283ReowEXFrcMkq3O5MgaZnqfiZVLYFIojGIVWacZw5cg6XY44Qg1FYlOQLNHjdu ysXZ86DtCUbl900eBwKEJSF35vrngjqqmK9LY8Hd1nziTkgPEhOBUQ+R3N4oliBoXE+K 01fZcWLq7jkgctEIbLJqaDllyHL0SlNJ8Gk8hzqEQyiTSOiAUznLtBljaRKCUIyv4Ljm EzT2l6CHnamsqaTjZJicF+/q+9LITGa3V7d2d4DVkXXRIKY5ud3DS97m4xZIXbhoC7Z+ GdRxmLrxRElTN5xZJM+QXLcozQW8YuSXna7pxwaaLK+l5jhZguIo48FU+/4cp3uYJuNO C0Ug== X-Gm-Message-State: AOAM531gfqZIJBFgmT03qijfY8Zc7TQccug8LIwud/pgcYe+Yn26M7rS iOm2Ym+t44B2tt9+tN7XMWBtFJOTMJk= X-Google-Smtp-Source: ABdhPJwCKF2NU33Z9HONFEE869BmCKNLPPY/dGtxPHg6TGgiVXeIfP0eGwK6hOWSPm8mp8P/1wk2GQ== X-Received: by 2002:a05:6402:5209:: with SMTP id s9mr2298604edd.110.1633612113031; Thu, 07 Oct 2021 06:08:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/24] trace: move configuration from configure to Meson Date: Thu, 7 Oct 2021 15:08:14 +0200 Message-Id: <20211007130829.632254-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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: 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: 1633612776001100001 Content-Type: text/plain; charset="utf-8" Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 8752b757cc..98fa4b68d9 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 @@ -361,8 +390,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 @@ -1349,6 +1379,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) @@ -1574,7 +1609,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 @@ -2112,7 +2147,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', @@ -2831,7 +2866,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}, @@ -3012,9 +3047,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 Mon May 20 13:08:11 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 1633612635291856.3798470191039; Thu, 7 Oct 2021 06:17:15 -0700 (PDT) Received: from localhost ([::1]:49068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTGs-00030Q-1w for importer@patchew.org; Thu, 07 Oct 2021 09:17:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8b-0005TT-Qf for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:42 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:47075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Z-0007nU-5N for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:41 -0400 Received: by mail-ed1-x533.google.com with SMTP id z20so22788655edc.13 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PtPCM/1v4Q1iI3WF6cDEVwQ9iur4Hc5E6IdRJ9YJx90=; b=mQWIOojAPIQiKBglen5dLMV7/hTH5cJDXS1MqcFlf4GiDx4nGM9UTW6z1kBynpIlcD xiLbTpmHLIxY2sWCyscRNPLfkAX8aDFdneQrV4mUn5hF4F6CRA9SGvdYefubJ420Mswr DggngSoCWK26PDvNknuRBE9qG5KIfHwWbCk96mN82BGQiNLY3RZ2QuHQCdIO0a1chrRq xpIPT254ntMMF+GSlHZDl1hyIpb9hINRKMnjkRFHT/gTxy79C9VB+FvFT1Xkrez3QyFe UQ7tx6RFf6cctbK+9KBhJVwzDdFGu8i1k8AN7VEXst6rshsfIdgyraa0QlN2N2UobzXH kIwA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PtPCM/1v4Q1iI3WF6cDEVwQ9iur4Hc5E6IdRJ9YJx90=; b=FnWXIozw3QToHJKcyb84bWbGX1Y5uRtlUxeSscShLNC3Rtcj+y4ahPbMdkr4UJWoyW bT9ID7QPp7UFF0kCtWaur08mrw+baDrjzTu6A+f8GCEcOjZc8YoY9+wF8SVljHmqo990 lyD75S5hBXyfhYsR2gCja6ItRBGpBjBkFK2WpTHEsDiametVrP+mfGICs/zuuM5g6RIT mAVxd9M5zUlafhS6y6iE3O8o1o8yLC+psHB+3kjApSNg3T0+jfIzX/a5x2uzgX8H40UY NXYUOPQuOEX3UAsNFjsN56lwS84aMGvXdKOB+Hnf38U9HBtC7haACmBpygtTFzifsjt4 c4bw== X-Gm-Message-State: AOAM531BRIOTwskR8FSyhNnkXsdfTQOIWL4DLMYjCmc/7IqBSZxFWXhD u7SNDTMPy+63vYMAdXsD4rL3Sko25rE= X-Google-Smtp-Source: ABdhPJy5YZA7722pvSF/MxgaGs3bs9NxoxEdjO/fPOAk9NnWk6/jhdQm3i94v5Y6RDJfHy2gOC5h9w== X-Received: by 2002:a50:d84c:: with SMTP id v12mr5943539edj.203.1633612113718; Thu, 07 Oct 2021 06:08:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/24] configure, meson: move CONFIG_HOST_DSOSUF to Meson Date: Thu, 7 Oct 2021 15:08:15 +0200 Message-Id: <20211007130829.632254-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633612637275100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 98fa4b68d9..6842402a60 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'), @@ -1460,6 +1463,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 @@ -1606,10 +1610,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 @@ -1621,9 +1624,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 Mon May 20 13:08:11 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 1633612515116676.6275969550749; Thu, 7 Oct 2021 06:15:15 -0700 (PDT) Received: from localhost ([::1]:45784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTEw-0000e3-18 for importer@patchew.org; Thu, 07 Oct 2021 09:15:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8Y-0005Oz-Gk for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:38 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:37376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8W-0007kj-NN for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:38 -0400 Received: by mail-ed1-x535.google.com with SMTP id y12so9295255eda.4 for ; Thu, 07 Oct 2021 06:08:36 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OO2zTRrcL6TBfBs2BC24N1/EtkxgIVETUUd19ExDSoU=; b=AyVcgayCdaNfFlW3j9RXkdJhVc7Tp/yCQ6605iFjA+JckUSCOIBsk3QEgS9Y6Yvs4s Ri+sNdLHsSmiUVSkUFX195VoMJ6Erk64uomOKD9yGhbPOqLycnYI29yOYZSgV2oUIdZY DhkfNw9JK5BTwDZ4kPgH+aIZJK1G8qMwtUpIoDKs/RUL2XU8Wy7hD5NnVZ61hPuQuJcu NdvF0+3sl7PO+j8+atPP+x69/BsZSoAwjEbCi5OiEmWcxm+IyTodggytus243gTI/DdG z33PcJGUvaRSmQ+Cu6N6Xj61lGctQJSkl0p0jqBoCKRB44rKaxaxIXK//n5O3WztT3oj Bl3g== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OO2zTRrcL6TBfBs2BC24N1/EtkxgIVETUUd19ExDSoU=; b=LBwdQEOw+IdE8kg0hq6WNqpA6HpF9rzsphkJns82/OgEw3llmG1pxklPQ5d/oRalm9 +u2495xoFGPT4ShhiFk8jPn7n0xMYunOrEhxExYk54HAaQeFmx7QcFowGv9Dq3Z6ExHe qQlJj/DBGyfi06pf52SMhhmpfnP4ryVVxtgwX8Tf1+fK0EbPMle0Yv4shOnhyjJSeK5X 3M7yP0cP7W/mYlApEsyIPgvNy1jYOqVnb8c9vhGnJONVTCw6HfHUOt77Yc+UDGtl6mGT Y8JP8twiGD+OU4FEbPLKZ7DVxuiqqq1ZQkUJd+w2NIcnzBRr0d3sSfLPx/+mEidxoIL1 Gqdw== X-Gm-Message-State: AOAM5332JnY4zAkYB6yq7Gpj5dtxRGLXhFnSecPktEOMtEKx6Bi2c6sx cLgjboKNCPW8ZokTO9RCH6cl6YcH4DI= X-Google-Smtp-Source: ABdhPJzvVQ+oR1apkBVgm9nVUBhc+zTpb2UWhy2Ue9RDpJq3oYbJpJMnn2So7UiLuPunt1NyJkgzgQ== X-Received: by 2002:a05:6402:42d1:: with SMTP id i17mr6127927edc.320.1633612114457; Thu, 07 Oct 2021 06:08:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/24] configure, meson: get HOST_WORDS_BIGENDIAN via the machine object Date: Thu, 7 Oct 2021 15:08:16 +0200 Message-Id: <20211007130829.632254-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633612520380100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 6842402a60..9bb443387a 100644 --- a/meson.build +++ b/meson.build @@ -1465,6 +1465,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')) @@ -1625,7 +1626,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 Mon May 20 13:08:11 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 1633613052636820.6869095868567; Thu, 7 Oct 2021 06:24:12 -0700 (PDT) Received: from localhost ([::1]:37716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTNb-0006MW-Io for importer@patchew.org; Thu, 07 Oct 2021 09:24:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0005US-8r for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:36493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Y-0007mQ-7H for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:43 -0400 Received: by mail-ed1-x532.google.com with SMTP id l7so23150010edq.3 for ; Thu, 07 Oct 2021 06:08:37 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w2oIIbjtvUUPKCkTmEjnSQ9vy3EzBjnfsD3+I2rCdbk=; b=GIpM0KrkvpwZzKXe3cSlgOFKh5eOXjfI0/P7s5ED5vgGX4B2GyVK+cLJmCC5UqceQ5 2z/1zU6sW5/1Z0hEpp1u1MSTAr3EUrrAe1BKIuJXhiDqkZvNC1nkxmqMWZmSncHooQ9f wMSz/dNfHHMa9VMqTgE4y76q/qIvFDTSn4Lu5tAEmLbdpgHXL4t8zwWs49LvK3k/7qfM hI48ONelyhgn7kv/5LcnEWmbGh/Fbka0QGHvpQ5nwBm22Y6+BNq1XLDKy6uIXkqp44o+ klM+fp89D23sqCn0SRZLnInWDFcSKcP+iQdID8P5OWpbF/t7HEA0usI+JyugSfxpkoiI KCKA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=w2oIIbjtvUUPKCkTmEjnSQ9vy3EzBjnfsD3+I2rCdbk=; b=TvJIlqVfUxYv+ebSi5j8UUOUMPAUT3a5/9SSrNqOAPzsCboRhXXGdeXwitPSGKNyI/ ECIug0EB8MiOtlV2eju1OGqNXgrxZiRE/QrNOkoUpuXgBgD1c9961dyCQwMv0Jfyi4pK 4oVo15VCejq0bBaREcpaJ4F2tKnldRZPjtBEu+Mpp+rxDztofLcLnh3D7+S/j8ah0IqG 8AzLb7SVp80ycw0vu9tnXtBsrAjOwwmCMstodOYQzc8aXPO7Cin5O20cYvxBTXWBTXW+ sxqida1VQa5vguOV7Z/a7btvpYg0y1Ntc5w0RvVaWPn3izZJXhDgx4o4aEW+tg3dnsjO yw7w== X-Gm-Message-State: AOAM5314+cONdeCDVKPLnJLyLlEmzirimjscB8o16Hy4HDwnR9pqhqFs SWNYxWo+uKRzPrr0LChwI1/P63JKN80= X-Google-Smtp-Source: ABdhPJzwguwqXXlAWM/Dxhm9dCcSXsVGw7TCIh2/6t3ugPFAuArao0T9Woqp6pyk1TADgUr/oPIQIg== X-Received: by 2002:a50:8405:: with SMTP id 5mr6142985edp.228.1633612115061; Thu, 07 Oct 2021 06:08:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/24] configure, meson: remove CONFIG_GCOV from config-host.mak Date: Thu, 7 Oct 2021 15:08:17 +0200 Message-Id: <20211007130829.632254-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613054587100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 9bb443387a..2962c24eb5 100644 --- a/meson.build +++ b/meson.build @@ -1404,6 +1404,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 Mon May 20 13:08:11 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 1633613023851502.22012742653635; Thu, 7 Oct 2021 06:23:43 -0700 (PDT) Received: from localhost ([::1]:35086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTN8-0004aN-Rp for importer@patchew.org; Thu, 07 Oct 2021 09:23:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8Z-0005QH-BF for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:40 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:33485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8X-0007lV-Co for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:39 -0400 Received: by mail-ed1-x534.google.com with SMTP id p13so23377053edw.0 for ; Thu, 07 Oct 2021 06:08:36 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xRyXlyE5klILFYU5zwXVDOYm1mI+FCWCDaKsZd6MCNU=; b=IGGGSuXID1ie3aQRRZDWloEn636nY7dtkCqazXoqTBcP6qq6eGXWgv8Ty7YcsBoK3i ZZdbYF6aVRQ0fva+5e5RGtSWLt946kCJaiGfiEQuQUdC++pnhyYs+LIH7CRC2IoCjwnr cgMDqBbNKiEQHnbbOn0fTHtCxDiVM6bJei7iWkUlICWCx/t9X40cHcIEMy0UumJwQOj6 jRYS8OLpLiPAdlWFalkGd/6odxtvOr01r8waFFUMC7ic/RDpTCfbdiKGm3pP0AOrqYoy 3GsfNRZonC05GVlRthz7LwWtYeKrcYKSlyFgiSLt7I3MN0GuvoCu1qwGUJuvuhEuFZSy iUUg== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xRyXlyE5klILFYU5zwXVDOYm1mI+FCWCDaKsZd6MCNU=; b=oWvrW/CHR8l5+3m4dyovjz+OXQ3ADBWwhLne0cu9iOCDvzLFDRnWr/DjxzOKXq5U9q ndMYkHiic3lzzPS44q5k3O0LoHDBFbsvVHA25kOTzMDBQSzcIZmysmcZvjxWEZBJiXAI 5BVnrsao+G5NTSwob8kGq0UAsI3h7rJVj5xjz1/anou/Lyhp4nnDdZMEgZRgb4jCNc+8 BmB+bf7Klh8aAsoPXn7atVcv0heT8l/qqHLPAaZ9nYl8j1wL6qtzSTS3N+E4Wpp92gwv 4fpz9R5L9orKLBgaTfoSLQVKNuizYQ/1UhEKg3WHiUqm0iwKVPwTDNZ468YTwNHBDCmk 3hzw== X-Gm-Message-State: AOAM532/xq9OY9ucN+YJyZPgxs38RcNiOzRT8meay509y8f5pxfgUFWZ lzZ785k874UPBZFR69vlXOX8yw5j+M8= X-Google-Smtp-Source: ABdhPJypDuSsS+wTUcKRp5qABHdhI2yaH/TVnOXyoNBepJrpYSznMTyrzeuh2zjTm3Ccr6eFbyl+OQ== X-Received: by 2002:aa7:dbd2:: with SMTP id v18mr6241495edt.315.1633612115739; Thu, 07 Oct 2021 06:08:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/24] configure, meson: move remaining HAVE_* compiler tests to Meson Date: Thu, 7 Oct 2021 15:08:18 +0200 Message-Id: <20211007130829.632254-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613025992100001 Content-Type: text/plain; charset="utf-8" Remove some special cases by moving them to Meson. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 2962c24eb5..935a20c198 100644 --- a/meson.build +++ b/meson.build @@ -1604,6 +1604,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 @@ -1612,7 +1629,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 @@ -1627,7 +1645,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 Mon May 20 13:08:11 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 1633612934450657.6217346272657; Thu, 7 Oct 2021 06:22:14 -0700 (PDT) Received: from localhost ([::1]:59472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTLh-0001ti-A4 for importer@patchew.org; Thu, 07 Oct 2021 09:22:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8e-0005Vl-Gl for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:45 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:45957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Z-0007nL-0u for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: by mail-ed1-x535.google.com with SMTP id r18so22918836edv.12 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tvj9LX7SxlSUsHCxvULFpWvXGDbOhFLZH7RuuoaYL10=; b=LnvWDSvwSYM4hvvCrS/HWU68oqsoLImEQsITx6xlsQZXarcMxf7ryJdS50QtzkRSiQ QPqVtNLPMXT6R8J389ZdVzu/f3WZuW6SV5T248Cd7YEnOKQzY1nPF9qLNo/34RsJMBzd zEwmpXDddrNthKcH7/iB9n19k77HxDSdfaAIEv4MkEpTmSTzOGpp/4VZd3n1SV2W8yFn Y3Gv2zaPjFY4hyqaOPIagEj2aTHJHseFeEepNFkyBtjpvj9AVmgE8xcvJwuUZQK4Sayk TZW6TCYREwXbU8YOBubo/SrbZ+aKSlZIG1YaRtps/oIg5ztS+WNIztOTknV3aaKMXHso deXQ== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Tvj9LX7SxlSUsHCxvULFpWvXGDbOhFLZH7RuuoaYL10=; b=iDaeM3TNIRwKN4aMrM79gh6BNEkoATtcthV19bEN2A7GfnlPAWSFZ6w6CG7Pup1CFY atSFnazAmcqNXjZbCILYnZRK1tuawYoW72dfg/K/d8ZsdWPiqivXACoU05IRgDMfXrdw RBkM7JwPj0L+BfY0Feh4/dInkBtJkDqp6s625J/U1vM/8Ncc8BJmiD7iArnyqortkFGP K5QzYlpZwfplR9YYP1Z/BVRF/U5DkLMJYMQSKVFG1YbL4WCZxE7ibLB/8W/NfwevAHbl WB/uY4shVbwDftnrsjYiA5GyZG+zfM5z4+nzheKX6qY5s7N+Nrgb1kvfjev/eWbv5UfR PeHQ== X-Gm-Message-State: AOAM532sAAJixKCqzg4KG+Gc380w35DuTehVCDKPjpR4Q9wFcFx1nFML gZfV++K4WNaQ1HVqe2onDp1K8Of0kKk= X-Google-Smtp-Source: ABdhPJzonVw+VvdgWwEZeY+ieVMWnO4Pf4C9+Ru4GDfkWFCl0QnrlD7yhVmikfHZW+d7RrBOKEqM1Q== X-Received: by 2002:a50:9b06:: with SMTP id o6mr6157397edi.284.1633612116364; Thu, 07 Oct 2021 06:08:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/24] configure, meson: move pthread_setname_np checks to Meson Date: Thu, 7 Oct 2021 15:08:19 +0200 Message-Id: <20211007130829.632254-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633612935326100003 Content-Type: text/plain; charset="utf-8" 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 --- 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 935a20c198..54b2afdb96 100644 --- a/meson.build +++ b/meson.build @@ -1586,6 +1586,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 Mon May 20 13:08:11 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 1633612408175183.85475436389788; Thu, 7 Oct 2021 06:13:28 -0700 (PDT) Received: from localhost ([::1]:40556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTDD-0005bQ-3V for importer@patchew.org; Thu, 07 Oct 2021 09:13:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8a-0005RE-Or for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:40 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:35594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Y-0007mw-Pb for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:40 -0400 Received: by mail-ed1-x533.google.com with SMTP id b8so22997077edk.2 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZyHtkZsEYa+0ootTEE7Q8sxq/7+jkDMFxfhrxs70ppw=; b=HNyjfE7QCN/bKUWauugpj98nZW9wk2WfzFfNMohG8qHV/Xp8+Walg9XlAS3cyKPE3I olq6e0hgHn9zpFVFUhK90sGeohJuazv2mSooKMVReXHKmbKvU59dIeUQW9zW1sCbgKqX bpriCsaLsWHbxYNXApYnQWu6fIDX1HdH6IBPauNYDo+GzA1fRU1R6m4HZY2Aj16sKPFB Vb0qeuU9+a27408uRcxegLzXKj4DG9/1t1+qC31Kfh8Rlk9l1ct6yt61xQQGzoaK25q1 gy6W8/NEPAqqZrpi5O0ABP97o3aq03o1jJNg+R1MzNQJ1ltmwlgBtCzNkhXcbvJQiqtd BSlQ== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZyHtkZsEYa+0ootTEE7Q8sxq/7+jkDMFxfhrxs70ppw=; b=fPQhZ8k0Vg4JLRvAl9/tlh4ru5BxX2fpjgiVH6j1fvZvom+RQ2s3aExFkymGpW9FFn N+cVQ8H8ttcUS9BfQGHwOqQgj5Kgp2ErA2Cg/SL2xUCRHAD8WEITKckKkMiJVuFZkXhu 77GIBXmULbU8GIEBzS6xXMcMGrSkCwYFhgPSEte4h8rVOit1/BE5FsVOZZmXZyATNvjw zDbSmCO8tqibLxPEshr1pIJpQcl+coMKXiWi8Tjt7cBz95yH+h5kwxvk03PESNJjzZwt Lzr6nNj52f123rQFY5jDb4nHMSQHjUnihRpOK2PCG6hk5acAZNnKyw/Gc34VWkFt28/d QQvA== X-Gm-Message-State: AOAM531V/OJ/Ym14jBTBrdppODhwCfI8iyxHcMv4LU/xHMdEB2a4P/lX baupaZK4V57t3OI1dgTP62/PSU9le+4= X-Google-Smtp-Source: ABdhPJyTGm4IrT8AobKaRzwcNd4Ji21gj3aGS/NCQ1ywdxcg7mBnXFW4B0Z8CIF7vjuwoybj9EOhrw== X-Received: by 2002:a17:907:7848:: with SMTP id lb8mr5474521ejc.494.1633612117048; Thu, 07 Oct 2021 06:08:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/24] configure, meson: move libaio check to meson.build Date: Thu, 7 Oct 2021 15:08:20 +0200 Message-Id: <20211007130829.632254-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633612410225100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- 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 54b2afdb96..0be11e5e08 100644 --- a/meson.build +++ b/meson.build @@ -402,9 +402,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'), @@ -1429,6 +1434,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()) @@ -3291,7 +3297,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..c8568cf588 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(if_true: 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 Mon May 20 13:08:11 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 1633613183574834.3805290354999; Thu, 7 Oct 2021 06:26:23 -0700 (PDT) Received: from localhost ([::1]:43662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTPi-0001zy-Ii for importer@patchew.org; Thu, 07 Oct 2021 09:26:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0005UY-HG for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:38705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Z-0007nK-3I for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:43 -0400 Received: by mail-ed1-x52b.google.com with SMTP id dj4so22953070edb.5 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MWSGbwJ0q8s4flUFRXXK07L6Y49/dx9Mo1oHwdH0klU=; b=SDCu1G+YNkrV9qfDvh2SvQeYZORKoaScPVS72ndLfz8X2eOj3BKMDLULkIUsytTPwD ssXFzyvwweNthLVSj/5QRyBtNdFiZ1wtz6NU2si0zXv8Jjqa4TNc1ARZxhqPS1ScBhhH XASste0fq8oHxvIWFDW+8M1cfF7LMsPP5cR1FnbS2HAwCtYizpSxwIeNHTKp1q/nr50E ZbFukt5ULhJ/g0EJP2IjvLpD5kHoYJZOAM6ZO5ENrYaYSX8+ps7Krr8qPry8FedwlFUA /aENWWhUZjqAkx2S4Tl6eXZAgfZTJOjkb4/3BbGdpdgPKWHpKd0JcihR/cyxxorMDqb9 J3fA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MWSGbwJ0q8s4flUFRXXK07L6Y49/dx9Mo1oHwdH0klU=; b=aYgO5TqExKUpKn7GaUww/ieBAooJSZWCF9t9aT/oRSa6NcLY/ZDrMed0gE0YDnL1TM enqbpmmf1Q1Gx8EcyeDiEsbNBzyKkTdsN1qdSUUloOlTUCnz5yFI7BdBWW2MTxD6QX8C r3NzxzYA7Je0C1hszM68FQKns4sCI7GlnN49sP6w+EPpyE2N50V82pt641SzU/4KPEEC doAKMVYvcwKyU2YJDadqQAWTr0ewdkM6XK7YrguqEnjbiegKVM36FsZ78HWtytmJ6JOr 5D7LI/hMku0I4SGVPjAhqGUyK/Mkf8RTn4zOf8DCppFCX1u3KVqwEMNfwaq525SsJjRa 7LCA== X-Gm-Message-State: AOAM531fkb1F2kDA60HZR7yH2ddhPmyE+AK/mLVUPmnFzgGjImN2UGdl dZS2ufqmTlUzBDiWzVy+Y6fwaMorMvg= X-Google-Smtp-Source: ABdhPJx8NyyCnkVjoEdlVBna05npsYM+uGdqwhh7Yv9gY/Koa0FHS/LnFFWZN6ffpEYVtt0OpCUtGQ== X-Received: by 2002:a17:907:110b:: with SMTP id qu11mr5474444ejb.380.1633612117701; Thu, 07 Oct 2021 06:08:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/24] configure, meson: move vde detection to meson Date: Thu, 7 Oct 2021 15:08:21 +0200 Message-Id: <20211007130829.632254-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613184677100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 0be11e5e08..46d8798a19 100644 --- a/meson.build +++ b/meson.build @@ -502,9 +502,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 @@ -1443,6 +1462,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()) @@ -3295,7 +3315,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 Mon May 20 13:08:11 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 1633613388749484.1826188259432; Thu, 7 Oct 2021 06:29:48 -0700 (PDT) Received: from localhost ([::1]:54350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTT1-0000tp-LH for importer@patchew.org; Thu, 07 Oct 2021 09:29:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8h-0005Y6-Ek for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:47 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:43719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8f-0007sw-2F for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:47 -0400 Received: by mail-ed1-x533.google.com with SMTP id i20so7296396edj.10 for ; Thu, 07 Oct 2021 06:08:44 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iI1TIiF45rHbDcYZv8hqleNwzcRlTp0cVVa/X4HTjhE=; b=bWCxhOBDu7ChbDB+kIsHS+s4Kj8Jai6TiYwYK6Al9BBd9cE4Hkmgahxu7bad0AXpIO 2g08OfOOsGs9f2c6G0HZ1EMzQ4U9d5s9GhFQb+eudAohG+fhRtCn/qic2RAX4pbA8T1T Uwdc1AJwJDiE3l+qBtFbZj/qlGvP/Deiv0ybyG2EIVsFDGVjwMYIcFB+5xgzS9zYzG1X TpI6GDUO7kPLpGCakvTB+mugsnXT/DttQzv5zJS7nWgwJ0cxZefv7I4DYwgg+uk+QTzM UJtwPodCsA3mmABQnkWiauAmJZrgU9bApchF94k18Rfr8oqkWksH7h3AwMftlbABWYh+ gHiQ== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iI1TIiF45rHbDcYZv8hqleNwzcRlTp0cVVa/X4HTjhE=; b=hdMk9lswk9AlvKnyDsz5HQKGIUC/AUhpd9QoLK5k9HfcRPuwhJVnRsjnDt2NCxDS4i CwVwq9+lMgfzWDl0MxBO1/Mq//dkl7HHBYyfs8KN3LmoaOpSVHAbAUubM6xjKzsRvbww 5LV8M95gF6H7aYMprHcowfa5o7hLFysCeL4Gq4SN3wapuwtfbSO0c0kOpI9KbmDgdnJD Mtw/zgyaVm67TY7dXiK9XOvTCUK9e9vXNN/ALmLAr7ZkCtD7OCEoHg2HeCeYctHZKuXD boKa9qeBsUuHEBb/6sijGFpo3vvw6Q8AvDF6oGQZN3hgMwMRU8E46U52TsN9FxFfxsXC RRrQ== X-Gm-Message-State: AOAM530FOGD7EKmkuEbjCEhnvdLHPOXwSQ8Y6Xo/FyYPrYPI22L0l3fX wAH18LTwUxcg3VjoBObYko8av5PmuyA= X-Google-Smtp-Source: ABdhPJy+QyWnmVQo3i0P5gZExhoiCwGEquIa6xQG34b4clYHuU6BNqqw8GFNRPFtEVtPd0AYrA5V9A== X-Received: by 2002:a17:906:1755:: with SMTP id d21mr5647902eje.257.1633612118330; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 17/24] configure, meson: move netmap detection to meson Date: Thu, 7 Oct 2021 15:08:22 +0200 Message-Id: <20211007130829.632254-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613389813100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- 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 46d8798a19..96f87630f0 100644 --- a/meson.build +++ b/meson.build @@ -1659,6 +1659,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 targetos =3D=3D 'freebsd' + have_netmap =3D cc.compiles(''' + #include + #include + #include + #include + #if (NETMAP_API < 11) || (NETMAP_API > 15) + #error + #endif + int main(void) { return 0; }''') +endif +if not have_netmap and get_option('netmap').enabled() + error('Netmap headers not available') +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 @@ -3316,7 +3333,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 Mon May 20 13:08:11 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 163361335878970.31867537572009; Thu, 7 Oct 2021 06:29:18 -0700 (PDT) Received: from localhost ([::1]:51880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTSX-0007eV-LW for importer@patchew.org; Thu, 07 Oct 2021 09:29:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0005UX-C1 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:44577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8a-0007p0-G8 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:43 -0400 Received: by mail-ed1-x52a.google.com with SMTP id v18so22984916edc.11 for ; Thu, 07 Oct 2021 06:08:39 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:38 -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=RDAgDr0ZqKWLzUuXz4UUGwIjly2iH/mSexR4KG3vqcM=; b=pJhV3EzRMuRoBHL+ZUoyPXsQtfeLmawVqXLFtl59cQKGxSd4n9tewuMKssmo81DRkY Bk4E2hF+PNnTT7djjS8lCwcNWoxHzEVL2txf1i8AWHRnbnw7wcplJLdqVQrzjFg+XO+K VW22LpBRNLgYxPSE5YPK9zQFgQ5wyieekHDIVAjOClQxljHEA2xpC/V4EP3FC4paUHkp zaso+VaY4El07qvRiUsvZ8ANKv1/nblOUYz07NUWn9xnsPU1NVFCVH6xlpKbGG8A1klK zYaR8b2w2xHVrKAQcPFIvabWcE1LVtqWmne3JoW+dez5X6M+Om+XOtb6VdZ8y5uhY1Ez uJOg== 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=RDAgDr0ZqKWLzUuXz4UUGwIjly2iH/mSexR4KG3vqcM=; b=QzuAKhWbKTu6+/uGwfadPKcCwK8ZRiqO2dY7ctdxy4RWO5AmVqs6b/JKiy2SGVzxy8 zdmmrR83O4FGvltEqJkR08t/dMdXGeHzjwU0i0xgP2IvrdKvODZaO1SRVS58ppLX2rJu /NVBeccyqMzqF3FcyEyfmXX/2Xlijb1PhFcyPr36nXGYJ9EVmhUF9vsokARdg0d1KTjs e6bk5qnMdLYLJ9XTU8Il3VPqRS2D1rzSQpuEZ+7M0DbBCjRTkjbymCsxiGOI74v0+KFh Astg5MGwaSvCM7pMGT4JwjdroJFu8zeaSrU4kDpJgXHU3XCdY8uppH1X/D1p+D84VaPB pDWg== X-Gm-Message-State: AOAM532RGXmWo6W65GJl88Ucr2VIPKHIj4PeYSQuop5NJFNFZ8Kz1/lq TTNLyNAke+YypIfOOSFHNwnI/DiANHU= X-Google-Smtp-Source: ABdhPJz9gP2OELbYaIiKey9RvA1jMkYPsiPWJMebWZaBndzSBt1m3OU6OBk92b2Ge/Z9jO3mrrD9ZQ== X-Received: by 2002:a17:906:1e0c:: with SMTP id g12mr5517734ejj.155.1633612119004; Thu, 07 Oct 2021 06:08:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 18/24] configure, meson: move Spice configure handling to meson Date: Thu, 7 Oct 2021 15:08:23 +0200 Message-Id: <20211007130829.632254-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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: 1633613359906100001 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 --- 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 96f87630f0..0721309ed1 100644 --- a/meson.build +++ b/meson.build @@ -542,17 +542,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 @@ -1483,6 +1486,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(= ))) @@ -1764,7 +1769,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'] : []) + \ @@ -3342,8 +3347,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 Mon May 20 13:08:11 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 1633612767977242.68628221266727; Thu, 7 Oct 2021 06:19:27 -0700 (PDT) Received: from localhost ([::1]:54280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTJ0-0006UD-Nx for importer@patchew.org; Thu, 07 Oct 2021 09:19:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0005UU-BP for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:45949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8c-0007qp-31 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:43 -0400 Received: by mail-ed1-x52b.google.com with SMTP id r18so22919489edv.12 for ; Thu, 07 Oct 2021 06:08:41 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=POfZpzlorSjMdh5Eu10c3iImd8qfm8JcbJfxM0yg91Q=; b=Iy5VCKCENtAybPaDx6pfD083uKCmNgD4cp7ZV2pXVnZSB1519yfBY0Ukt7dPOIEO06 gyflrj73GP4n5oU/K3EyiU0F5TL+iMGXf7DFt9qSFLYCSNsXcU+Si/rrPt7LleBfuUra 375jgFr7/FzqI3job7ZLH7qN20NP7IXVomVmPVNv4103JRHZpQ30nq8Fo+TGY2ufMLzU 60yHX4OkFlx6+6tMtkAu6PUpCFC8dEdICjn9H/o+8oMvhIqLn50kXEpSIXxI/4FIMhAk 5URnHfRjQv2C1KvgTSjbxGaCvYMBOPlPUcRrmnmzd1u/gqVAqF4m3Ts8uDq2eyxHYyZO N5TQ== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=POfZpzlorSjMdh5Eu10c3iImd8qfm8JcbJfxM0yg91Q=; b=mcWIy//bfiQESvq8HjQNZAJQtwLvR/7iT7r36fl1KyDQe+dmYVktR9U64DFwMSGab/ ywiSTt6fEEUoBezabMfCAlr93LVLaEzWxUAFmNnr2Iu516DYucxBOd5CqH2upTA73oqA bv4l5fdNAyg2vUfrkp3EJ1Zfx6Q+xrOE2fN3GPV4lkXzZsqrLZFSuDF51psRAm42i6t5 1OdJyA7x8zEEtJaGlfrVSaz7+UdBxRktRYbLmv0N/32kc2BYe+E3p3YFohsAgJ1yH/UV xPmrBwJnvGaQs5ZEnyENTBzTX1ZEDGsaoPQGp//MiJ/oz1lGApcrHIsTUt8+wM2Rapku md6g== X-Gm-Message-State: AOAM533tLZnsteDz9H7dzVn4ObBXmlOZRV0paOLkSYF5qfV7N+as3/O1 H04HDOwuZWvL1hl35mOpyzAM8KeisCw= X-Google-Smtp-Source: ABdhPJzW2jA2wUIqAgAfD7uPef637l952xvloR1RKgGgT9mLvLW4o8zxI3XiGaul7/ce0yH33Gw9hg== X-Received: by 2002:a05:6402:5215:: with SMTP id s21mr996706edd.113.1633612119657; Thu, 07 Oct 2021 06:08:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 19/24] configure: remove obsolete Solaris ar check Date: Thu, 7 Oct 2021 15:08:24 +0200 Message-Id: <20211007130829.632254-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633612769089100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 Mon May 20 13:08:11 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 1633613049900523.8159878041054; Thu, 7 Oct 2021 06:24:09 -0700 (PDT) Received: from localhost ([::1]:37550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTNY-0006Fd-L8 for importer@patchew.org; Thu, 07 Oct 2021 09:24:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8e-0005Vo-Rz for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:45 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:45954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8c-0007rQ-Ib for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: by mail-ed1-x530.google.com with SMTP id r18so22919612edv.12 for ; Thu, 07 Oct 2021 06:08:42 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3dL/Z9cZ54or34GQZ9XPqAihe4EdFDjaleAhOGMjJew=; b=gjYIYXcEeavza/bSerczfA4P7p/ONzdm9l0o9P2P8spKZyMi9LqXbdntU6brB0H9+Y nCOe8YKBO2UYTw2O1T1AeYAmtSd75lL8mv43yq1TPHiboNa/01Ts7Wz0UqZiRXXxbK98 WZgbTYToX2m9bzkdO+xQIfTTmH7y81k5Da5o+s7XgLMgyMScRjt7uzi9I12lvTlnrF70 3fhT12dXgBRH3WYLWYM2nTsL3kATfV27ZCpHmU7w6jtM+0CllukAVRfzfBWm7lwUKbil 2PtqPfBjU3h9cC40cjEqyEHcC+J+XTJqdpuKLJof7dnmKnsSCsbZqqpPBA0AhFNBIC7D CkvA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3dL/Z9cZ54or34GQZ9XPqAihe4EdFDjaleAhOGMjJew=; b=XyO42kpUfEFyKhkg9H5GH5t43CDpVGFJLI1PHYxtDoeTRr6GgcoY5lmkqNO4YJ1wRM iq01vUXhKVmeNwx5Z2AOWPSa9VMbr2T3q9/sM0guBoa/taEoH3n20Qdzq9pEOJiIm2MS eCEzSADpwJvnjMJfGvU8XI7BaztKLaYN7VPLmduUrx6/cM0L7hlzMr2LR+h2840B5Nsa vpEDwDnKGlGK1hMU/KzYhI+jRYd70kWZuvBpKBBd/1YSY/XQoLFQ8lblfN0csD6p2Sja KT2m5erAlK8xuRMUyWj5ulDJEqw6gKzgnjLMKBV3BROlLcID58BqzmkrTewkBd7+BymO Jx1g== X-Gm-Message-State: AOAM531orNVZlCE6uouyuoTfti8eL0gH9/F1JVzbXzGHCPjDUJk10d6w L3r2RhcPRxHc51OcthZtDoNxHi1TMWU= X-Google-Smtp-Source: ABdhPJweChXRyFPkwJvDMEXryoaPPOjOp6d80/SBFuQCzffoatnImMb/d9sF1R3wSR8g4R7fi3TXMQ== X-Received: by 2002:a17:906:2294:: with SMTP id p20mr5869098eja.224.1633612120290; Thu, 07 Oct 2021 06:08:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 20/24] configure, meson: move more compiler checks to Meson Date: Thu, 7 Oct 2021 15:08:25 +0200 Message-Id: <20211007130829.632254-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::530; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613052240100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 91 ----------------------------------------------------- meson.build | 45 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 91 deletions(-) diff --git a/configure b/configure index 2091844ad6..33d330dcc9 100755 --- a/configure +++ b/configure @@ -3108,19 +3108,6 @@ elif test "$tpm" =3D "yes"; then fi fi =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 0721309ed1..f08f364c90 100644 --- a/meson.build +++ b/meson.build @@ -1552,6 +1552,8 @@ config_host_data.set('CONFIG_INOTIFY', cc.has_header_symbol('sys/inotify.h', 'inotify_init')) config_host_data.set('CONFIG_INOTIFY1', cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) +config_host_data.set('CONFIG_IOVEC', + cc.has_header_symbol('sys/uio.h', 'struct iovec')) config_host_data.set('CONFIG_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include @@ -1700,6 +1702,49 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.= compiles(''' return printf("%zu", SIZE_MAX); }''', args: ['-Werror'])) =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(''' + 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_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'] --=20 2.31.1 From nobody Mon May 20 13:08:11 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 163361309136430.43659006099631; Thu, 7 Oct 2021 06:24:51 -0700 (PDT) Received: from localhost ([::1]:39684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTOE-0007fv-6P for importer@patchew.org; Thu, 07 Oct 2021 09:24:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8i-0005Zx-Tl for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:49 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:36499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0007ru-UE for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:48 -0400 Received: by mail-ed1-x536.google.com with SMTP id l7so23151300edq.3 for ; Thu, 07 Oct 2021 06:08:43 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ftmT9YotYt0hCdHUhKteZfUtoPMXpqMbKG54IoOz+SQ=; b=n9vICwEhCyLrh3GYYIJkRogBpAII4/bmNaAq3N3jXVOB77tDSYgxH/oVyMMb3AMem/ ufpeb/l/dvP6DMTWcKPfSmMd8uDovEmjAyGqG2nbwxu4ebr+uyl0rXBGLqcGOc/4pq1Z dEUdbmQZMVruSulGW9oN9TL5v9ub+m2QKYWXIN1uQqlpt2qVBTsObFAORDAlFsbWDetr wo40JT0UfOfYAiBFrvx7po23/Mv7MajpXD97JvP9YG+khwQxi1HxUH+G138/MUZlOhdM uDCHPtoQr2g6bz4JLld5xEXkIEzrNyFKCyEamOneJVlkZ+eQOKeF+8kVSRsS5HaXE0tu /QVg== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ftmT9YotYt0hCdHUhKteZfUtoPMXpqMbKG54IoOz+SQ=; b=wg9n9JXvEmZDsQKHBKTbG52afc/pQyk/WlPMXF+mYGkwdras424ecyPw66auHJ6ygw czFrPqSP3Jb9iEWCHRQTu2mGRhlnjx+b5al/1i4AoV++GuUIrvcFOU+d/gZrxQir1YG9 xJXBjZRK35OMWMRDQKWZbNlGTuIgiVtdi+zUpf6x0NtD+egB9pJnq3cz/bgkaba+fQfm 8V9DntENoIAhML5dmHC4tQZbEDvZtCoah1YvBv5Jn0m9jP/2wjvboUIhmpIiTDuKx0LD +d8XtFbALwnV10EQeo753fYX1Jebg2xXVQH+coikAZdgMWuATFU8UUmLzuuClBn2eYRQ 6BSw== X-Gm-Message-State: AOAM532AtV/IG7hJhDuuiGs9gJS/Jq2i2hjG58zQrJvKaVbV2UUf2nNQ YVUg1glUEOFyUJP79yrb6UVLKUuyJo0= X-Google-Smtp-Source: ABdhPJwCpjY7HbWaxJLnLZoyu9dntJEkkWz0RdhkDR4idisKIrwmBv9jsWuZBSePO9HYYTGP7Jv1Fw== X-Received: by 2002:a50:d948:: with SMTP id u8mr6294280edj.306.1633612120961; Thu, 07 Oct 2021 06:08:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 21/24] configure: remove deprecated --{enable, disable}-git-update Date: Thu, 7 Oct 2021 15:08:26 +0200 Message-Id: <20211007130829.632254-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613091978100001 Content-Type: text/plain; charset="utf-8" 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 --- 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 Mon May 20 13:08:11 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 163361325628771.28770726385574; Thu, 7 Oct 2021 06:27:36 -0700 (PDT) Received: from localhost ([::1]:46102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTQt-0003jb-7G for importer@patchew.org; Thu, 07 Oct 2021 09:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8e-0005Vk-Ed for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:45 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:42548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0007rc-08 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: by mail-ed1-x532.google.com with SMTP id t16so1026487eds.9 for ; Thu, 07 Oct 2021 06:08:42 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MT5GrftFAuFEgPwZZwpW9ZA2E2bYpX/rHXx+os81sBY=; b=KG7ZwPFreUqOPiIpxV6fpW1eq8azgNuNyz8uhVhJFisOhCtBTblvj6sDocLiZA9NIl EfF3Z5YmP+KszwpGP7ggEVUZmOJhfDOwdyQbha3ZPLqBxBWNwiVDxg1VkV55gj1JypTD Uz8Tm0uAB21v+DC0jzPYyMxkymWmxFFnHdM2Uc5XNxsYd57IiHwJPj27fClNKkkEOJEb qg7/JS9Nd41o42xg2XhFlrzWwmfd7p4CowBisGb2kNNX/lIbvXpJBMv2WB9wELwk3a/I Jx+N9UMgCqxNPcHDL7KNDmhvCr/jhd+fDY57EkEE5VmyWLfx68X3mwcKiGCDglSwWJ4e dRFA== 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MT5GrftFAuFEgPwZZwpW9ZA2E2bYpX/rHXx+os81sBY=; b=ZGIGyzg+CopV3Et3L8uDqC7dcZiPOq1cZmkMWMaq/PkB+QcKDbs5G0iY9RLdSGqHg6 6tO4YJl3lwNxJqLmf8A6utkZM0p8iQrN+d5UXi4p4NANb7Kn9YtrLkmlqJo1qFwfWbrK rMD2/g3d+4EglmdRwFbgy/croLu37A0v4SWPxf32dFBKs/c+zeXQyGt9oOahq00rPcYy teS6o+z9fIXAtV7UP9CSAStBm11wvsGepDs5FlK7SAHhSStRGogLCwzjX8T9Ad/VfQQY JCbHOJjT3C8THsXO6324rhKkI/ISUBC9U2xTwDxzP6YF5UaG96ALTFq+BIDfZ0xagPht shtA== X-Gm-Message-State: AOAM530EgyIpAJL0Hp59lNDL/GvFDU1fqeVJf0Hi5EqiglSWlgJjqEk0 XqIQdRvayV03xAvQ83rdzFini2gNUkI= X-Google-Smtp-Source: ABdhPJwG/FoqCdHamMRab3fOMA3TAEWTd+EQt2l0u1EU8rmgkc6XHkmGX3nWSKjd13KTMia795/GyA== X-Received: by 2002:a17:907:76e1:: with SMTP id kg1mr5644341ejc.329.1633612121567; Thu, 07 Oct 2021 06:08:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 22/24] configure: accept "internal" for --enable-capstone/slirp/fdt Date: Thu, 7 Oct 2021 15:08:27 +0200 Message-Id: <20211007130829.632254-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: 1633613256575100003 Content-Type: text/plain; charset="utf-8" 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 --- 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 Mon May 20 13:08:11 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 163361325444256.25404083325918; Thu, 7 Oct 2021 06:27:34 -0700 (PDT) Received: from localhost ([::1]:45818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTQr-0003Wt-3d for importer@patchew.org; Thu, 07 Oct 2021 09:27:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8g-0005W5-0y for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:46 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:42551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0007ro-ON for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:45 -0400 Received: by mail-ed1-x535.google.com with SMTP id t16so1026618eds.9 for ; Thu, 07 Oct 2021 06:08:43 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:41 -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=wPfZt50AtHvhepq+XFRdcVCgu4skil/qNVKcLVAqJnk=; b=UtOMijWA3gAyhkoxwibMozOhSEV4MV4exk67f/CT/b5h5PsoHMoSVT+uQJkY9JvjC3 qbTNFSnMf+JsXxtO1IfxUBBzT1A0GRWder6EbnblcSPjh1gazHr5K1deRC1afIj+Zhbu WcxLyvXK9fM8qSFN0gjdvXdBHNKjk8F9WdNQ+8EKj5zUhNGZg3Uh/BAZFzw7zfzdtDR3 2hIxebpBe0x13qbCGoz8rDM34WyoxB6+TBv8bHW6Y2t2gDIyp+HK3r9S3rtNqNeLFJSi lzK8zXX3iI9QK3glzV20BWXeC/PzcPSYw+tMOkxXTRDw57/JKgxJHV0z3s+UYxbPuV+J DjJw== 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=wPfZt50AtHvhepq+XFRdcVCgu4skil/qNVKcLVAqJnk=; b=G9/xNDaaf5blIMq8cF3Y9WgxTTxVemO3OIk5nWudd+pKueLMDtneOv82qhSGBvPG6m js52gTi5G7bGj51L5pg/Ej4776d3nTySdQEkoEpVGUQiHRPuoeNgHozOOV4k8hQ8HEc6 nelH9CmVhZCg0IDHsxXoNBNJBuXqnPh5WZzDbJNrCHCds7h4r96LvUfwFrGYU1AmVOIj yCeA8h17Jn8b401yheWYTbP6IbyvYC+lsctx7FA+j/pKU2sNZ3yS8T4Kn5YekaXH3jaq nh7o9AWwWRIhBysUrslTufhN2Yr5emi5LBD3UDiI4qULE2NKAsd6FzHMC6V4wRndb7px URdw== X-Gm-Message-State: AOAM532nLLQm6lSKdnwg+EqsNGOo7TX6XiPYG4BSM8Tic+YRY2iEstiE H0nZUM5jM6rmeCeESauCYCRGOIxeblU= X-Google-Smtp-Source: ABdhPJwHsE5023GIrOEu8qzYSiqpbGuwJpspbyAh1v/uPCqAWbgNDLMh/t1W3kAcVRNI1zzQHFj5ZQ== X-Received: by 2002:a17:906:2a0d:: with SMTP id j13mr5271655eje.545.1633612122314; Thu, 07 Oct 2021 06:08:42 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 23/24] configure: prepare for auto-generated option parsing Date: Thu, 7 Oct 2021 15:08:28 +0200 Message-Id: <20211007130829.632254-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth 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: 1633613256180100001 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 --- Makefile | 8 ++++- configure | 31 ++++++++++++----- scripts/meson-buildoptions.py | 63 +++++++++++++++++++++++++++++++++++ scripts/meson-buildoptions.sh | 12 +++++++ 4 files changed, 104 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..8948c296b7 --- /dev/null +++ b/scripts/meson-buildoptions.py @@ -0,0 +1,63 @@ +#! /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_help(options) +print_parse(options) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh new file mode 100644 index 0000000000..3be3058a6c --- /dev/null +++ b/scripts/meson-buildoptions.sh @@ -0,0 +1,12 @@ +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 Mon May 20 13:08:11 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 1633613302642477.7427442279993; Thu, 7 Oct 2021 06:28:22 -0700 (PDT) Received: from localhost ([::1]:48428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTRd-0005Jo-FB for importer@patchew.org; Thu, 07 Oct 2021 09:28:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8j-0005a0-Nk for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:49 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:40714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8f-0007t8-QI for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:49 -0400 Received: by mail-ed1-x536.google.com with SMTP id g8so22885149edt.7 for ; Thu, 07 Oct 2021 06:08:44 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:42 -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=mAYscW6Byxh0q4e+0YPVa28FuHoGLIKYuf3uQery1vk=; b=O1NL8t19Sag6Vjdfyuf9dFJ45XrK2y0o/Jmqd6i01c+LH3o/Gh4dphgiHi9ScvCj7u 84hxl+RLR+vvdyihRiB2E2zG13Pb8sauGd86CUg/9n5Fg47jSZT7I4tDOmkmeFbX6nqC QYOpXmVqYV/fJaZm3DG1AXPwo3gFX7mbLq96qiNDWPUa7YDLa+3zmGg+2w1rcgSr+AM9 lnn1a0qYRL9j+xWB6WabdPmyvn9TsBIGy5c4e0E2O7ZC9WqLA3WWcjgO+0LoN99KZeiI oXW9ijLjqnjNiOeeeoCXgxYYa05rQAi1P+Pe1i9urr1Yt54EFq6NNmK9mrHon5UtPb/E C+Jg== 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=mAYscW6Byxh0q4e+0YPVa28FuHoGLIKYuf3uQery1vk=; b=5PN1bxTku9FkDpkQj0FnVS6xITwnGfKR0m6dVrRuykaFi/8tWnbptM3NE5h35Vpkr1 LijqswdzwG5OSwga8laJo4MN2eLm7QSiQxGp8U+pcUVubB8fQs4rQU3hhCRg2azi/CuD IJhcpgBJ1F2ZG0I8nv8upcBevJurFT/8MsWwZWJ+wfJhgdUBYp2IjJ0z/OYsf0CU4FH7 U+Lzv9W1gGgThSk1JCLercCEmJmuYfTvXORplMT73jQd7pKfpxmbU9vulWect4sy/3Zo PcAJWnQXr/kLD+KaNV9z7CVuSC24lST4Z5O4svvzWJLM2zZ+9rNmQfU/vUuIFLBEGT9X uedA== X-Gm-Message-State: AOAM530UxLbWxcVhT1dPoNUXFqX02qe7ejLbIcLAdJ0RCeHYS0sOduT8 w3NrlLqMJav8LwE/q+jH8kqfBT8eL5Q= X-Google-Smtp-Source: ABdhPJwNfGf3CwZgsSFRyp1RstDBCpeodTcpntb/CH3ZyUqSdZ3tqHt+QhNqXmhs3MGodDlI6Fgnuw== X-Received: by 2002:a17:906:5e01:: with SMTP id n1mr5724838eju.385.1633612123329; Thu, 07 Oct 2021 06:08:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 24/24] configure: automatically parse command line for meson -D options Date: Thu, 7 Oct 2021 15:08:29 +0200 Message-Id: <20211007130829.632254-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth 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: 1633613304525100001 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 --- configure | 540 ++-------------------------------- docs/devel/build-system.rst | 133 +++++---- meson_options.txt | 8 + scripts/meson-buildoptions.py | 92 ++++++ scripts/meson-buildoptions.sh | 256 ++++++++++++++++ 5 files changed, 449 insertions(+), 580 deletions(-) diff --git a/configure b/configure index d979476e03..4e1dfbea14 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 @@ -1714,9 +1341,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 +1417,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 +1441,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 +1451,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 +1483,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 +2708,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 +4038,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..b79012b965 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,61 @@ 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 +For the configure script to parse the new option, the ``meson-buildoptions= .json`` +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 8948c296b7..9132e86efb 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): + length =3D LINE_WIDTH - indent + if len(left) >=3D indent: + yield left + yield from wrap("", text, indent) + else: + spaces =3D " " * indent + left =3D (left + spaces)[0:indent] + yield from textwrap.wrap( + text, width=3DLINE_WIDTH, initial_indent=3Dleft, subsequent_in= dent=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 3be3058a6c..b81e99644f 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,12 +1,268 @@ 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