Skip to content

Commit

Permalink
tests/tcg/configure.sh: tweak quoting of target_compiler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stsquad committed Jun 7, 2021
1 parent 63de935 commit 31fa83b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/tcg/configure.sh
Expand Up @@ -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
Expand Down

0 comments on commit 31fa83b

Please sign in to comment.