- Sep 26, 2022
-
-
Thomas Huth authored
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>
-
Chenyi Qiang authored
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>
-
- Sep 22, 2022
-
-
Peter Maydell authored
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
-
Peter Maydell authored
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
-
Peter Maydell authored
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
-
Peter Maydell authored
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
-
Peter Maydell authored
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
-
Peter Maydell authored
The meson_args variable was added in commit 3b4da132, 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
-
Peter Maydell authored
Shellcheck correctly reports that we set python_version and never use it. This is a leftover from commit f9332757: 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
-
- Sep 20, 2022
-
-
Alex Bennée authored
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>
-
- Sep 01, 2022
-
-
Paolo Bonzini authored
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>
-
- Jul 28, 2022
-
-
Paolo Bonzini authored
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: 92e288fc ("build: try both native and cross compilers", 2022-07-08) Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Richard Henderson authored
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: cd362def ("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>
-
- Jul 26, 2022
-
-
Peter Maydell authored
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
-
Peter Maydell authored
In commit 823eb013 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
-
Peter Maydell authored
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: 8154f5e6 ("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
-
Peter Maydell authored
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
-
Peter Maydell authored
In commit 7d7dbf9d 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: 7d7dbf9d ("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
-
- Jul 19, 2022
-
-
Richard Henderson authored
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>
-
- Jul 13, 2022
-
-
Akihiko Odaki authored
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>
-
- Jul 12, 2022
-
-
Philippe Mathieu-Daudé authored
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>
-
- Jul 08, 2022
-
-
Paolo Bonzini authored
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>
-
Paolo Bonzini authored
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>
-
- Jul 06, 2022
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
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>
-
Paolo Bonzini authored
Use the flags passed to the configure script for the ppc cross compiler, which in fact default to those that are needed to get the 32-bit ISA. Add the endianness flag so that it remains possible to use a ppc64le compiler to compile VOF. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
QEMU_CFLAGS is not available in pc-bios/s390-ccw/netboot.mak, but the Makefile needs to access the flags passed to the configure script for the s390x cross compiler. Fix everything and rename QEMU_CFLAGS to EXTRA_CFLAGS for consistency with tests/tcg. Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The optionrom build is disregarding the flags passed to the configure script via --cross-cflags-i386. Pass it down and add it to the Makefile. This will make it possible to get the -m32 flag from $target_cflags to force a 32-bit build on 64-bit hosts, instead of supplying manually the arcane -Wa,-32 and linker emulation options. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 15, 2022
-
-
Jagannathan Raman authored
add the libvfio-user library as a submodule. build it as a meson subproject. libvfio-user is distributed with BSD 3-Clause license and json-c with MIT (Expat) license Signed-off-by:
Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by:
John G Johnson <john.g.johnson@oracle.com> Signed-off-by:
Jagannathan Raman <jag.raman@oracle.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: c2adec87958b081d1dc8775d4aa05c897912f025.1655151679.git.jag.raman@oracle.com [Changed submodule URL to QEMU's libvfio-user mirror on GitLab. The QEMU project mirrors its dependencies so that it can provide full source code even in the event that its dependencies become unavailable. Note that the mirror repo is manually updated, so please contact me to make newer libvfio-user commits available. If I become a bottleneck we can set up a cronjob. Updated scripts/meson-buildoptions.sh to match the meson_options.txt change. Failure to do so can result in scripts/meson-buildoptions.sh being modified by the build system later on and you end up with a dirty working tree. --Stefan] Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Include the full path in TARGET_DIR, so that messages from sub-Makefiles are clearer. Also, prepare for possibly building firmware outside pc-bios/ from the Makefile, Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Place it only inside the 'if test "$pie" = "no"' conditional. Since commit 43924d1e ("pc-bios/optionrom: detect -fno-pie", 2022-05-12), the PIE options are detected independently by pc-bios/optionrom/Makefile, and the CFLAGS_NOPIE/LDFLAGS_NOPIE variables are not used anymore. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 14, 2022
-
-
Paolo Bonzini authored
INSTALL and LIBTOOL are not used anymore, but OBJCFLAGS is new and was not listed. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 13, 2022
-
-
Paolo Bonzini authored
The move from tests/tcg/configure.sh started enabling the container image for xtensa-linux-user, which fails because the compiler does not have the full set of headers. The cause is the "xtensa*-softmmu)" case in tests/tcg/configure.sh which became just "xtensa*)" in the new probe_target_compiler shell function. Look out for xtensa*-linux-user and do not configure it. Reported-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220608135727.1341946-1-pbonzini@redhat.com> Fixes: cd362def ("tests/tcg: merge configure.sh back into main configure script") Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220613171258.1905715-6-alex.bennee@linaro.org>
-
- Jun 06, 2022
-
-
Song Gao authored
Signed-off-by:
Song Gao <gaosong@loongson.cn> Signed-off-by:
Xiaojuan Yang <yangxiaojuan@loongson.cn> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Acked-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220606124333.2060567-44-yangxiaojuan@loongson.cn> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 01, 2022
-
-
Paolo Bonzini authored
The only compiler variable that is still needed is $(CC), for contrib/plugins/Makefile. All firmware builds have their own config-host.mak file. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-17-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220527153603.887929-28-alex.bennee@linaro.org>
-
Paolo Bonzini authored
While container-based cross compilers are not supported, this already makes it possible to build vof on any machine that has an installation of GCC and binutils for 32- or 64-bit PowerPC. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-16-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220527153603.887929-27-alex.bennee@linaro.org>
-
Paolo Bonzini authored
While container-based cross compilers are not supported, this already makes it possible to build x86 optionroms on any machine that has an installation of GCC and binutils for 32- or 64-bit x86. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-15-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220527153603.887929-26-alex.bennee@linaro.org>
-
Paolo Bonzini authored
While container-based cross compilers are not supported, this already makes it possible to build s390-ccw on any machine that has s390x GCC and binutils installed. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-14-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20220527153603.887929-25-alex.bennee@linaro.org>
-
Paolo Bonzini authored
Ensure that the pc-bios/optionrom and pc-bios/s390-ccw directory exist at the time when we'll write out the compiler configuration for them. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-13-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220527153603.887929-24-alex.bennee@linaro.org>
-