Skip to content
Snippets Groups Projects
  1. Sep 26, 2022
    • Thomas Huth's avatar
      Remove the slirp submodule (i.e. compile only with an external libslirp) · 5890258a
      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: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      5890258a
    • Chenyi Qiang's avatar
      configure: Add -Wno-gnu-variable-sized-type-not-at-end · 28d01b1d
      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: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarChenyi Qiang <chenyi.qiang@intel.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20220915091035.3897-2-chenyi.qiang@intel.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      28d01b1d
  2. Sep 22, 2022
  3. Sep 20, 2022
  4. Sep 01, 2022
  5. Jul 28, 2022
  6. Jul 26, 2022
    • Peter Maydell's avatar
      configure: Avoid '==' bashism · c5cfdaba
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-6-peter.maydell@linaro.org
      c5cfdaba
    • Peter Maydell's avatar
      configure: Drop dead code attempting to use -msmall-data on alpha hosts · aca5001d
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-5-peter.maydell@linaro.org
      aca5001d
    • Peter Maydell's avatar
      configure: Don't use bash-specific string-replacement syntax · 65842b03
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-4-peter.maydell@linaro.org
      65842b03
    • Peter Maydell's avatar
      configure: Add braces to clarify intent of $emu[[:space:]] · d466d416
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-3-peter.maydell@linaro.org
      d466d416
    • Peter Maydell's avatar
      configure: Add missing POSIX-required space · 35a7a6fc
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Tested-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-id: 20220720152631.450903-2-peter.maydell@linaro.org
      35a7a6fc
  7. Jul 19, 2022
  8. Jul 13, 2022
  9. Jul 12, 2022
  10. Jul 08, 2022
    • Paolo Bonzini's avatar
      build: try both native and cross compilers · 92e288fc
      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: default avatarMatheus Kowalczuk Ferst <matheus.ferst@eldorado.org.br>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      92e288fc
    • Paolo Bonzini's avatar
      configure: pass whole target name to probe_target_compiler · 52f08dea
      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: default avatarPaolo Bonzini <pbonzini@redhat.com>
      52f08dea
  11. Jul 06, 2022
  12. Jun 15, 2022
  13. Jun 14, 2022
  14. Jun 13, 2022
  15. Jun 06, 2022
  16. Jun 01, 2022
Loading