Skip to content
Snippets Groups Projects
  1. Jul 28, 2022
  2. 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
  3. Jul 19, 2022
  4. Jul 13, 2022
  5. Jul 12, 2022
  6. 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
  7. Jul 06, 2022
  8. Jun 15, 2022
  9. Jun 14, 2022
  10. Jun 13, 2022
  11. Jun 06, 2022
  12. Jun 01, 2022
  13. May 28, 2022
  14. May 18, 2022
  15. May 14, 2022
Loading