From nobody Tue Nov 18 09:02:49 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1608568137; cv=none; d=zohomail.com; s=zohoarc; b=esuzSFdgJZifGyHxkDi/iTHrwhoXu1E81+TpOLNeqirWTI4lyF15TG1X/9d7DnRCQMy8NKpaa9SfybZ8okIh6QocMYMOko8zKbecDOu1pDgm/7rZbjyXqPzoIg9O6+o6JFEky2ZacBoRoNamoHDZ7HDoASEtqLu8leUJV4e8BRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608568137; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=IiRsU79hm404wlpKYyFgcmQFF2VxNVBNcL/Swwd7C/ptVgcSuQ+q/woik8LvmkfnSJYYgeRxmSSACcCuLNgiFpCjmCO5bHouHgVHoX3rizBOY6cOGl8EGF8DEhca3qQcZzK9lK154ull37tEskyoXgnK67/Cex0Cpg7X4mphCSA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160856813758170.49364637749966; Mon, 21 Dec 2020 08:28:57 -0800 (PST) Received: from localhost ([::1]:60902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMYQ-0005PP-EH for importer@patchew.org; Mon, 21 Dec 2020 09:52:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQi-0004iK-0e for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:56 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:42785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQf-0007ct-4y for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:54 -0500 Received: by mail-wr1-x429.google.com with SMTP id m5so11277937wrx.9 for ; Mon, 21 Dec 2020 06:44:52 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=sn20pyxPSZu4hBjOh/AYbZrRSZe0VJRFxd/MWd9Y1XBQSAj8YPOUOxIm4oW/eWwuxC iHW5FCbwQtom0TUhenpM1LMKL6FJR9isCdFkOSZHqJc2/K+/OApifRfTo6Tv8x61T3U3 6b4X/FT4UZK+AoHkWXPwc0m995n3c+ZBTAUXz5vM+8wV+g9kvrMG6gMHBjwP9PbJ3V8r ygXH3K+Pp1fsvgsFwVUC4Cka7ODDxV0WuVn6sL46SPuTT4aFI0zlkrTERQ2KgTWRQ4gD fW+S7uefKove0dDgPwt5PkI/LEz8Ige+TfIOUSQ88cHLeindXXoIpUHMuKGuORUQXwXk ZZZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=GkkL/SJpp61WHHGCbGQZkY/k3nDupO8+5/mjOuMlX6bznJmyuXF2UCh/OCWdklSARM ZUqMTKAA2zMqAsvvSjf7ya/aR5AuZOGcHvDoCCCDIidovQ+tm3UVjJmOr5M3nAmOHErH mSqptKi7F7xoj4YseedXQstawB1uFuR96XqEt2MiNuJEYHDEEwiaKpMaR+bt8SQCP/EZ SQYhXxJPGKWE+Vbd3oR8H57LWqBMLxCs5vUtQQeH1y9nHbV+ZZjcjAuRC7+ZxG0Vn2FG APG2LQy606N527rgL9UJ0T0NERs1MfOg0Jfq3XOrRJorrEwL752gvEbfqJ/pCXTNnNmQ 5sdA== X-Gm-Message-State: AOAM532S3ubQX0acU9kj1M9Gysz5DN0S/srZB7dK2cOG/nF8P0D0F+Z9 0GnQi09Mw+nAwmo8f/1OW9y1b+CeCUs= X-Google-Smtp-Source: ABdhPJx+6F406V0zzTNKGXS82Dw7k7eVOR/Cw4avUjyrgHci9K0DZCe9bnxiPVVEgx99A4nwaTxCrA== X-Received: by 2002:adf:c64f:: with SMTP id u15mr17132921wrg.270.1608561891800; Mon, 21 Dec 2020 06:44:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/55] configure: add --without-default-features Date: Mon, 21 Dec 2020 15:43:55 +0100 Message-Id: <20201221144447.26161-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-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::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alex Benn=C3=A9e 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. On it's own I go from: $ ls -lh qemu-system-aarch64 -rwxr-xr-x 1 alex alex 120M Dec 10 12:45 qemu-system-aarch64* $ ldd qemu-system-aarch64 | wc -l 170 to: $ ls -lh qemu-aarch64 -rwxr-xr-x 1 alex alex 43M Dec 10 12:41 qemu-aarch64* $ ldd qemu-system-aarch64 | wc -l 57 which is still able to run my default Debian ARM64 machine with a lot less fat involved. Signed-off-by: Alex Benn=C3=A9e Acked-by: Thomas Huth Acked-by: Paolo Bonzini Message-Id: <20201210190417.31673-5-alex.bennee@linaro.org> --- configure | 155 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 85 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 134f5de5ab..a5ee2d2a06 100755 --- a/configure +++ b/configure @@ -293,8 +293,19 @@ unset target_list_exclude # 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. =20 -brlapi=3D"" -curl=3D"" +default_feature=3D"" +# 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" + ;; + esac +done + +brlapi=3D"$default_feature" +curl=3D"$default_feature" iconv=3D"auto" curses=3D"auto" docs=3D"auto" @@ -303,52 +314,52 @@ 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" @@ -370,81 +381,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_feature:-yes} +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_feature:-yes} +bochs=3D${default_feature:-yes} +cloop=3D${default_feature:-yes} +dmg=3D${default_feature:-yes} +qcow1=3D${default_feature:-yes} +vdi=3D${default_feature:-yes} +vvfat=3D${default_feature:-yes} +qed=3D${default_feature:-yes} +parallels=3D${default_feature:-yes} 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 @@ -455,7 +466,7 @@ fuse_lseek=3D"auto" 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 @@ -798,7 +809,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_feature:-yes} ;; esac =20 @@ -942,6 +953,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" @@ -1747,7 +1760,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 @@ -6957,6 +6971,7 @@ NINJA=3D$ninja $meson setup \ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek \ + $(if test "$default_features" =3D no; then echo "-Dauto_features= =3Ddisabled"; fi) \ $cross_arg \ "$PWD" "$source_path" =20 --=20 2.29.2