aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-04-20 17:33:46 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-28 08:52:22 +0200
commit2cb2f5804c26a767f29eb032aebf9d063d9f0ced (patch)
treef51569252613e68cd88ccf250598c0f3c95a6d2b
parent215b00a542ee46504c32f53be92f6ed168f15926 (diff)
downloadqemu-2cb2f5804c26a767f29eb032aebf9d063d9f0ced.zip
qemu-2cb2f5804c26a767f29eb032aebf9d063d9f0ced.tar.gz
qemu-2cb2f5804c26a767f29eb032aebf9d063d9f0ced.tar.bz2
meson, configure: move --enable-module-upgrades to meson
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xconfigure14
-rw-r--r--meson.build7
-rw-r--r--meson_options.txt2
-rw-r--r--scripts/meson-buildoptions.sh4
4 files changed, 12 insertions, 15 deletions
diff --git a/configure b/configure
index 1fb70bf..59c43be 100755
--- a/configure
+++ b/configure
@@ -310,7 +310,6 @@ fortify_source="yes"
gcov="no"
EXESUF=""
modules="no"
-module_upgrades="no"
prefix="/usr/local"
qemu_suffix="qemu"
softmmu="yes"
@@ -762,10 +761,6 @@ for opt do
--disable-modules)
modules="no"
;;
- --disable-module-upgrades) module_upgrades="no"
- ;;
- --enable-module-upgrades) module_upgrades="yes"
- ;;
--cpu=*)
;;
--target-list=*) target_list="$optarg"
@@ -1218,7 +1213,6 @@ cat << EOF
bsd-user all BSD usermode emulation targets
pie Position Independent Executables
modules modules support (non-Windows)
- module-upgrades try to load modules from alternate paths for upgrades
debug-tcg TCG debugging (default is disabled)
debug-info debugging information
lto Enable Link-Time Optimization.
@@ -1487,11 +1481,6 @@ if test "$modules" = "yes" && test "$mingw32" = "yes" ; then
error_exit "Modules are not available for Windows"
fi
-# module_upgrades is only reasonable if modules are enabled
-if test "$modules" = "no" && test "$module_upgrades" = "yes" ; then
- error_exit "Can't enable module-upgrades as Modules are not enabled"
-fi
-
# Static linking is not possible with plugins, modules or PIE
if test "$static" = "yes" ; then
if test "$modules" = "yes" ; then
@@ -2563,9 +2552,6 @@ if test "$modules" = "yes"; then
echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak
echo "CONFIG_MODULES=y" >> $config_host_mak
fi
-if test "$module_upgrades" = "yes"; then
- echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
-fi
echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
if test "$xen" = "enabled" ; then
diff --git a/meson.build b/meson.build
index ab1ac9b..1fe7d25 100644
--- a/meson.build
+++ b/meson.build
@@ -1550,6 +1550,11 @@ endif
config_host_data.set('HOST_' + host_arch.to_upper(), 1)
+if get_option('module_upgrades') and not enable_modules
+ error('Cannot enable module-upgrades as modules are not enabled')
+endif
+config_host_data.set('CONFIG_MODULE_UPGRADES', get_option('module_upgrades'))
+
config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
@@ -3576,7 +3581,7 @@ summary_info += {'block layer': have_block}
summary_info += {'Install blobs': get_option('install_blobs')}
summary_info += {'module support': config_host.has_key('CONFIG_MODULES')}
if config_host.has_key('CONFIG_MODULES')
- summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')}
+ summary_info += {'alternative module path': get_option('module_upgrades')}
endif
summary_info += {'fuzzing support': get_option('fuzzing')}
if have_system
diff --git a/meson_options.txt b/meson_options.txt
index 65f7010..af432a4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -34,6 +34,8 @@ option('fuzzing', type : 'boolean', value: false,
description: 'build fuzzing targets')
option('gettext', type : 'feature', value : 'auto',
description: 'Localization of the GTK+ user interface')
+option('module_upgrades', type : 'boolean', value : false,
+ description: 'try to load modules from alternate paths for upgrades')
option('install_blobs', type : 'boolean', value : true,
description: 'install provided firmware blobs')
option('sparse', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index ee80f01..21366b2 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -19,6 +19,8 @@ meson_options_help() {
printf "%s\n" ' --disable-install-blobs install provided firmware blobs'
printf "%s\n" ' --enable-malloc=CHOICE choose memory allocator to use [system] (choices:'
printf "%s\n" ' jemalloc/system/tcmalloc)'
+ printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
+ printf "%s\n" ' upgrades'
printf "%s\n" ' --enable-profiler profiler support'
printf "%s\n" ' --enable-qom-cast-debug cast debugging support'
printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and'
@@ -268,6 +270,8 @@ _meson_option_parse() {
--disable-malloc-trim) printf "%s" -Dmalloc_trim=disabled ;;
--enable-membarrier) printf "%s" -Dmembarrier=enabled ;;
--disable-membarrier) printf "%s" -Dmembarrier=disabled ;;
+ --enable-module-upgrades) printf "%s" -Dmodule_upgrades=true ;;
+ --disable-module-upgrades) printf "%s" -Dmodule_upgrades=false ;;
--enable-mpath) printf "%s" -Dmpath=enabled ;;
--disable-mpath) printf "%s" -Dmpath=disabled ;;
--enable-multiprocess) printf "%s" -Dmultiprocess=enabled ;;