From patchwork Thu Sep 22 16:35:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 608257 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp508614pvb; Thu, 22 Sep 2022 11:42:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7JgwvkKPeTm34RXYpcM6rlcgsnI6gsex1G+6U2KHpttA3EiPoPW2RsdrRvEfpB2d2DcxNW X-Received: by 2002:a05:622a:ce:b0:35c:f5de:3976 with SMTP id p14-20020a05622a00ce00b0035cf5de3976mr4018042qtw.437.1663872153719; Thu, 22 Sep 2022 11:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663872153; cv=none; d=google.com; s=arc-20160816; b=KfUG4sQAA8xWTZLhvtQp81Ycr9RQqYXwMZNC2/tjhYlJbJkdrY281uo3UsvuUMCpEw H/C5to1f64sh/sDHDhnBAngRfTliOr7xiGFsGcH+loblQh2J+0A8/ngPZxNGEoD6OIy8 3WgBxEs73YNg8/W8XwLHX+mjO5n5kDm0H+eUN3PHOT2+E6N7XrbWrfLHKPTYLNwabpPL 0iLHTh0x0slYK3gom+RPZ0B42as4P3aN5LxMufihjrNdtI/1n6GsZ6ZLLqRcMFlNb81D QO7PNaKoo+yakzcxTXgcwItV0bxWdOkZPRxoo1fgZq91o0Il62SMjpKaUscT1ji7RwpF 7Mfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=L95wwHp5RV6cXArMSmbL8Hcv0LZd0gpd8eOHxANOlTY=; b=FmnFgywqYtYvtG+eyM6SWQF9GwK0QK+eSRscOChLUpUhkbatvhp8IO86x+6m8bTwDw /t3nrxXuS3CTEMv1FroQmfhfOG/zrVNi7CWJKlKHDdSTzXZSLqiaKVNfMvxMSKVo0YUS 8Ud/uc/rSXpMO7rq02QTl2fimzNq39i9YvgFPgeUzRw0/uBfyQH4UHDzNLFGfgvuQsLF vfxA69EzWflkGJk00nuLIIh1xqW6ZfLd9FEI9FrWpjFecJ82/hvrwY3qc+akc+TIhLaS x8h+ui5/4Ep48Jri310fiKbQrklKEO1VbtKu/SNq+MhI7mVA7vGi640v4INqUoJTaizL CQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T4WuxWu4; 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=pass (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 eo6-20020ad45946000000b004acc3656bc1si3329586qvb.525.2022.09.22.11.42.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Sep 2022 11:42:33 -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=pass header.i=@linaro.org header.s=google header.b=T4WuxWu4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obR9d-0004S1-9F for patch@linaro.org; Thu, 22 Sep 2022 14:42:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obPBK-0002GB-Pf for qemu-devel@nongnu.org; Thu, 22 Sep 2022 12:36:14 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:46001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obPBG-0005Tz-Ar for qemu-devel@nongnu.org; Thu, 22 Sep 2022 12:36:09 -0400 Received: by mail-wr1-x42f.google.com with SMTP id n10so16378754wrw.12 for ; Thu, 22 Sep 2022 09:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date; bh=L95wwHp5RV6cXArMSmbL8Hcv0LZd0gpd8eOHxANOlTY=; b=T4WuxWu4T+efzCv8zFpGd9SXJYRNyS4n/SHP63xgXMNVFMseumXdX9Nf5DLrYgaUO2 YNAhg3/hx4CyD4jfWNXyP3VrtvPfMMrytVVrLb/oIxaiY5D16Zt3IbLCFUDS8/JAgFoU 2gHdQtcEBffmN/SJ+ZkSXZhHRagOhIFSnFsuFCD1q/rJi44V/E7uW0Un89i/eJFfZ0Kq NZGb1palhVXFA0a1kTn443iFzp/OK1Soq4srk58bLMxFjrM4FdToG83N6unAkZficdrR 3UwmW4Zxd1zKnKMuaOR5uh1F1EJMSejbeRXYZ+SLBisVsbD6W4xwuQICrrOA4N7fXOw3 yrFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=L95wwHp5RV6cXArMSmbL8Hcv0LZd0gpd8eOHxANOlTY=; b=zD9kH0dEdLyDKlssp1IjY1HlTj504Ye8kVlQbA4ZUz2zPXO53qgAvTBTPvclYXptAX XlBxR8nO+UYmwHZAT/RivySZLLP3o9MwWG6x/N77YgWZKiOX+qdovrZbSCfNS/LXkfp0 VrfQj0uQsu4z4+PXSC5TCb4KiVd4TMgIZbJNx7sLiS8UcWHJRyphU0AuN4gsiirLUJ8R YiDSONbURExizCcIV/TbaMp+OTkwYJ9J5rZliFpmxNBUsbLpEgwDG6zN2sIsj2rKG+ep dgFNJJYy0hbvX58niHAlVmO2BpwZDfvLJaUREQgSe1OVxpaXIWIlkujcnpZLKXKJEJUm ZnBw== X-Gm-Message-State: ACrzQf2BTaR9F279PpU/UyRVsZwWby01gZrlrzZkUSHcg1Kg1H6yAV9K Og+KAwGPc8I5SQ5Xe7eN2HPXXINLk8jK1g== X-Received: by 2002:adf:a50e:0:b0:22a:ede1:57e with SMTP id i14-20020adfa50e000000b0022aede1057emr2542517wrb.63.1663864563111; Thu, 22 Sep 2022 09:36:03 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id iw1-20020a05600c54c100b003b3401f1e24sm6452599wmb.28.2022.09.22.09.36.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 09:36:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 39/39] configure: Avoid use of 'local' as it is non-POSIX Date: Thu, 22 Sep 2022 17:35:36 +0100 Message-Id: <20220922163536.1096175-40-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922163536.1096175-1-peter.maydell@linaro.org> References: <20220922163536.1096175-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We use the non-POSIX 'local' keyword in just two places in configure; rewrite to avoid it. In do_compiler(), just drop the 'local' keyword. The variable 'compiler' is only used elsewhere in the do_compiler_werror() function, which already uses the variable as a normal non-local one. In probe_target_compiler(), $try and $t are both local; make them normal variables and use a more obviously distinct variable name for $t. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220825150703.4074125-8-peter.maydell@linaro.org --- configure | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/configure b/configure index b39561b2ed7..cc4ecd6008b 100755 --- a/configure +++ b/configure @@ -110,7 +110,7 @@ error_exit() { do_compiler() { # Run the compiler, capturing its output to the log. First argument # is compiler binary to execute. - local compiler="$1" + compiler="$1" shift if test -n "$BASH_VERSION"; then eval ' echo >>config.log " @@ -2065,7 +2065,6 @@ probe_target_compiler() { : ${container_cross_strip:=${container_cross_prefix}strip} done - local t try try=cross case "$target_arch:$cpu" in aarch64_be:aarch64 | \ @@ -2078,8 +2077,8 @@ probe_target_compiler() { try='native cross' ;; esac eval "target_cflags=\${cross_cc_cflags_$target_arch}" - for t in $try; do - case $t in + for thistry in $try; do + case $thistry in native) target_cc=$cc target_ccas=$ccas