From patchwork Thu May 27 16:03:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 448861 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp643581jac; Thu, 27 May 2021 09:09:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2rIGB7DPrdlla/O04NpMT67CcOOAgweN46yrhlkhlDFk0BqgChDGpKX6PqYtIg8ec4FjD X-Received: by 2002:a17:906:af05:: with SMTP id lx5mr2196386ejb.549.1622131744345; Thu, 27 May 2021 09:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622131744; cv=none; d=google.com; s=arc-20160816; b=h5fm+JzYdDVOZEYHUtkE5RZk7BDLM0UxRmo4KaofvkxrBlldOt6TQLk/wNfY4bYOLM qoFReUnFDfPZpMXCvqFwUO0/AczyotXhs/4Ps+feddwFKlKKKY7Ze8Y+x59macuBJTZ1 h0ZJ1pPyGezkrwy59w2eDRWLdD9S3yOcxcqF2TzJkXaeokY4Ce4uE5mSPgFPyoRa+APG wGcCvIAGgvdEP5BLHwby8DHESpdsRW2fK0/S9QzkxHbaPjqdRm7gvtBUa/DeiSRRBdC+ NAGxhkTRh5q1GOJvLC0BcAqOQph770D88dyB/kluBfxRnVOgn4XX1X0neUEC+CmZsmdO niZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=//WP5NyEkM2KZxOSONWiz5eSL4w73b2EWWIfjaJEJ4I=; b=pmRfii/Djg9lGeP9hJ9UUb9BxEVnkN9cWNj660rByeODQNX6j6alWUuUh38JFKdVjV zwmeHEYMVNXQJhbBNwd/eLE54Cep8pI+S7R9ZhjA+TTv6KwLRBYHPbyxC2lwwrEHLRoS fTBQcFqCbAU30NRfu98KOGAtmjkTW1RlcWOMIfh2VNO09egOYjpq1mtY8wrEkZiJiOoq +Wmdoyi9SMslsJr7GWMI0ZWhDIdcQ091dkBIdrWYZ3SdGLoKtX2GnbBIXUG2kui7AqCC jLT38DRzOD9RYY346p7Hn8mV7d3+oZ9kLAcUgoqsSZAq5pVCAr/spxbNOzKBBGfwO1t0 Fw9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rHRZ6ets; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v9si2568028ejh.703.2021.05.27.09.09.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 May 2021 09:09:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rHRZ6ets; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmIZD-0003By-AP for patch@linaro.org; Thu, 27 May 2021 12:09:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmITq-0004tn-Mo for qemu-devel@nongnu.org; Thu, 27 May 2021 12:03:30 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:54004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmITl-0000L0-H5 for qemu-devel@nongnu.org; Thu, 27 May 2021 12:03:30 -0400 Received: by mail-wm1-x331.google.com with SMTP id h3so514674wmq.3 for ; Thu, 27 May 2021 09:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=//WP5NyEkM2KZxOSONWiz5eSL4w73b2EWWIfjaJEJ4I=; b=rHRZ6etsOQ+AvtW+bBjoS+rC8NH9LKcwBlL1noc1rDWd9+ak9L4XOzB5vB512aG88p sdQIfQ/XpyAZzQ2yvvRxq3B9QymVXeTKI5oziUF+K6bRQtWEr4yPyKsmZweNjyv6tQHZ gjKnKmniI0VI9Af8PEaYDX5i1QV7L2yCJx9fnO8oxZ2QtoK38HK0//DyvaBmiiLj74rL SNFs+GRagkahQX2xZwMYm/G0HxoXHzetvoYU/zidCZOJpyL6PTiY1LwC04Jkq4rPI0A4 Ym976A+E2G/Kw74B4F2r8Vm3aRUE5v53d/QM0F8i3Ac7h8YiEsYzWjZR6miiVm7Ud913 S0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=//WP5NyEkM2KZxOSONWiz5eSL4w73b2EWWIfjaJEJ4I=; b=YSLU+l6gviLifpdedSNyH804sYxzd0H4k4P9upB23jZ5PHyIXHqoQwKWu+XAq+fTGI DWQPWrd02qJYmg9RwIrQaKGICbV2hK3m2cr0HPRwoC2y8jdBZBjGPSHpT4G1RUYHMpNd Eyj3OXztMQRe93/xpjXTCmWfyb0/hnzTgmawd4IgrSSfWzoJTTLNKJfLlvgpKWyx0raQ mpwhSR4EbXeSmgvSaOMf0TDuc3Pb6xb7+NHk+ANrWSpSezPZ+HIG06GhhKfduEt2d7Ac cMaNTs7oqECuuUFFwCSGeaYLN1UDyzYqHxRhZ3U5n0YbdUKLjdu1AGt7sQLGdVor1fs2 YYgQ== X-Gm-Message-State: AOAM530B5XUQOSTUS17BOrfQ9og5Y3+7o8yTZa/jcnqr7w6q1HSeHbnT /hq2QSqJqpPTXX3iFuEiE4N5rA== X-Received: by 2002:a1c:dc85:: with SMTP id t127mr2805019wmg.179.1622131403765; Thu, 27 May 2021 09:03:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q11sm4137559wrx.80.2021.05.27.09.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 09:03:20 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ABE351FF8F; Thu, 27 May 2021 17:03:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/6] tests/tcg/configure.sh: tweak quoting of target_compiler Date: Thu, 27 May 2021 17:03:16 +0100 Message-Id: <20210527160319.19834-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210527160319.19834-1-alex.bennee@linaro.org> References: <20210527160319.19834-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Cc: Thomas Huth --- tests/tcg/configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 Reviewed-by: Thomas Huth 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