From a2696204de05fc3f57a2bc1c7762b9f5f2df594f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 25 May 2023 11:51:45 +0200 Subject: [PATCH 01/12] tests/docker: simplify HOST_ARCH definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARCH is always empty, so just define HOST_ARCH as the result of uname. Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) From b1399b0c851f36b4cd0185321cb620bf4e52f30b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 25 May 2023 11:52:49 +0200 Subject: [PATCH 02/12] tests/vm: fix and simplify HOST_ARCH definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARCH is always empty, so just define HOST_ARCH as the result of uname. The incorrect definition was not being used because the "ifeq" statement is wrong; replace it with the same idiom based on $(realpath) that the main Makefile uses. With this change, vm-build-netbsd in a configured tree will not use the PYTHONPATH hack. Reported-by: John Snow Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/vm/Makefile.include | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 2cc2203d09..c2a8ca1c17 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_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) From eea2d141179e58222eb655f948a951561134b260 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 25 May 2023 11:56:13 +0200 Subject: [PATCH 03/12] Makefile: remove $(TESTS_PYTHON) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is now the same as $(PYTHON), since the latter always points at pyvenv/bin/python3. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 8 +++----- tests/vm/Makefile.include | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) 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/vm/Makefile.include b/tests/vm/Makefile.include index c2a8ca1c17..f0f5d32fb0 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -5,7 +5,7 @@ ifeq ($(realpath $(SRC_PATH)),$(realpath .)) VM_PYTHON = PYTHONPATH=$(SRC_PATH)/python /usr/bin/env python3 VM_VENV = else -VM_PYTHON = $(TESTS_PYTHON) +VM_PYTHON = $(PYTHON) VM_VENV = check-venv endif From 5b507233e6ce8f7ccfc4431f934518e15102e63a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 25 May 2023 17:46:07 +0200 Subject: [PATCH 04/12] configure: unset harmful environment variables Apart from CLICOLOR_FORCE and GREP_OPTIONS, there are other variables that are listed in the Autoconf manual. While Autoconf neutralizes them very early, and assumes it does not (yet) run in a shell that has "unset", QEMU assumes that the user invoked configure under a POSIX shell, and therefore can simply use "unset" to clear them. CDPATH is particularly nasty because it messes up "cd ... && pwd". Reported-by: Juan Quintela Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 80ca1c9221..9cdce69b78 100755 --- a/configure +++ b/configure @@ -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 From bac1bc848bb5ab7b020975d161a4043cabcbb8f9 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Thu, 25 May 2023 18:20:43 -0300 Subject: [PATCH 05/12] meson: Remove leftover comment Commit d2e6f9272d ("fuzz: remove fork-fuzzing scaffolding") removed the linker script and forgot to remove the comment. Signed-off-by: Fabiano Rosas Message-Id: <20230525212044.30222-2-farosas@suse.de> Signed-off-by: Paolo Bonzini --- meson.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/meson.build b/meson.build index 78890f0155..ee1b7dac73 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. From db01d85f168b19a48e5112cb02cda37014719c3e Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Thu, 25 May 2023 18:20:44 -0300 Subject: [PATCH 06/12] meson: Add static glib dependency for initrd-stress.img We recently moved glib detection code to meson but this changes the linker command line from -lglib-2.0 to using a path to libglib-2.0.so. This does not work for static linking, which is used by stress.c: $ make V=1 tests/migration/initrd-stress.img cc -m64 -mcx16 -o tests/migration/stress ... -static -Wl,--start-group /usr/lib64/libglib-2.0.so -Wl,--end-group ... bin/ld: attempted static link of dynamic object `/usr/lib64/libglib-2.0.so' Add a specific dependency for stress.c, which is linked statically. The compiler command line is now: cc -m64 -mcx16 -o tests/migration/stress ... -static -pthread -Wl,--start-group -lm /usr/lib64/libpcre.a -lglib-2.0 -Wl,--end-group Fixes: fc9a809e0d ("build: move glib detection and workarounds to meson") Signed-off-by: Fabiano Rosas Message-Id: <20230525212044.30222-3-farosas@suse.de> Signed-off-by: Paolo Bonzini --- tests/migration/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, ) From 5590615276f217bc875b0fdc6c2351293f55df6c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 23 May 2023 09:04:45 +0200 Subject: [PATCH 07/12] slirp: update wrap to latest master It is recommended to use SSIZE_T for ssize_t on win32, but the commit that is being used for slirp.wrap uses int. Update to include the fix as well as the other bugfix commit "ip: Enforce strict aliasing". Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- subprojects/slirp.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0bfd14149b248e8097ea4da1f9d53beb5c5b0cca Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 15 May 2023 15:26:04 +0200 Subject: [PATCH 08/12] virtio: qmp: fix memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and need not be allocated by the caller. Fixes Coverity CID 1508724. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- hw/virtio/virtio-qmp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); } From 577bdbcf85d4c491da3271d99526b66c576d90e5 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 May 2023 17:29:04 +0200 Subject: [PATCH 09/12] meson: simplify logic for -Dfdt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fdt_opt == 'disabled' is going to give an error if libfdt is required by any target, so catch that immediately. For fdt_opt == 'enabled', instead, do not check immediately whether the internal libfdt is present. Instead do the check after ascertaining that libfdt is absent or too old. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- meson.build | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index ee1b7dac73..218428841d 100644 --- a/meson.build +++ b/meson.build @@ -3059,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 #include @@ -3074,14 +3075,19 @@ 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' + if not fdt.found() + assert(fdt_opt == 'internal') + have_internal = fs.exists(meson.current_source_dir() / 'subprojects/dtc/meson.build') + + if not have_internal + error('libfdt source not found - please pull git submodule') + endif + fdt_files = files( 'dtc/libfdt/fdt.c', 'dtc/libfdt/fdt_ro.c', @@ -3106,9 +3112,6 @@ if have_system 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()) From 58e48b2e721dcf70571d293e86c02eedbe3a0f39 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 May 2023 12:07:22 +0000 Subject: [PATCH 10/12] meson: use subproject for internal libfdt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent dtc/libfdt can use either Make or meson as the build system. By using a subproject, our own meson.build can remove the hard coded list of source files. This is also the first step towards managing downloads with .wrap files instead of submodule. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitmodules | 4 ++-- configure | 2 +- meson.build | 24 ++++-------------------- scripts/archive-source.sh | 2 +- dtc => subprojects/dtc | 0 5 files changed, 8 insertions(+), 24 deletions(-) rename dtc => subprojects/dtc (100%) diff --git a/.gitmodules b/.gitmodules index 2a3a12033c..3ed5d073d6 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 diff --git a/configure b/configure index 9cdce69b78..d42bbd0731 100755 --- a/configure +++ b/configure @@ -1187,7 +1187,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 diff --git a/meson.build b/meson.build index 218428841d..884b16c749 100644 --- a/meson.build +++ b/meson.build @@ -3088,26 +3088,10 @@ if fdt_required.length() > 0 or fdt_opt == 'enabled' error('libfdt source not found - please pull git submodule') endif - 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', - ) - - 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) + 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' diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index c035329154..a7c2886334 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 ui/keycodemapdb" submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" sub_deinit="" diff --git a/dtc b/subprojects/dtc similarity index 100% rename from dtc rename to subprojects/dtc From c53648abba167db47827840bbd4257ed7bc6133c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 May 2023 12:07:22 +0000 Subject: [PATCH 11/12] meson: use subproject for keycodemapdb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By using a subproject, our own meson.build can use variables from the subproject instead of hard-coded paths. This is also the first step towards managing downloads with .wrap files instead of submodule. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitmodules | 4 ++-- configure | 4 ++-- scripts/archive-source.sh | 2 +- {ui => subprojects}/keycodemapdb | 0 ui/meson.build | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) rename {ui => subprojects}/keycodemapdb (100%) diff --git a/.gitmodules b/.gitmodules index 3ed5d073d6..f8b2ddf387 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/configure b/configure index d42bbd0731..0e93058489 100755 --- a/configure +++ b/configure @@ -253,7 +253,7 @@ else git_submodules_action="ignore" fi -git_submodules="ui/keycodemapdb" +git_submodules="subprojects/keycodemapdb" git="git" debug_tcg="no" docs="auto" @@ -805,7 +805,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" diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index a7c2886334..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="subprojects/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/ui/keycodemapdb b/subprojects/keycodemapdb similarity index 100% rename from ui/keycodemapdb rename to subprojects/keycodemapdb 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 From b17bbf835c8998e93fd99b06164f1d63843fe8c9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 7 Jun 2022 12:48:49 +0200 Subject: [PATCH 12/12] configure: ignore --make Setting the MAKE variable to a GNU Make executable does not really have any effect: if a non-GNU Make is used, the QEMU Makefile will fail to parse. Just remove everything related to --make and $make as dead code. Signed-off-by: Paolo Bonzini --- configure | 18 +----------------- meson.build | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/configure b/configure index 0e93058489..d674a96673 100755 --- a/configure +++ b/configure @@ -400,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" @@ -421,7 +417,6 @@ darwin) ;; sunos) solaris="yes" - make="${MAKE-gmake}" ;; haiku) pie="no" @@ -525,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) @@ -630,7 +622,7 @@ for opt do ;; --objcc=*) ;; - --make=*) make="$optarg" + --make=*) ;; --install=*) ;; @@ -897,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] @@ -950,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." \ @@ -1777,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 @@ -2030,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/meson.build b/meson.build index 884b16c749..2d48aa1e2e 100644 --- a/meson.build +++ b/meson.build @@ -4028,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')