summaryrefslogtreecommitdiffstats
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* Run docker probe only if docker or podman are availableStefan Weil2022-11-221-1/+1
| | | | | | | | | | | | | | | | The docker probe uses "sudo -n" which can cause an e-mail with a security warning each time when configure is run. Therefore run docker probe only if either docker or podman are available. That avoids the problematic "sudo -n" on build environments which have neither docker nor podman installed. Fixes: c4575b59155e2e00 ("configure: store container engine in config-host.mak") Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <20221030083510.310584-1-sw@weilnetz.de> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20221117172532.538149-2-alex.bennee@linaro.org>
* Fix broken configure with -Wunused-parameterStefan Weil2022-11-061-4/+4
| | | | | | | | | | | | | | | | | The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `configure -extra-cflags=-Wunused-parameter` triggers the problem. configure for a native build does abort but shows the error in config.log. A cross build configure for Windows with Debian stable aborts with an error. Avoiding unused arguments fixes this. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <20221102202258.456359-1-sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/tcg: include CONFIG_PLUGIN in config-host.makPaolo Bonzini2022-10-311-0/+3
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20221013131304.623740-1-pbonzini@redhat.com> Message-Id: <20221027183637.2772968-27-alex.bennee@linaro.org>
* configure: fix the --enable-static --disable-pie caseAlex Bennée2022-10-311-2/+3
| | | | | | | | | The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221027183637.2772968-6-alex.bennee@linaro.org>
* configure: don't enable cross compilers unless in target_listAlex Bennée2022-10-311-0/+9
| | | | | | | | | | This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221027183637.2772968-5-alex.bennee@linaro.org>
* configure: Avoid using strings binaryMichal Privoznik2022-10-181-17/+18
| | | | | | | | | | | | | | | | | | | | | | When determining the endiandness of the target architecture we're building for a small program is compiled, which in an obfuscated way declares two strings. Then, we look which string is in correct order (using strings binary) and deduct the endiandness. But using the strings binary is problematic, because it's part of toolchain (strings is just a symlink to x86_64-pc-linux-gnu-strings or llvm-strings). And when (cross-)compiling, it requires users to set the symlink to the correct toolchain. Fortunately, we have a better alternative anyways. We can mimic what compiler.h is already doing: comparing __BYTE_ORDER__ against values for little/big endiandness. Bug: https://bugs.gentoo.org/876933 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Message-Id: <d6d9c7043cfe6d976d96694f2b4ecf85cf3206f1.1665732504.git.mprivozn@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: don't enable firmware for targets that are not builtPaolo Bonzini2022-10-181-4/+16
| | | | | | | | | | | This avoids the unfortunate effect of building pc-bios blobs even for targets the user isn't interested in. Due to the bi-arch nature of x86 and PPC firmware, check for the desired target by hand, and don't just look for the compilation target in $target_list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Revert "configure: build ROMs with container-based cross compilers"Alex Bennée2022-10-111-18/+12Star
| | | | | | | | | | | | | This reverts commit 730fe750fba63023e294ff0acf0f874369f1946f. Unconditionally building all the bios for all arches was a little too far too fast. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20221011113417.794841-4-alex.bennee@linaro.org>
* configure: build ROMs with container-based cross compilersPaolo Bonzini2022-10-061-12/+18
| | | | | | | | | | s390-ccw remains a bit more complex, because the -march=z900 test is done only for the native cross compiler. Otherwise, all that is needed is to pass the (now mandatory) target argument to write_target_makefile. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-29-alex.bennee@linaro.org>
* configure: cleanup creation of tests/tcg target configPaolo Bonzini2022-10-061-7/+5Star
| | | | | | | | | Remove the symlink to tests/tcg/config-*.mak, which is possible now that unused target config files are not created either. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-28-alex.bennee@linaro.org>
* configure: unify creation of cross-compilation MakefilesPaolo Bonzini2022-10-061-51/+43Star
| | | | | | | | Let write_target_makefile handle both host and container cross compilers. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-27-alex.bennee@linaro.org>
* configure: move tests/tcg/Makefile.prereqs to root build directoryPaolo Bonzini2022-10-061-8/+7Star
| | | | | | | | | It will not be specific to tests/tcg anymore, since it will be possible to build firmware using container-based cross compilers too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-26-alex.bennee@linaro.org>
* tests/tcg: move compiler tests to MakefilesPaolo Bonzini2022-10-061-63/+2Star
| | | | | | | | | | Further decoupling of tests/tcg from the main QEMU Makefile, and making the build more similar between the cross compiler case and the vetted container images. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-25-alex.bennee@linaro.org>
* tests/tcg: remove -f from Makefile invocationPaolo Bonzini2022-10-061-3/+4
| | | | | | | | | | Instead of linking tests/tcg/Makefile.target into the build tree, name the symbolic link "Makefile" and create it in every target subdirectory. This makes it possible to just invoke "make" in tests/tcg subdirectories. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-21-alex.bennee@linaro.org>
* tests: simplify Makefile invocation for tests/tcgPaolo Bonzini2022-10-061-9/+14
| | | | | | | | | | | | | | | Remove the DOCKER_SCRIPT and TARGET variable from the Makefile invocation for tests/tcg. For DOCKER_SCRIPT, resolve the path to docker.py in configure; for TARGET, move it to config-$(TARGET).mak and use a symbolic link to break the cycle. The symbolic link is still needed because tests/tcg includes dummy config files for targets that are not buildable. Once that is cleaned up, the symbolic link will go away too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-20-alex.bennee@linaro.org>
* configure: store container engine in config-host.makPaolo Bonzini2022-10-061-3/+8
| | | | | | | | | | In preparation for removing $(DOCKER_SCRIPT) from the tests/tcg configuration files, have Make use the same container engine that had been probed at configure time. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-19-alex.bennee@linaro.org>
* configure: return status code from probe_target_compilerPaolo Bonzini2022-10-061-8/+6Star
| | | | | | | | | For now, return 1 for container-based compilers. This will change as soon as ROMs will be buildable with them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-18-alex.bennee@linaro.org>
* configure: move detected gdb to TCG's config-host.makAlex Bennée2022-10-061-0/+7
| | | | | | | | | When tests/tcg gained it's own config-host.mak we forgot to move the GDB detection. Fixes: 544f4a2578 (tests/tcg: isolate from QEMU's config-host.mak) Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-6-alex.bennee@linaro.org>
* Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingStefan Hajnoczi2022-10-041-91/+6Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * x86: re-enable rng seeding via SetupData * x86: reinitialize RNG seed on system reboot and after kernel load * qboot: rebuild based on latest commit * watchdog: remove -watchdog option * update Meson to 0.61.5, move more configure tests # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmM4kiAUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroNfbgf+IHhIHVxtBVWqayVRkwpQC+oAFV/V # 4bvJI90rHmTNPA36n1ocUmQmXyNVTQFW/t7mlln5BhOwNzxnQycVe2idfMa6ntkb # hHpe2NbICF9Crzb9BkK4wnaBLwEWA/X3WlnCqPYtxlxEhjmxu+HPtF7vm12OTkOV # JevH3EN1gMiAfMo+gcRBlrwb5kntLm3nGZTCd218Ope22PoU6MVvxb9ivieJG8kD # xDUGPQNU0mB9pypwLYZAqmu34xJ8Stly9UuJ1M2iQoawIs7W2Qy7svpOrsKZ3W/7 # D7J18QLAjI7Hq6rUWPgK5ugnUvVMdaTXM7MZSuIDIxRJuj5YryIsHRPybQ== # =HEmX # -----END PGP SIGNATURE----- # gpg: Signature made Sat 01 Oct 2022 15:16:48 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: x86: re-initialize RNG seed when selecting kernel target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed configure, meson: move linker flag detection to meson configure, meson: move C++ compiler detection to meson.build meson: multiple names can be passed to dependency() meson: require 0.61.3 meson: -display dbus and CFI are incompatible ui: fix path to dbus-display1.h watchdog: remove -watchdog option configure: do not invoke as/ld directly for pc-bios/optionrom qboot: rebuild based on latest commit x86: re-enable rng seeding via SetupData x86: reinitialize RNG seed on system reboot x86: use typedef for SetupData struct x86: return modified setup_data only if read as memory, not as file Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * configure, meson: move linker flag detection to mesonPaolo Bonzini2022-10-011-16/+0Star
| | | | | | | | | | Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure, meson: move C++ compiler detection to meson.buildPaolo Bonzini2022-10-011-57/+0Star
| | | | | | | | | | | | | | | | | | | | | | The test is slightly weaker than before, because it does not call an extern "C" function from a C source file. However, in practice what we seek to detect is ABI compatibility of the various sanitizer flags, and for that it is enough to compile anything with CC and link it with CXX. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * meson: require 0.61.3Paolo Bonzini2022-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the dependency of dbus-display on --enable-modules. It also allows cleanups in modinfo collection and allows moving C++ compiler detection to meson.build. Because it is now deprecated to use install_subdir to create an empty directory, replace it with install_emptydir. Updating the Meson submodule to 0.61.5 also removes the message WARNING: Broken python installation detected. Python files installed by Meson might not be found by python interpreter. unless using system meson is forced with --meson. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/873 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/848 Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * configure: do not invoke as/ld directly for pc-bios/optionromPaolo Bonzini2022-09-271-17/+5Star
| | | | | | | | | | | | | | | | Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge tag 'pull-request-2022-09-26' of https://gitlab.com/thuth/qemu into ↵Stefan Hajnoczi2022-09-271-24/+1Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging * Fix emulation of the LZRF instruction * Fix "noexec" TCG test on s390x * Implement SHA-512 and random number generator instructions * Support for zPCI interpretation on s390x hosts * Removal of the "slirp" submodule # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmMx26URHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbUaOw/7Bu1ghYJyzjR8raXSzOP8KmyltKb0s0zd # rFpagZCeBiNGHAL2IaKHc3vw+oFy/TTWhrFLt+imDo2swDIIAWCb/bY2/snKX4c8 # feF0io7JTdNCWvS/9ng6qL/fGSNM6V2osYyN5fEm46DM7gC3GlAu5vP2TCVoIifw # AXDANd6XngoCAFBdixGNi0yxAmiLCou/1S+lJ7hCbx1oICPPTrzuGBwyQ+IELJOD # DUGFb+Dl4z+tv8OYRhdvoSTCz75IhsAXeny2+coffvW70BDSyhzIAtVeo2azVGvT # aOVRJt+g7H/mJ0vH20M/7pakdwvHs3zciw5oHUJSsEW1HzsqNgl+AEEUzXivipaN # LYp5//klqjjAu12hFQbzmbhD/vUw2+8mRgbJdKOz7rSrZ/K8f+jqIbbU5r8t1oyy # BqLo2i0EVBfAomzbHMD/kmrumiSNIlfSDwScAoIKAO6P3oy/Sg2twMhPlFRWAnI0 # 46dQS1rLuU0nV4tMCAQoXxRxjQXytCOhaF9G+qe9ogLufHG+Uy+j3IeunyAUl9GR # EcnRB0GFjWfZKeUsR9qev2pvgOZXeg4u+wpjGM7pmfpZw89nBqCj0UVAthXlSKoz # ru3HcuBJTBtxwYkSCsPMEDCk/FhJN0D+N205qg+6SY28R57WjTPFLvZPRmhkH03E # jN8rurLISAM= # =FeSy # -----END PGP SIGNATURE----- # gpg: Signature made Mon 26 Sep 2022 13:04:37 EDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2022-09-26' of https://gitlab.com/thuth/qemu: Remove the slirp submodule (i.e. compile only with an external libslirp) s390x/s390-virtio-ccw: add zpcii-disable machine property s390x/pci: reflect proper maxstbl for groups of interpreted devices s390x/pci: let intercept devices have separate PCI groups s390x/pci: enable adapter event notification for interpreted devices s390x/pci: don't fence interpreted devices without MSI-X s390x/pci: enable for load/store interpretation s390x/pci: add routine to get host function handle from CLP info Update linux headers to v6.0-rc4 configure: Add -Wno-gnu-variable-sized-type-not-at-end target/s390x: support PRNO_TRNG instruction target/s390x: support SHA-512 extensions linux-user/host/s390: Add vector instructions to host_signal_write() s390x/tcg: Fix opcode for lzrf Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * Remove the slirp submodule (i.e. compile only with an external libslirp)Thomas Huth2022-09-261-24/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QEMU 7.1 we don't support Ubuntu 18.04 anymore, so the last big important Linux distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 35: 4.6.1 CentOS 8 (RHEL-8): 4.4.0 Debian 11: 4.4.0 OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.7.0 NetBSD pkgsrc: 4.7.0 Homebrew: 4.7.0 MSYS2 mingw: 4.7.0 The only one that was still missing a libslirp package is OpenBSD - but the next version (OpenBSD 7.2 which will be shipped in October) is going to include a libslirp package. Since QEMU 7.2 will be published after OpenBSD 7.2, we should be fine there, too. So there is no real urgent need for keeping the slirp submodule in the QEMU tree anymore. Thus let's drop the slirp submodule now and rely on the libslirp packages from the distributions instead. Message-Id: <20220824151122.704946-7-thuth@redhat.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * configure: Add -Wno-gnu-variable-sized-type-not-at-endChenyi Qiang2022-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Linux headers update to v6.0-rc switches some definitions from GNU 'zero-length-array' extension to the C-standard-defined flexible array member. e.g. struct kvm_msrs { __u32 nmsrs; /* number of msrs in entries */ __u32 pad; - struct kvm_msr_entry entries[0]; + struct kvm_msr_entry entries[]; }; Those (unlike the GNU zero-length-array) have some extra restrictions like 'this must be put at the end of a struct', which clang build would complain about. e.g. the current code struct { struct kvm_msrs info; struct kvm_msr_entry entries[1]; } msr_data = { } generates the warning like: target/i386/kvm/kvm.c:2868:25: error: field 'info' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] struct kvm_msrs info; ^ In fact, the variable length 'entries[]' field in 'info' is zero-sized in GNU defined semantics, which can give predictable offset for 'entries[1]' in local msr_data. The local defined struct is just there to force a stack allocation large enough for 1 kvm_msr_entry, a clever trick but requires to turn off this clang warning. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20220915091035.3897-2-chenyi.qiang@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* | configure: Avoid use of 'local' as it is non-POSIXPeter Maydell2022-09-221-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the non-POSIX 'local' keyword in just two places in configure; rewrite to avoid it. In do_compiler(), just drop the 'local' keyword. The variable 'compiler' is only used elsewhere in the do_compiler_werror() function, which already uses the variable as a normal non-local one. In probe_target_compiler(), $try and $t are both local; make them normal variables and use a more obviously distinct variable name for $t. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-8-peter.maydell@linaro.org
* | configure: Check mkdir result directly, not via $?Peter Maydell2022-09-221-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | Shellcheck warns that we have one place where we run a command and then check if it failed using $?; this is better written to simply check the command in the 'if' statement directly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-7-peter.maydell@linaro.org
* | configure: Remove use of backtick `...` syntaxPeter Maydell2022-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-6-peter.maydell@linaro.org
* | configure: Add './' on front of glob of */config-devices.mak.dPeter Maydell2022-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Fix this by adding './'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-5-peter.maydell@linaro.org
* | configure: Add missing quoting for some easy casesPeter Maydell2022-09-221-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds quotes in some places which: * are spotted by shellcheck * are obviously incorrect * are easy to fix just by adding the quotes It doesn't attempt fix all of the places shellcheck finds errors, or even all the ones which are easy to fix. It's just a random sampling which is hopefully easy to review and which cuts down the size of the problem for next time somebody wants to try to look at shellcheck errors. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-4-peter.maydell@linaro.org
* | configure: Remove unused meson_args variablePeter Maydell2022-09-221-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | The meson_args variable was added in commit 3b4da13293482134b, but was not used in that commit and isn't used today. Delete the unnecessary assignment. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-3-peter.maydell@linaro.org
* | configure: Remove unused python_version variablePeter Maydell2022-09-221-3/+0Star
|/ | | | | | | | | | | | | | Shellcheck correctly reports that we set python_version and never use it. This is a leftover from commit f9332757898a7: we used to use python_version purely to as part of the summary information printed at the end of a configure run, and that commit changed to printing the information from meson (which looks up the python version itself). Remove the unused variable. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220825150703.4074125-2-peter.maydell@linaro.org
* configure: explicitly set cflags for --disable-pieAlex Bennée2022-09-201-0/+3
| | | | | | | | | | This is working around current limitation of Meson's handling of --disable-pie. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-19-alex.bennee@linaro.org>
* configure: improve error for ucontext coroutine backendPaolo Bonzini2022-09-011-10/+1Star
| | | | | | | | | | | Instead of using feature_not_found(), which is not a good match because there is no "remedy" to fix the lack of makecontext(), just print a custom error. This happens to remove the last use of feature_not_found(), so remove the definition and the documentation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: pass correct cflags to container-based cross compilersPaolo Bonzini2022-07-291-1/+0Star
| | | | | | | | | | | | | probe_target_compiler returns nonempty $target_cc for installed toolchains and $container_cross_cc for container-based toolchains. In both cases however the flags (coming from $cross_cc_cflags_${target_arch}) must be in $target_cflags. Therefore, do not clear them prior to returning from probe_target_compiler. Reported-by: Taylor Simpson <tsimpson@quicinc.com> Fixes: 92e288fcfb ("build: try both native and cross compilers", 2022-07-08) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: Fix ppc container_cross_cc substitutionRichard Henderson2022-07-291-1/+1
| | | | | | | | | | | When moving this code out of probe_target_compiler(), we failed to adjust the variable in which the target is located, resulting in e.g. powerpc64-linux-user-linux-gnu-gcc-10 Fixes: cd362defbbd ("tests/tcg: merge configure.sh back into main configure script") Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220728183901.1290113-1-richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: Avoid '==' bashismPeter Maydell2022-07-261-1/+1
| | | | | | | | | | | The '==' operator to test is a bashism; the standard way to copmare strings is '='. This causes dash to complain: ../../configure: 681: test: linux: unexpected operator Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20220720152631.450903-6-peter.maydell@linaro.org
* configure: Drop dead code attempting to use -msmall-data on alpha hostsPeter Maydell2022-07-261-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | In commit 823eb013452e93d we moved the setting of ARCH from configure to meson.build, but we accidentally left behind one attempt to use $ARCH in configure, which was trying to add -msmall-data to the compiler flags on Alpha hosts. Since ARCH is now never set, the test always fails and we never add the flag. There isn't actually any need to use this compiler flag on Alpha: the original intent was that it would allow us to simplify our TCG codegen on that platform, but we never actually made the TCG changes that would rely on -msmall-data. Drop the effectively-dead code from configure, as we don't need it. This was spotted by shellcheck: In ./configure line 2254: case "$ARCH" in ^---^ SC2153: Possible misspelling: ARCH may not be assigned, but arch is. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20220720152631.450903-5-peter.maydell@linaro.org
* configure: Don't use bash-specific string-replacement syntaxPeter Maydell2022-07-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The variable string-replacement syntax ${var/old/new} is a bashism (though it is also supported by some other shells), and for instance does not work with the NetBSD /bin/sh, which complains: ../src/configure: 687: Syntax error: Bad substitution Replace it with a more portable sed-based approach, similar to what we already do in quote_sh(). Note that shellcheck also diagnoses this: In ./configure line 687: e=${e/'\'/'\\'} ^-----------^ SC2039: In POSIX sh, string replacement is undefined. ^-- SC1003: Want to escape a single quote? echo 'This is how it'\''s done'. ^-- SC1003: Want to escape a single quote? echo 'This is how it'\''s done'. In ./configure line 688: e=${e/\"/'\"'} ^----------^ SC2039: In POSIX sh, string replacement is undefined. Fixes: 8154f5e64b0cf ("meson: Prefix each element of firmware path") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 20220720152631.450903-4-peter.maydell@linaro.org
* configure: Add braces to clarify intent of $emu[[:space:]]Peter Maydell2022-07-261-1/+1
| | | | | | | | | | | | | | | | | | In shell script syntax, $var[something] is not special for variable expansion: $var is expanded. However, as it can look as if it were intended to be an array element access (the correct syntax for which is ${var[something]}), shellcheck recommends using explicit braces around ${var} to clarify the intended expansion. This fixes the warning: In ./configure line 2346: if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then ^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20220720152631.450903-3-peter.maydell@linaro.org
* configure: Add missing POSIX-required spacePeter Maydell2022-07-261-1/+1
| | | | | | | | | | | | | | | | | In commit 7d7dbf9dc15be6e1 we added a line to the configure script which is not valid POSIX shell syntax, because it is missing a space after a '!' character. shellcheck diagnoses this: if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then ^-- SC1035: You are missing a required space after the !. and the OpenBSD shell will not correctly handle this without the space. Fixes: 7d7dbf9dc15be6e1 ("configure: replace --enable/disable-git-update with --with-git-submodules") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-id: 20220720152631.450903-2-peter.maydell@linaro.org
* tests/docker/dockerfiles: Add debian-loongarch-cross.dockerRichard Henderson2022-07-191-0/+5
| | | | | | | | | Use the pre-packaged toolchain provided by Loongson via github. Tested-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220704070824.965429-1-richard.henderson@linaro.org>
* Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingPeter Maydell2022-07-141-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SCSI fuzzing fix (Mauro) * pre-install data files in the build directory (Akihiko) * SCSI fixes for Mac OS (Mark) # gpg: Signature made Wed 13 Jul 2022 15:59:00 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: pc-bios/s390-ccw: add -Wno-array-bounds q800: add default vendor and product information for scsi-cd devices q800: add default vendor and product information for scsi-hd devices scsi-disk: allow MODE SELECT block descriptor to set the block size scsi-disk: allow the MODE_PAGE_R_W_ERROR AWRE bit to be changeable for CDROM drives q800: implement compat_props to enable quirk_mode_page_truncated for scsi-cd devices scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_TRUNCATED quirk for Macintosh scsi-disk: add FORMAT UNIT command q800: implement compat_props to enable quirk_mode_page_vendor_specific_apple for scsi devices scsi-disk: add SCSI_DISK_QUIRK_MODE_PAGE_VENDOR_SPECIFIC_APPLE quirk for Macintosh q800: implement compat_props to enable quirk_mode_sense_rom_use_dbd for scsi-cd devices scsi-disk: add SCSI_DISK_QUIRK_MODE_SENSE_ROM_USE_DBD quirk for Macintosh q800: implement compat_props to enable quirk_mode_page_apple_vendor for scsi-cd devices scsi-disk: add MODE_PAGE_APPLE_VENDOR quirk for Macintosh scsi-disk: add new quirks bitmap to SCSIDiskState meson: Prefix each element of firmware path module: Use bundle mechanism datadir: Use bundle mechanism cutils: Introduce bundle mechanism scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * meson: Prefix each element of firmware pathAkihiko Odaki2022-07-131-0/+15
| | | | | | | | | | | | | | Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220624154042.51512-1-akihiko.odaki@gmail.com> [Rewrite shell function without using Bash extensions. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | configure: Restrict TCG to emulationPhilippe Mathieu-Daudé2022-07-131-6/+14
|/ | | | | | | | | | | | | | If we don't need to emulate any target, we certainly don't need TCG. This should also help to compile again with ".../configure --enable-tools --disable-system --disable-user" on systems that do not have a TCG backend. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [thuth: Re-arranged the code, remove check-softfloat from buildtest.yml] Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220706153816.768143-1-thuth@redhat.com>
* build: try both native and cross compilersPaolo Bonzini2022-07-081-64/+95
| | | | | | | | | | | | | | | | | | | | | | | | Configure is trying to fall back on cross compilers for targets that can have bi-arch or bi-endian toolchains, but there are many corner cases where just checking the name can go wrong. For example, the RHEL ppc64le compiler is bi-arch and bi-endian, but multilibs are disabled. Therefore it cannot be used to build 32-bit hosted binaries like the linux-user TCG tests. Trying the cross compiler first also does not work, and an example for this is also ppc64le. The powerpc64-linux-gnu-gcc binary from the cross-gcc package is theoretically multilib-friendly, but it cannot find the CRT files on a ppc64le host, because they are not in the .../le multilib subdirectory. This can be fixed by testing both the native compiler and the cross compiler, and proceeding with the first one that works. To do this, move the compiler usability check from the tests/tcg snippet to inside probe_target_compiler and, while at it, restrict the softmmu emulation target to basically a test for the presence of libgcc. Tested-by: Matheus Kowalczuk Ferst <matheus.ferst@eldorado.org.br> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: pass whole target name to probe_target_compilerPaolo Bonzini2022-07-081-20/+32
| | | | | | | | | Let probe_target_compiler know if it is looking for a compiler for a softmmu (freestanding) or a linux-user (hosted) environment. The detection for the compiler has to be done differently in the two cases. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: write EXTRA_CFLAGS for all sub-MakefilesPaolo Bonzini2022-07-061-4/+2Star
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: allow more host/target combos to use the host compilerPaolo Bonzini2022-07-061-0/+4
| | | | | | | Add more pairs of bi-arch compilers, so that it is not necessary to have e.g. both little-endian and big-endian ARM compilers. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>