From patchwork Mon Jun 7 14:32:58 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: 455295 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp2802676jae; Mon, 7 Jun 2021 07:36:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylcbU7uuOVRtOa6Dpjz4CxZWPqJW+iDEeCePEhJ/C1DbLrDc+lWSp+KBctdyPCnkDRh2UV X-Received: by 2002:a05:6e02:f41:: with SMTP id y1mr15012112ilj.305.1623076587308; Mon, 07 Jun 2021 07:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623076587; cv=none; d=google.com; s=arc-20160816; b=QQQZnsDn16Dtmt6Zx7hyvkewfJBjosvRoXOabtbqnTMeNcbnXOXcg/QRwziK4Mg2d7 EhBPjtwm5sRnbKCiBlPUVyM4giAt8vLUDiEtL+vHg+TNJECdEchgwCdgUQ4EIJHdTglY MjKGwlDnOVw1kBp5aBIj78EH8dke7D23x3G2g4CPOgjLBQkdvQs0xF30rSF9KFI/z8OR A0Km+dYhjvQToaXmtKatPlgPjx5vcK974rCjZ7g5a7O6PfwqahicgEODYvps9PrEVKkd Lttb7CiSHXd+swwjHWZDl7Zcsahk29XXvpu+cYMCcTyrqIE5ahJKu2B41jYvXyJ8lOm6 cnyw== 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=j3NTNXz+uS7lfDmWPW0+9MGKzWKidvbpOVLTCYmft64=; b=s26WNB7ijw+qnPVdplyJj/4bH2Iy+UCd7w32gm0ByZ0MUbx7D7J0WkymchOTidxxv8 VJ8CsEMsScI0bTOtDargp5aqTUl9Y+nu4bBzsp0YEF02U9qrIJ6DN0rnQn/NjURX8lKz eDA2PCyk7EgJMQF7ADH9MZotMZr4CWvRdZaCFirBlEaBgxZffUdCIURgnyOvTkaJp74m p4PJ46awl4T8JKUhVGIs8nb+9ZCHmGgl9cV410E/ck/sSGy8GTNx3WKMUDGOSB7poKmZ /Y7ztp2I4umJs/lYBUTuVgMsGaNZz6kvfEr3dhOMM4+XkgWt4vPqBsfLQEF7255xJk1f xapw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=meYNdQKI; 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 n11si11402583jat.38.2021.06.07.07.36.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jun 2021 07:36:27 -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=meYNdQKI; 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]:44490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqGMc-0000Ad-NP for patch@linaro.org; Mon, 07 Jun 2021 10:36:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqGJW-00030R-PN for qemu-devel@nongnu.org; Mon, 07 Jun 2021 10:33:14 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqGJT-0000Lj-SO for qemu-devel@nongnu.org; Mon, 07 Jun 2021 10:33:14 -0400 Received: by mail-wr1-x42b.google.com with SMTP id z8so17847506wrp.12 for ; Mon, 07 Jun 2021 07:33:10 -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=j3NTNXz+uS7lfDmWPW0+9MGKzWKidvbpOVLTCYmft64=; b=meYNdQKI4kHqMN1YRia38Ifzbwju9rJXJqhQMlZf/LQgT8UQCe+tUE5Cz5WUutT7Uu Erf9w0siD/dOr2kI3EimEw7pydxMY4iSRkhA9ZphsRQ5acQ/jxzYcQXa+53uPREcg9EC I7XJ1nbGADLHENP5uUMQU0tdOs4J1TLrQkQmhR/jzkg43pijs4jul2gioulUExsQwV/1 YCz1gQHTYozdgN0zSwPv4Z8FS8EfJckU9MIm+jyuk4udLExR4tmdInCoKbkuOGl4mi5u rAfJptLertJJnIoepPhweAn6RWh5usnuJg3TeJT8ujH9Q7AYqNQe8SluSVXap6bw/MVF iS3A== 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=j3NTNXz+uS7lfDmWPW0+9MGKzWKidvbpOVLTCYmft64=; b=jje1e9R+ZuOVU5gVskavdm2d40q2Hl9JU7tJIhZwfY5fa7sYMVXvrmSbjz3LkSqbwI jzWZ6Uz9JqCaDDoGL2mj+4UrvsvUWgnxpriZfbjqJhRrLs/cUbeWDq7rsUUqZdp1gkqr KGIG8GXx7cD+PceY/7gHULwSna0Sf/NBpb4tn+Ue6i9AZHb4ewmE287GWjmWk5QMs4K6 Rbtnyhgcbp0Ix15pmCh9kzF1w0BRdcgq+OpXVssIGlmwHWd8U3RCSSrPuoy6BAzA4TqC lsmKGKWtUq8t4YvG/neLEiggUJfXBX08NPFDzFD0GBiNknQ8R879kLdRPKuLVErG+sP5 Cc/A== X-Gm-Message-State: AOAM532ZaXoj4GJ1pPo91BO+iCsUuG1itc0qgcgJXXlmLUCz4r3yONk/ XTl/fMej0ahzFbisuJ5ROIfB+Q== X-Received: by 2002:a5d:4351:: with SMTP id u17mr17296640wrr.47.1623076389566; Mon, 07 Jun 2021 07:33:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p6sm16635878wrf.51.2021.06.07.07.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 07:33:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D3C881FF8F; Mon, 7 Jun 2021 15:33:03 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 3/8] tests/tcg/configure.sh: tweak quoting of target_compiler Date: Mon, 7 Jun 2021 15:32:58 +0100 Message-Id: <20210607143303.28572-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210607143303.28572-1-alex.bennee@linaro.org> References: <20210607143303.28572-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org 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 Reviewed-by: Thomas Huth Cc: Thomas Huth Message-Id: <20210527160319.19834-4-alex.bennee@linaro.org> -- 2.20.1 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