From nobody Mon Nov 17 23:49:53 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1606924396; cv=none; d=zohomail.com; s=zohoarc; b=EqpRO76riiu0jGkpENHxSr54HRqRDHhr+U2MGOi4mpUvoCcqOXZ5AUghkQIGs7/LYKzJs8edhbqAWsvKimZBl9t4kjD5mqOPVEzvlqIgMru3TG+UDfFEHD78KGvCVdhUXYEOOZ/JcTs5vn1PMakfGsDNAmJElPKJC/prNiQorGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606924396; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=3bVP23Fe7KdWHe37gUTAZ1T2seLh9HbpKjQASLFxBTo=; b=bxzrGeNkrKj3vDiIPJH/HhXh4qVTZaeCoWB8mYxH3JjuU980iwrvAherw0LDstpvV8/+CvsXI15VN8HdZpz9DQF+ekLjvfb0vT2naDsjcsGYU21CuC4qeFKXc7JVm3LJjzQaDP6o4C14ZGGw2pqdVFVnf68/2lWcIVC9gvMTGz0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1606924396345132.1004613114161; Wed, 2 Dec 2020 07:53:16 -0800 (PST) Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkUED-0004mt-5Z for importer@patchew.org; Wed, 02 Dec 2020 10:39:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkUDK-0004ME-Lv for qemu-devel@nongnu.org; Wed, 02 Dec 2020 10:38:42 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:52133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkUDI-0005dx-Lc for qemu-devel@nongnu.org; Wed, 02 Dec 2020 10:38:42 -0500 Received: by mail-wm1-x342.google.com with SMTP id v14so8437781wml.1 for ; Wed, 02 Dec 2020 07:38:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c190sm2604311wme.19.2020.12.02.07.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 07:38:37 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6A36F1FF7E; Wed, 2 Dec 2020 15:38:36 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3bVP23Fe7KdWHe37gUTAZ1T2seLh9HbpKjQASLFxBTo=; b=OT7LNm8pfSyHkg5Gn4+gl5m7WZevPxsuMi4xR31NJ5vga3MxZZDqjEmN1yKyLiFEBL nhJnSe9T5OeOkz5LZniXeNcIcqmPrsw5R9dVr0i2vnYIaC0GzCxXESNZoDIZWudKQvfO fQasj+cC6e9T1bb8JD7ktsqBhVMNjc/J3fxFeiX3DL1gWcQTMYI8/UW1FyYQ2oXgwoqP SB90NxnrxNIpZioWXg9P9kMbcTr/IiW1HgDZMvDgC+S0Fwz5tmSjpcf3W2nyLHij6LUY bJ5t5qGpxk8DVngvIRhAxhbWQGFIP12TAh+N/kT2zJjBoYL1u8u45BmpAeGCA5DUbT4g I56Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3bVP23Fe7KdWHe37gUTAZ1T2seLh9HbpKjQASLFxBTo=; b=BkPUSama9+QBRXMTmI2TIvSpLa22zNfnqbg1WIeawLz+Xm88GXrsxDcc6nPPd4s/SG T9yZ53HSM1rLmBmnrrE7R8sosl7CPZNFlN1jJj4oENmuzh7om2ZoCTEFsDf6HAdkJPN5 7QTnYtrjwDKS5Scvd5B4kiy2LHPohZdO2MLMJwGsfQpatYgBSjpf/WyDoBI+TwTJNAhK 9ldGIZCfi7jiCmxfQum/WPKdLyqwbyjZsGUgtjLFT1TDIqACojwrJBucH69lkuLdB9NS HG+s4QQbSDBYqyZoh5n6gtiqV3vtPt7C7a9f40px/EU6C2NiOTX9AE8Th6VxjR+BQ+/C mxQg== X-Gm-Message-State: AOAM5312Sq67cQ/Nz/YUdiBZgt5A3o+TnKFwiQNNDpVO6hgRCP+mzpCu 7h/UH/LAVT2qaFSx9NCFbFYrBQ== X-Google-Smtp-Source: ABdhPJy3gE2ISmv01osXj4gJcSSZBOT11G0v2rT10ArSkjbr6KN8M45J1nKytSHdp9+Wz1DbgneOGQ== X-Received: by 2002:a1c:b104:: with SMTP id a4mr3704455wmf.138.1606923518877; Wed, 02 Dec 2020 07:38:38 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [RFC PATCH] configure: add --without-default-features Date: Wed, 2 Dec 2020 15:38:27 +0000 Message-Id: <20201202153827.17446-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 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::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) By default QEMU enables a lot of features if it can probe and find the support libraries. It also enables a bunch of features by default. This patch adds the ability to build --without-default-features which can be paired with a --without-default-devices for a barely functional build. The main use case for this is testing our build assumptions and for minimising the amount of stuff you build if you just want to test a particular feature on your relatively slow emulated test system. Signed-off-by: Alex Benn=C3=A9e --- configure | 161 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 72 deletions(-) diff --git a/configure b/configure index 18c26e0389..23fa6f9421 100755 --- a/configure +++ b/configure @@ -291,10 +291,24 @@ unset target_list_exclude # # Always add --enable-foo and --disable-foo command line args. # Distributions want to ensure that several features are compiled in, and = it -# is impossible without a --enable-foo that exits if a feature is not foun= d. +# is impossible without a --enable-foo that exits if a feature is not +# found. =20 -brlapi=3D"" -curl=3D"" +default_feature=3D"" +default_yes_feature=3D"yes" +# parse CC options second +for opt do + optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') + case "$opt" in + --without-default-features) + default_feature=3D"no" + default_yes_feature=3D"no" + ;; + esac +done + +brlapi=3D"$default_feature" +curl=3D"$default_feature" iconv=3D"auto" curses=3D"auto" docs=3D"auto" @@ -303,59 +317,59 @@ netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" virtiofsd=3D"auto" -virtfs=3D"" +virtfs=3D"$default_feature" libudev=3D"auto" mpath=3D"auto" vnc=3D"enabled" sparse=3D"auto" -vde=3D"" +vde=3D"$default_feature" vnc_sasl=3D"auto" vnc_jpeg=3D"auto" vnc_png=3D"auto" xkbcommon=3D"auto" -xen=3D"" -xen_ctrl_version=3D"" +xen=3D"$default_feature" +xen_ctrl_version=3D"$default_feature" xen_pci_passthrough=3D"auto" -linux_aio=3D"" -linux_io_uring=3D"" -cap_ng=3D"" -attr=3D"" -libattr=3D"" -xfs=3D"" +linux_aio=3D"$default_feature" +linux_io_uring=3D"$default_feature" +cap_ng=3D"$default_feature" +attr=3D"$default_feature" +libattr=3D"$default_feature" +xfs=3D"$default_feature" tcg=3D"enabled" -membarrier=3D"" -vhost_net=3D"" -vhost_crypto=3D"" -vhost_scsi=3D"" -vhost_vsock=3D"" +membarrier=3D"$default_feature" +vhost_net=3D"$default_feature" +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"" +vhost_user_fs=3D"$default_feature" kvm=3D"auto" hax=3D"auto" hvf=3D"auto" whpx=3D"auto" -rdma=3D"" -pvrdma=3D"" +rdma=3D"$default_feature" +pvrdma=3D"$default_feature" gprof=3D"no" debug_tcg=3D"no" debug=3D"no" sanitizers=3D"no" tsan=3D"no" -fortify_source=3D"" +fortify_source=3D"$default_feature" strip_opt=3D"yes" tcg_interpreter=3D"no" bigendian=3D"no" mingw32=3D"no" gcov=3D"no" -EXESUF=3D"" +EXESUF=3D"$default_feature" HOST_DSOSUF=3D".so" modules=3D"no" module_upgrades=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" slirp=3D"auto" -oss_lib=3D"" +oss_lib=3D"$default_feature" bsd=3D"no" linux=3D"no" solaris=3D"no" @@ -370,81 +384,81 @@ pie=3D"" qom_cast_debug=3D"yes" trace_backends=3D"log" trace_file=3D"trace" -spice=3D"" -rbd=3D"" -smartcard=3D"" +spice=3D"$default_feature" +rbd=3D"$default_feature" +smartcard=3D"$default_feature" u2f=3D"auto" -libusb=3D"" -usb_redir=3D"" -opengl=3D"" +libusb=3D"$default_feature" +usb_redir=3D"$default_feature" +opengl=3D"$default_feature" opengl_dmabuf=3D"no" cpuid_h=3D"no" -avx2_opt=3D"" +avx2_opt=3D"$default_feature" capstone=3D"auto" -lzo=3D"" -snappy=3D"" -bzip2=3D"" -lzfse=3D"" -zstd=3D"" -guest_agent=3D"" +lzo=3D"$default_feature" +snappy=3D"$default_feature" +bzip2=3D"$default_feature" +lzfse=3D"$default_feature" +zstd=3D"$default_feature" +guest_agent=3D"$default_feature" guest_agent_with_vss=3D"no" guest_agent_ntddscsi=3D"no" -guest_agent_msi=3D"" -vss_win32_sdk=3D"" +guest_agent_msi=3D"$default_feature" +vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" -want_tools=3D"" -libiscsi=3D"" -libnfs=3D"" +want_tools=3D"$default_feature" +libiscsi=3D"$default_feature" +libnfs=3D"$default_feature" coroutine=3D"" -coroutine_pool=3D"" +coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" crypto_afalg=3D"no" -seccomp=3D"" -glusterfs=3D"" +seccomp=3D"$default_feature" +glusterfs=3D"$default_feature" glusterfs_xlator_opt=3D"no" glusterfs_discard=3D"no" glusterfs_fallocate=3D"no" glusterfs_zerofill=3D"no" glusterfs_ftruncate_has_stat=3D"no" glusterfs_iocb_has_stat=3D"no" -gtk=3D"" +gtk=3D"$default_feature" gtk_gl=3D"no" tls_priority=3D"NORMAL" -gnutls=3D"" -nettle=3D"" +gnutls=3D"$default_feature" +nettle=3D"$default_feature" nettle_xts=3D"no" -gcrypt=3D"" +gcrypt=3D"$default_feature" gcrypt_hmac=3D"no" gcrypt_xts=3D"no" qemu_private_xts=3D"yes" -auth_pam=3D"" -vte=3D"" -virglrenderer=3D"" -tpm=3D"" -libssh=3D"" -live_block_migration=3D"yes" -numa=3D"" +auth_pam=3D"$default_feature" +vte=3D"$default_feature" +virglrenderer=3D"$default_feature" +tpm=3D"$default_feature" +libssh=3D"$default_feature" +live_block_migration=3D"$default_yes_feature" +numa=3D"$default_feature" tcmalloc=3D"no" jemalloc=3D"no" -replication=3D"yes" -bochs=3D"yes" -cloop=3D"yes" -dmg=3D"yes" -qcow1=3D"yes" -vdi=3D"yes" -vvfat=3D"yes" -qed=3D"yes" -parallels=3D"yes" +replication=3D"$default_yes_feature" +bochs=3D"$default_yes_feature" +cloop=3D"$default_yes_feature" +dmg=3D"$default_yes_feature" +qcow1=3D"$default_yes_feature" +vdi=3D"$default_yes_feature" +vvfat=3D"$default_yes_feature" +qed=3D"$default_yes_feature" +parallels=3D"$default_yes_feature" sheepdog=3D"no" -libxml2=3D"" +libxml2=3D"$default_feature" debug_mutex=3D"no" -libpmem=3D"" +libpmem=3D"$default_feature" default_devices=3D"yes" plugins=3D"no" fuzzing=3D"no" rng_none=3D"no" -secret_keyring=3D"" -libdaxctl=3D"" +secret_keyring=3D"$default_feature" +libdaxctl=3D"$default_feature" meson=3D"" ninja=3D"" skip_meson=3Dno @@ -453,7 +467,7 @@ gettext=3D"" bogus_os=3D"no" malloc_trim=3D"auto" =20 -# parse CC options first +# parse CC options second for opt do optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') case "$opt" in @@ -796,7 +810,7 @@ Linux) audio_possible_drivers=3D"oss alsa sdl pa" linux=3D"yes" linux_user=3D"yes" - vhost_user=3D"yes" + vhost_user=3D"$default_yes_feature" ;; esac =20 @@ -940,6 +954,8 @@ for opt do ;; --without-default-devices) default_devices=3D"no" ;; + --without-default-features) # processed above + ;; --enable-gprof) gprof=3D"yes" ;; --enable-gcov) gcov=3D"yes" @@ -1737,7 +1753,8 @@ Advanced options (experts only): --gdb=3DGDB-path gdb to use for gdbstub tests [$gdb_bin] =20 Optional features, enabled with --enable-FEATURE and -disabled with --disable-FEATURE, default is enabled if available: +disabled with --disable-FEATURE, default is enabled if available +(unless built with --without-default-features): =20 system all system emulation targets user supported user emulation targets --=20 2.20.1