diff options
-rw-r--r-- | .gitmodules | 8 | ||||
-rwxr-xr-x | configure | 29 | ||||
-rw-r--r-- | hw/virtio/virtio-qmp.c | 11 | ||||
-rw-r--r-- | meson.build | 54 | ||||
-rwxr-xr-x | scripts/archive-source.sh | 2 | ||||
m--------- | subprojects/dtc (renamed from dtc) | 0 | ||||
m--------- | subprojects/keycodemapdb (renamed from ui/keycodemapdb) | 0 | ||||
-rw-r--r-- | subprojects/slirp.wrap | 2 | ||||
-rw-r--r-- | tests/Makefile.include | 8 | ||||
-rw-r--r-- | tests/docker/Makefile.include | 2 | ||||
-rw-r--r-- | tests/migration/meson.build | 4 | ||||
-rw-r--r-- | tests/vm/Makefile.include | 7 | ||||
-rw-r--r-- | ui/meson.build | 8 |
13 files changed, 50 insertions, 85 deletions
diff --git a/.gitmodules b/.gitmodules index 2a3a12033c..f8b2ddf387 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,8 +13,8 @@ [submodule "roms/qemu-palcode"] path = roms/qemu-palcode url = https://gitlab.com/qemu-project/qemu-palcode.git -[submodule "dtc"] - path = dtc +[submodule "subprojects/dtc"] + path = subprojects/dtc url = https://gitlab.com/qemu-project/dtc.git [submodule "roms/u-boot"] path = roms/u-boot @@ -25,8 +25,8 @@ [submodule "roms/QemuMacDrivers"] path = roms/QemuMacDrivers url = https://gitlab.com/qemu-project/QemuMacDrivers.git -[submodule "ui/keycodemapdb"] - path = ui/keycodemapdb +[submodule "subprojects/keycodemapdb"] + path = subprojects/keycodemapdb url = https://gitlab.com/qemu-project/keycodemapdb.git [submodule "roms/seabios-hppa"] path = roms/seabios-hppa @@ -4,9 +4,8 @@ # # Unset some variables known to interfere with behavior of common tools, -# just as autoconf does. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS +# just as autoconf does. Unlike autoconf, we assume that unset exists. +unset CLICOLOR_FORCE GREP_OPTIONS BASH_ENV ENV MAIL MAILPATH CDPATH # Don't allow CCACHE, if present, to use cached results of compile tests! export CCACHE_RECACHE=yes @@ -254,7 +253,7 @@ else git_submodules_action="ignore" fi -git_submodules="ui/keycodemapdb" +git_submodules="subprojects/keycodemapdb" git="git" debug_tcg="no" docs="auto" @@ -401,20 +400,16 @@ gnu/kfreebsd) ;; freebsd) bsd="yes" - make="${MAKE-gmake}" # needed for kinfo_getvmmap(3) in libutil.h ;; dragonfly) bsd="yes" - make="${MAKE-gmake}" ;; netbsd) bsd="yes" - make="${MAKE-gmake}" ;; openbsd) bsd="yes" - make="${MAKE-gmake}" ;; darwin) bsd="yes" @@ -422,7 +417,6 @@ darwin) ;; sunos) solaris="yes" - make="${MAKE-gmake}" ;; haiku) pie="no" @@ -526,9 +520,6 @@ case "$cpu" in CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;; esac -: ${make=${MAKE-make}} - - check_py_version() { # We require python >= 3.7. # NB: a True python conditional creates a non-zero return code (Failure) @@ -631,7 +622,7 @@ for opt do ;; --objcc=*) ;; - --make=*) make="$optarg" + --make=*) ;; --install=*) ;; @@ -806,7 +797,7 @@ case $git_submodules_action in fi ;; ignore) - if ! test -f "$source_path/ui/keycodemapdb/README" + if ! test -f "$source_path/subprojects/keycodemapdb/README" then echo echo "ERROR: missing GIT submodules" @@ -898,7 +889,6 @@ Advanced options (experts only): --cross-cc-ARCH=CC use compiler when building ARCH guest test cases --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests --cross-prefix-ARCH=PREFIX cross compiler prefix when building ARCH guest test cases - --make=MAKE use specified make [$make] --python=PYTHON use specified python [$python] --ninja=NINJA use specified ninja [$ninja] --smbd=SMBD use specified smbd [$smbd] @@ -951,11 +941,6 @@ then fi fi -if ! has "$make" -then - error_exit "GNU make ($make) not found" -fi - if ! check_py_version "$python"; then error_exit "Cannot use '$python', Python >= 3.7 is required." \ "Use --python=/path/to/python to specify a supported Python." \ @@ -1188,7 +1173,7 @@ fi case "$fdt" in auto | enabled | internal) # Simpler to always update submodule, even if not needed. - git_submodules="${git_submodules} dtc" + git_submodules="${git_submodules} subprojects/dtc" ;; esac @@ -1778,7 +1763,6 @@ if test "$container" != no; then echo "RUNC=$runc" >> $config_host_mak fi echo "ROMS=$roms" >> $config_host_mak -echo "MAKE=$make" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak @@ -2031,7 +2015,6 @@ preserve_env CXXFLAGS preserve_env LD preserve_env LDFLAGS preserve_env LD_LIBRARY_PATH -preserve_env MAKE preserve_env NM preserve_env OBJCFLAGS preserve_env OBJCOPY diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index e84316dcfd..b5e1835299 100644 --- a/hw/virtio/virtio-qmp.c +++ b/hw/virtio/virtio-qmp.c @@ -668,7 +668,7 @@ VirtioDeviceFeatures *qmp_decode_features(uint16_t device_id, uint64_t bitmap) VirtioInfoList *qmp_x_query_virtio(Error **errp) { VirtioInfoList *list = NULL; - VirtioInfoList *node; + VirtioInfo *node; VirtIODevice *vdev; QTAILQ_FOREACH(vdev, &virtio_list, next) { @@ -682,11 +682,10 @@ VirtioInfoList *qmp_x_query_virtio(Error **errp) if (!strncmp(is_realized->str, "false", 4)) { QTAILQ_REMOVE(&virtio_list, vdev, next); } else { - node = g_new0(VirtioInfoList, 1); - node->value = g_new(VirtioInfo, 1); - node->value->path = g_strdup(dev->canonical_path); - node->value->name = g_strdup(vdev->name); - QAPI_LIST_PREPEND(list, node->value); + node = g_new(VirtioInfo, 1); + node->path = g_strdup(dev->canonical_path); + node->name = g_strdup(vdev->name); + QAPI_LIST_PREPEND(list, node); } g_string_free(is_realized, true); } diff --git a/meson.build b/meson.build index 78890f0155..2d48aa1e2e 100644 --- a/meson.build +++ b/meson.build @@ -404,8 +404,6 @@ if targetos != 'sunos' and not get_option('tsan') qemu_ldflags += cc.get_supported_link_arguments('-Wl,--warn-common') endif -# Specify linker-script with add_project_link_arguments so that it is not placed -# within a linker --start-group/--end-group pair if get_option('fuzzing') # Specify a filter to only instrument code that is directly related to # virtual-devices. @@ -3061,13 +3059,14 @@ if have_system and vfio_user_server_allowed endif fdt = not_found -if have_system - fdt_opt = get_option('fdt') +fdt_opt = get_option('fdt') +if fdt_required.length() > 0 or fdt_opt == 'enabled' + if fdt_opt == 'disabled' + error('fdt disabled but required by targets ' + ', '.join(fdt_required)) + endif + if fdt_opt in ['enabled', 'auto', 'system'] - have_internal = fs.exists(meson.current_source_dir() / 'dtc/libfdt/Makefile.libfdt') - fdt = cc.find_library('fdt', - required: fdt_opt == 'system' or - fdt_opt == 'enabled' and not have_internal) + fdt = cc.find_library('fdt', required: fdt_opt == 'system') if fdt.found() and cc.links(''' #include <libfdt.h> #include <libfdt_env.h> @@ -3076,41 +3075,27 @@ if have_system fdt_opt = 'system' elif fdt_opt == 'system' error('system libfdt requested, but it is too old (1.5.1 or newer required)') - elif have_internal - fdt_opt = 'internal' else - fdt_opt = 'disabled' + fdt_opt = 'internal' fdt = not_found endif endif - if fdt_opt == 'internal' - fdt_files = files( - 'dtc/libfdt/fdt.c', - 'dtc/libfdt/fdt_ro.c', - 'dtc/libfdt/fdt_wip.c', - 'dtc/libfdt/fdt_sw.c', - 'dtc/libfdt/fdt_rw.c', - 'dtc/libfdt/fdt_strerror.c', - 'dtc/libfdt/fdt_empty_tree.c', - 'dtc/libfdt/fdt_addresses.c', - 'dtc/libfdt/fdt_overlay.c', - 'dtc/libfdt/fdt_check.c', - ) + if not fdt.found() + assert(fdt_opt == 'internal') + have_internal = fs.exists(meson.current_source_dir() / 'subprojects/dtc/meson.build') - fdt_inc = include_directories('dtc/libfdt') - libfdt = static_library('fdt', - build_by_default: false, - sources: fdt_files, - include_directories: fdt_inc) - fdt = declare_dependency(link_with: libfdt, - include_directories: fdt_inc) + if not have_internal + error('libfdt source not found - please pull git submodule') + endif + + libfdt_proj = subproject('dtc', required: true, + default_options: ['tools=false', 'yaml=disabled', + 'python=disabled', 'default_library=static']) + fdt = libfdt_proj.get_variable('libfdt_dep') endif else fdt_opt = 'disabled' endif -if not fdt.found() and fdt_required.length() > 0 - error('fdt not available but required by targets ' + ', '.join(fdt_required)) -endif config_host_data.set('CONFIG_CAPSTONE', capstone.found()) config_host_data.set('CONFIG_FDT', fdt.found()) @@ -4043,7 +4028,6 @@ summary(summary_info, bool_yn: true, section: 'Directories') # Host binaries summary_info = {} summary_info += {'git': config_host['GIT']} -summary_info += {'make': config_host['MAKE']} summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())} summary_info += {'sphinx-build': sphinx_build} if config_host.has_key('HAVE_GDB_BIN') diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index c035329154..dba5ae05b6 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,7 +26,7 @@ sub_file="${sub_tdir}/submodule.tar" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -submodules="dtc ui/keycodemapdb" +submodules="subprojects/dtc subprojects/keycodemapdb" submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" sub_deinit="" diff --git a/dtc b/subprojects/dtc -Subproject b6910bec11614980a21e46fbccc35934b671bd8 +Subproject b6910bec11614980a21e46fbccc35934b671bd8 diff --git a/ui/keycodemapdb b/subprojects/keycodemapdb -Subproject f5772a62ec52591ff6870b7e8ef32482371f22c +Subproject f5772a62ec52591ff6870b7e8ef32482371f22c diff --git a/subprojects/slirp.wrap b/subprojects/slirp.wrap index ace4f26102..08291a4cf9 100644 --- a/subprojects/slirp.wrap +++ b/subprojects/slirp.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://gitlab.freedesktop.org/slirp/libslirp -revision = 15c52d697529eb3e78c5d8aa324d61715bce33b6 +revision = 26be815b86e8d49add8c9a8b320239b9594ff03d [provide] slirp = libslirp_dep diff --git a/tests/Makefile.include b/tests/Makefile.include index 5b838ec438..0184ef2237 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,11 +89,9 @@ distclean-tcg: $(DISTCLEAN_TCG_TARGET_RULES) # Build up our target list from the filtered list of ninja targets TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) -TESTS_VENV_DIR=$(BUILD_DIR)/pyvenv TESTS_VENV_TOKEN=$(BUILD_DIR)/pyvenv/tests.group TESTS_VENV_REQ=$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results -TESTS_PYTHON=$(TESTS_VENV_DIR)/bin/python3 ifndef AVOCADO_TESTS AVOCADO_TESTS=tests/avocado endif @@ -109,7 +107,7 @@ else endif quiet-venv-pip = $(quiet-@)$(call quiet-command-run, \ - $(TESTS_PYTHON) -m pip -q --disable-pip-version-check $1, \ + $(PYTHON) -m pip -q --disable-pip-version-check $1, \ "VENVPIP","$1") $(TESTS_VENV_TOKEN): $(TESTS_VENV_REQ) @@ -131,7 +129,7 @@ FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES)) # download one specific Fedora 31 image get-vm-image-fedora-31-%: check-venv $(call quiet-command, \ - $(TESTS_PYTHON) -m avocado vmimage get \ + $(PYTHON) -m avocado vmimage get \ --distro=fedora --distro-version=31 --arch=$*, \ "AVOCADO", "Downloading avocado tests VM image for $*") @@ -142,7 +140,7 @@ JOBS_OPTION=$(lastword -j1 $(filter-out -j, $(filter -j%,$(MAKEFLAGS)))) check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ - $(TESTS_PYTHON) -m avocado \ + $(PYTHON) -m avocado \ --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ $(if $(AVOCADO_TAGS),, \ --filter-by-tags-include-empty \ diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9401525325..142e8605ee 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -6,7 +6,7 @@ NULL := SPACE := $(NULL) # COMMA := , -HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) +HOST_ARCH = $(shell uname -m) USER = $(if $(NOUSER),,$(shell id -un)) UID = $(if $(NOUSER),,$(shell id -u)) diff --git a/tests/migration/meson.build b/tests/migration/meson.build index dd562355a1..ac71f13290 100644 --- a/tests/migration/meson.build +++ b/tests/migration/meson.build @@ -1,9 +1,11 @@ sysprof = dependency('sysprof-capture-4', required: false) +glib_static = dependency('glib-2.0', version: glib_req_ver, required: false, + method: 'pkg-config', static: true) stress = executable( 'stress', files('stress.c'), - dependencies: [glib, sysprof], + dependencies: [glib_static, sysprof], link_args: ['-static'], build_by_default: false, ) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 2cc2203d09..f0f5d32fb0 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -1,14 +1,12 @@ # Makefile for VM tests # Hack to allow running in an unconfigured build tree -ifeq ($(wildcard $(SRC_PATH)/config-host.mak),) +ifeq ($(realpath $(SRC_PATH)),$(realpath .)) VM_PYTHON = PYTHONPATH=$(SRC_PATH)/python /usr/bin/env python3 VM_VENV = -HOST_ARCH := $(shell uname -m) else -VM_PYTHON = $(TESTS_PYTHON) +VM_PYTHON = $(PYTHON) VM_VENV = check-venv -HOST_ARCH = $(ARCH) endif .PHONY: vm-build-all vm-clean-all @@ -23,6 +21,7 @@ ARM64_IMAGES += ubuntu.aarch64 centos.aarch64 endif endif +HOST_ARCH = $(shell uname -m) ifeq ($(HOST_ARCH),x86_64) IMAGES=$(X86_IMAGES) $(if $(USE_TCG),$(ARM64_IMAGES)) else ifeq ($(HOST_ARCH),aarch64) diff --git a/ui/meson.build b/ui/meson.build index 330369707d..e09b616a66 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -162,15 +162,15 @@ keymaps = [ ] if have_system or xkbcommon.found() + keycodemapdb_proj = subproject('keycodemapdb', required: true) foreach e : keymaps output = 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) genh += custom_target(output, output: output, capture: true, - input: files('keycodemapdb/data/keymaps.csv'), - command: [python, files('keycodemapdb/tools/keymap-gen'), - 'code-map', - '--lang', 'glib2', + input: keycodemapdb_proj.get_variable('keymaps_csv'), + command: [python, keycodemapdb_proj.get_variable('keymap_gen').full_path(), + 'code-map', '--lang', 'glib2', '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]), '@INPUT0@', e[0], e[1]]) endforeach |