From 31fa83bd2b3293227c50a646ee74ded6b70b87f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Benn=C3=A9e?= Date: Thu, 27 May 2021 17:03:16 +0100 Subject: [PATCH] tests/tcg/configure.sh: tweak quoting of target_compiler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Thomas Huth Cc: Thomas Huth Message-Id: <20210527160319.19834-4-alex.bennee@linaro.org> --- tests/tcg/configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.11.4.GIT