All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org
Subject: [PULL 3/8] tests/tcg/configure.sh: tweak quoting of target_compiler
Date: Mon,  7 Jun 2021 15:32:58 +0100	[thread overview]
Message-ID: <20210607143303.28572-4-alex.bennee@linaro.org> (raw)
In-Reply-To: <20210607143303.28572-1-alex.bennee@linaro.org>

If you configure the host compiler with a multi-command stanza like:

  --cc="ccache gcc"

then the configure.sh machinery falls over with confusion. Work around
this by ensuring we correctly quote so where we need a complete
evaluation we get it. Of course the has() check needs single variable
so we need to unquote that. This does mean it essentially checks that
just the ccache command exits but if we got past that step we still
check the compiler actually does something.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Message-Id: <20210527160319.19834-4-alex.bennee@linaro.org>

diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index ed6492ce59..aa7c24328a 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -222,10 +222,10 @@ for target in $target_list; do
 
   got_cross_cc=no
 
-  if eval test "x\${cross_cc_$arch}" != xyes; then
-      eval "target_compiler=\${cross_cc_$arch}"
+  if eval test "x\"\${cross_cc_$arch}\"" != xyes; then
+      eval "target_compiler=\"\${cross_cc_$arch}\""
 
-      if has "$target_compiler"; then
+      if has $target_compiler; then
           if test "$supress_clang" = yes &&
                   $target_compiler --version | grep -qi "clang"; then
               got_cross_cc=no
-- 
2.20.1



  parent reply	other threads:[~2021-06-07 14:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 14:32 [PULL 0/8] testing and misc updates Alex Bennée
2021-06-07 14:32 ` [PULL 1/8] tests/tcg: add a multiarch signals test to stress test signal delivery Alex Bennée
2021-06-07 14:32 ` [PULL 2/8] meson.build: fix cosmetics of compiler display Alex Bennée
2021-06-07 14:32 ` Alex Bennée [this message]
2021-06-07 14:32 ` [PULL 4/8] tests/acceptance: tag various arm tests as TCG only Alex Bennée
2021-06-07 14:33 ` [PULL 5/8] gitlab: work harder to avoid false positives in checkpatch Alex Bennée
2021-06-07 14:50   ` Daniel P. Berrangé
2021-06-07 16:14     ` Alex Bennée
2021-06-07 16:19       ` Daniel P. Berrangé
2021-06-07 14:33 ` [PULL 6/8] gitlab-ci: Split gprof-gcov job Alex Bennée
2021-06-07 14:33 ` [PULL 7/8] tests/vm: expose --source-path to scripts to find extra files Alex Bennée
2021-06-07 14:33 ` [PULL 8/8] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source Alex Bennée
2021-06-07 16:17 ` [PULL 0/8] testing and misc updates Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210607143303.28572-4-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --subject='Re: [PULL 3/8] tests/tcg/configure.sh: tweak quoting of target_compiler' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.