From patchwork Thu May 18 12:56:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 95855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp470093vqo; Thu, 18 May 2023 05:58:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HtI1cKCRi8/voGJlq3WCzpmuGxYFJ/kiBGWgDzoORBckyzkjTZPbpIaJtbY9R9FZOoXpX X-Received: by 2002:aa7:d650:0:b0:50c:161b:9154 with SMTP id v16-20020aa7d650000000b0050c161b9154mr5077235edr.11.1684414711058; Thu, 18 May 2023 05:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684414711; cv=none; d=google.com; s=arc-20160816; b=m4AVrOGNoMjGOsEJ9YnM/U8ctF+9VZCcws3Qy1OzBcGYky7tlRTQN/P7z8dDwecYD6 gTJ9g7kSVX2S5MLf/+J/uJWxi8FO0neTGdk6GkuEFRgQv/BAh/EggwAoDvZ9c6SugXGd 9IgpNH77ZI5Af67k12oKNcwi5MlOHTbpvLo1H+hKtcr6J7+aII4bT1U3vXCc/SjuHEV7 2dKxq2+dfXrVhO6sdaKMUzk8l8nklM8vZ2WfSH9Zco2BZXG80u5ECw1oy7m+P8KBWEuk bl0CZOFKO03A07+7WqhQYYo9BGllvRvEroawvZQQlbV6XYoCCDMnlIKu8u87nzhCkHqv kdeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from: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:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=fXw9lPVaAy1IYgpM7M57YSQWon89psmDZEVu8VNqVto=; b=MAlRdsabFQDHkr2+yO/YO0CJFTmYg+GrfjU0i+mFCy++VvfFMaD2en3iH2bNQFxR8B FjL4TmANXpxWVMXMa/+V76ZlSt2BNSS0XXwQaFGe7aSMAc9iqjAK9mYXPK80mVuerQeS yH/MIC+c9v2dKtP15ZXnVknqUJV3MDJG9BiLsvTFNM4HJUu21hM6J/VBxS5cZsMDKWyp TR0VvfXVay6FgQg2BiVpTf8AAA83m3MuHpeRcfoPZQVYK1cGYtRg4zFpVP6I9ctIjyRo fSTS9bBnM/pzUUqPmHV3eeUKdNDxgacSZc847NDYkBN1ijhg5hLyeRW+QOsTEtQC5cDX Baig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ToSQ23oe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q18-20020aa7d452000000b0050be175db61si1045999edr.189.2023.05.18.05.58.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 05:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ToSQ23oe; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2ADC038432D4 for ; Thu, 18 May 2023 12:57:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ADC038432D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684414662; bh=fXw9lPVaAy1IYgpM7M57YSQWon89psmDZEVu8VNqVto=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ToSQ23oeis+z1sGdsM5yHo0GrKkCfrEZikRL7WR7Nc2yomTU3OfAA6InAB5v/XTvr 1ZEd/PLJHc3MQcnUmr5TvmS09vghk8W59s6OfPVf9r0r5OESTkkAGlqeSvLIDi1LsE Bg+zfxpHSiG33+rvG4OxYkXqsOE52hZ58yxuyie0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6A1573858401 for ; Thu, 18 May 2023 12:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A1573858401 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-204-teY1d37MMmmXZMnP4SZV7A-1; Thu, 18 May 2023 08:56:51 -0400 X-MC-Unique: teY1d37MMmmXZMnP4SZV7A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F070196EF8D; Thu, 18 May 2023 12:56:51 +0000 (UTC) Received: from localhost (unknown [10.42.28.213]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C659C15BA0; Thu, 18 May 2023 12:56:51 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Michael_B=C3=A4uerle?= Subject: [PATCH 1/3] gcc: Fix nonportable shell syntax in "test" and "[" commands [PR105831] Date: Thu, 18 May 2023 13:56:45 +0100 Message-Id: <20230518125647.2105203-2-jwakely@redhat.com> In-Reply-To: <20230518125647.2105203-1-jwakely@redhat.com> References: <20230518125647.2105203-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, PP_MIME_FAKE_ASCII_TEXT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766236839259319727?= X-GMAIL-MSGID: =?utf-8?q?1766236840256428419?= From: Michael Bäuerle POSIX sh does not support the == for string comparisons, use = instead. gcc/ChangeLog: PR bootstrap/105831 * config/nvptx/gen-opt.sh: Use = operator instead of ==. * configure.ac: Likewise. * configure: Regenerate. --- gcc/config/nvptx/gen-opt.sh | 2 +- gcc/configure | 2 +- gcc/configure.ac | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/nvptx/gen-opt.sh b/gcc/config/nvptx/gen-opt.sh index dc10722b96f..cab73f5e663 100644 --- a/gcc/config/nvptx/gen-opt.sh +++ b/gcc/config/nvptx/gen-opt.sh @@ -56,7 +56,7 @@ EnumValue Enum(ptx_isa) String(sm_$sm) Value(PTX_ISA_SM$sm) EOF - if [ "$sm" == "$last" ]; then + if [ "$sm" = "$last" ]; then # Don't end with trailing empty line. continue fi diff --git a/gcc/configure b/gcc/configure index 191f68581b3..5f67808b774 100755 --- a/gcc/configure +++ b/gcc/configure @@ -6409,7 +6409,7 @@ _ACEOF if test "$enable_largefile" != no; then case "$host, $build" in *-*-aix*,*|*,*-*-aix*) - if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then + if test "$ac_cv_sizeof_ino_t" = "4" -a "$ac_cv_sizeof_dev_t" = 4; then $as_echo "#define HOST_STAT_FOR_64BIT_INODES stat64x" >>confdefs.h diff --git a/gcc/configure.ac b/gcc/configure.ac index 075424669c9..cc8dd9e20bf 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -473,7 +473,7 @@ AC_CHECK_SIZEOF(dev_t) if test "$enable_largefile" != no; then case "$host, $build" in *-*-aix*,*|*,*-*-aix*) - if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then + if test "$ac_cv_sizeof_ino_t" = "4" -a "$ac_cv_sizeof_dev_t" = 4; then AC_DEFINE(HOST_STAT_FOR_64BIT_INODES, stat64x, [Define which stat syscall is able to handle 64bit indodes.]) fi;; From patchwork Thu May 18 12:56:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 95854 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp470089vqo; Thu, 18 May 2023 05:58:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EHVE3t74dz/1TM4+mDHyynoRkRzGsWHXp5S1kgzl4qukWkRabiUSwOc0mvWhXf/V4INMQ X-Received: by 2002:a17:907:9405:b0:94f:5e17:e80d with SMTP id dk5-20020a170907940500b0094f5e17e80dmr41544452ejc.45.1684414710436; Thu, 18 May 2023 05:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684414710; cv=none; d=google.com; s=arc-20160816; b=IJmxefMU5kKcdUp9RtQ0LV7fczrM8RNxCuyJ7wG7Nzm9p5USBFlgHV5trwpBd8ilMM Gi2jn7BpB4BGizopHfvyjqxTaOtoK3NUVUdyRj3EKo3zjOUXSzO8gaf7/XoQf2R/IQgs UGFrnGUdDZtwHdQrz3Io0aFM9sxBmLEqa3XnvERyHdSjwY/uJwrXWrNtVCnc5v4nG7sS v/v3iJnDZ1nQAyYyNc2qb2JHjeBenl0ZomEwQZpsyJ/T/Rov8OcLdkaFzQD2TXLMoc3G egVBhIG/o1lXI/CbmhvBNuOpvX/aNl9CfnseZQMWxAXZ+QZrVUK735qhOdg8Lu3+hqa0 9p9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=yZpTRIdSTv5+R5gEIQSr2mOSpL3Uh1V7NwVCpq7t9c8=; b=Eff/LeHYi6NX90FCvXtmmKAPdcqy2wT7hRZlhW7AW1vd8JUaltH9NE3DNKAlXgA/bQ +04/nuvKu7ZluzaoHDK0EfvGlvv5hTCUyRU2ZgqZo6jQYRCmC5G9ZNRX4/iyO7Dxu3Tp SLxjTVGjU969yvs87bJ725XhO1tifNKsnrsZH1QduyK+SwOYr3i/kZHt3F0HOfiLgN7A Z5vQUrW5JjW2NNPsRjcB0HRVHdp7RgCKeQkeCFqhioHwPw34L5pPWknQd3343Cd4wmov Eh2QzT5IcLY3P227vZ2Ypk+Pg67bL3QRGLfcR500plSPYEQafh57oMdKEX5gwg7s2GoT I2yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lEWuOG2g; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gn11-20020a1709070d0b00b0096f41a4fddfsi702734ejc.507.2023.05.18.05.58.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 05:58:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lEWuOG2g; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B5E53882652 for ; Thu, 18 May 2023 12:57:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B5E53882652 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684414661; bh=yZpTRIdSTv5+R5gEIQSr2mOSpL3Uh1V7NwVCpq7t9c8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=lEWuOG2gd6PH3PVta3xvlnaKEmDpCWsUfNNvfXyDCodyrdlt6HA8EYtQg3TALzpO5 kaPHemwDlJXn6lhlEfg86rPMWeCDxg8/XKan2+Wfh+Cbl7BDI/MIk1noCcFTZoQjG0 4L9Udf2JuUSgppZ8BToaTSlK4xNjGUJuAHoqT47c= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 112D73858C5F for ; Thu, 18 May 2023 12:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 112D73858C5F Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-462-YCCX76jOPoWu55WW6N70xQ-1; Thu, 18 May 2023 08:56:53 -0400 X-MC-Unique: YCCX76jOPoWu55WW6N70xQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C7C3A85C074 for ; Thu, 18 May 2023 12:56:52 +0000 (UTC) Received: from localhost (unknown [10.42.28.213]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86272492B01 for ; Thu, 18 May 2023 12:56:52 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/3] gcc: Fix nonportable shell syntax in "test" and "[" commands [PR105831] Date: Thu, 18 May 2023 13:56:46 +0100 Message-Id: <20230518125647.2105203-3-jwakely@redhat.com> In-Reply-To: <20230518125647.2105203-1-jwakely@redhat.com> References: <20230518125647.2105203-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766236839259319727?= X-GMAIL-MSGID: =?utf-8?q?1766236839259319727?= POSIX sh does not support the == for string comparisons, use = instead. The gen_directive_tests script uses a bash shebang so == does work, but there's no reason this script can't just use the more portable form anyway. PR bootstrap/105831 gcc/ChangeLog: * config.gcc: Use = operator instead of ==. gcc/testsuite/ChangeLog: * gcc.test-framework/gen_directive_tests: Use = operator instead of ==. --- gcc/config.gcc | 2 +- gcc/testsuite/gcc.test-framework/gen_directive_tests | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index e08c67d7cde..d88071773c9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2441,7 +2441,7 @@ riscv*-*-elf* | riscv*-*-rtems*) tmake_file="${tmake_file} riscv/t-rtems" ;; *) - if test "x${with_multilib_generator}" == xdefault; then + if test "x${with_multilib_generator}" = xdefault; then case "x${enable_multilib}" in xno) ;; xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;; diff --git a/gcc/testsuite/gcc.test-framework/gen_directive_tests b/gcc/testsuite/gcc.test-framework/gen_directive_tests index 29f0a734877..87b3f3d1b40 100644 --- a/gcc/testsuite/gcc.test-framework/gen_directive_tests +++ b/gcc/testsuite/gcc.test-framework/gen_directive_tests @@ -283,8 +283,8 @@ one() { echo "${GOOD_PROG}" >> $FILE1 echo "${GOOD_PROG}" > $FILE2 - if [ "${FAIL_VERSION}" == "yes" ]; then - if [ "${EXP}" == "${EXP_PASS}" ]; then + if [ "${FAIL_VERSION}" = "yes" ]; then + if [ "${EXP}" = "${EXP_PASS}" ]; then NAME=${KIND}-${EXP_FAIL} else NAME=${KIND}-${EXP_XFAIL} @@ -322,8 +322,8 @@ two() { echo "${GOOD_PROG}" >> $FILE1 echo "${GOOD_PROG}" > $FILE2 - if [ "${FAIL_VERSION}" == "yes" ]; then - if [ "${EXP}" == "${EXP_PASS}" ]; then + if "yes" ]; then + if [ "${EXP}" = "${EXP_PASS}" ]; then NAME=${KIND1}-${KIND2}-${EXP_FAIL} else NAME=${KIND1}-${KIND2}-${EXP_XFAIL} @@ -364,8 +364,8 @@ three() { echo "${GOOD_PROG}" >> $FILE1 echo "${GOOD_PROG}" > $FILE2 - if [ "${FAIL_VERSION}" == "${yes}" ]; then - if [ "${EXP}" == "${EXP_PASS}" ]; then + if [ "${FAIL_VERSION}" = "${yes}" ]; then + if [ "${EXP}" = "${EXP_PASS}" ]; then NAME=${KIND1}-${KIND2}-${KIND3}-${EXP_FAIL} else NAME=${KIND1}-${KIND2}-${KIND3}-${EXP_XFAIL} From patchwork Thu May 18 12:56:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 95856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp470674vqo; Thu, 18 May 2023 05:59:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Cg6J+MS06ivH4QoHQ91P39MbhJPJGj5Ao1RS/NQaty5ZHS1qpQiioh07Bg7nKJN781KYq X-Received: by 2002:a17:906:9b88:b0:96a:8a7f:4aa5 with SMTP id dd8-20020a1709069b8800b0096a8a7f4aa5mr26587908ejc.18.1684414778304; Thu, 18 May 2023 05:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684414778; cv=none; d=google.com; s=arc-20160816; b=DogyLrdC3PPUARoDiz9AvuxsAr5yWKub7N3cNy13riRD7ovOHkAucX6WWrR32jRfr8 2Tg+7hxw162bJ49Q49sA12osBwx6UT3pe6Kc6O3aH/dpUSu9fz0kq7zl9ClGf1RdlakL NBcFNOxYAuR6NSKAsDE+BViFX0Yy7rjMVvZFs6z2nHUuhzXgBPgo6eIxqYx8L1df7Yee yxuL4j5nBf8meGwGohFVy0l+qz+q3GeovcWuJKiFekPVE5sLw4azAgcKAmJBfmT6mebu kIBPqJ/U3ZWPep7x0VCoILnnqUuPmw3JyLf7NX92pV9ZqlChI6px3AHAfJjzdqutv9Hm Mwzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from: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:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=c32aHhoNhDUZEBw/3QnwBVxbozePgAT2pxEyet4e1u8=; b=B/R7IEdE5c3un1G1d+2x1jUIs68AEBlJi36SUMeWml5zcYKjtchFvmNTgZ7+KrSojR Tq52M58EFBGyLq53b5+1z2NnRtN5bsQ7A9Eq5K4l2/py2uVFNGkwsX+wUGEVUG+4hRlP MyJ3V6sMqqwbcxj63ORLrBZ/4JXz7x85cxusNj7AVWsgaS+5riZ9MYc6+rqmZ9lIu9vX m2D7C2gDqAthp9DL4cQQXIQmJSbxDTVSX6mvieUP2xIXxb2IT8OXdauGA86I4J1sekaN WqPunOyMuxYiBvLWKaWeF+NaEPF59/4yMUiu5Oc1D3e4mZO5AK87hM7p2a5s+GilNPgy C9ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=S7KZyc2v; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f15-20020a056402160f00b0050bc115779esi931702edv.647.2023.05.18.05.59.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 05:59:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=S7KZyc2v; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1720A3846444 for ; Thu, 18 May 2023 12:58:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1720A3846444 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684414720; bh=c32aHhoNhDUZEBw/3QnwBVxbozePgAT2pxEyet4e1u8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=S7KZyc2vtrCH4jNzFDyykT2E4J0l+pHuLSr9qntmtkzdLHWxm/fpYb8BL16Tq9D8r aikyt8Sda9dJsdDr6qCWatt1fLANnvlBQoFi4GFTVShOThZ9OtqjNH34vdueko/br3 DovZgJZU27hpwTcPjPWWOS+iGhkJtlmzZvt7m/98= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7C3683858434 for ; Thu, 18 May 2023 12:56:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C3683858434 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-98-ZA7R9IfDNx6jPL1o6VF3Ew-1; Thu, 18 May 2023 08:56:55 -0400 X-MC-Unique: ZA7R9IfDNx6jPL1o6VF3Ew-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C131B80269A for ; Thu, 18 May 2023 12:56:54 +0000 (UTC) Received: from localhost (unknown [10.42.28.213]) by smtp.corp.redhat.com (Postfix) with ESMTP id 632871415304 for ; Thu, 18 May 2023 12:56:54 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/3] contrib: Fix nonportable shell syntax in "test" and "[" commands [PR105831] Date: Thu, 18 May 2023 13:56:47 +0100 Message-Id: <20230518125647.2105203-4-jwakely@redhat.com> In-Reply-To: <20230518125647.2105203-1-jwakely@redhat.com> References: <20230518125647.2105203-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766236910633583651?= X-GMAIL-MSGID: =?utf-8?q?1766236910633583651?= POSIX sh does not support the == for string comparisons, use = instead. These contrib scripts all use a bash shebang so == does work, but there's no reason they can't just use the more portable form anyway. PR bootstrap/105831 contrib/ChangeLog: * bench-stringop: Use = operator instead of ==. * repro_fail: Likewise. contrib/reghunt/ChangeLog: * bin/reg-hunt: Use = operator instead of ==. --- contrib/bench-stringop | 4 ++-- contrib/reghunt/bin/reg-hunt | 2 +- contrib/repro_fail | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/bench-stringop b/contrib/bench-stringop index daf1bce6e6f..f058e066b3a 100755 --- a/contrib/bench-stringop +++ b/contrib/bench-stringop @@ -87,7 +87,7 @@ test "$2" "$3" "-mstringop-strategy=rep_byte -malign-stringops" rep1 test "$2" "$3" "-mstringop-strategy=rep_byte -mno-align-stringops" rep1noalign test "$2" "$3" "-mstringop-strategy=rep_4byte -malign-stringops" rep4 test "$2" "$3" "-mstringop-strategy=rep_4byte -mno-align-stringops" rep4noalign -if [ "$mode" == 64 ] +if [ "$mode" = 64 ] then test "$2" "$3" "-mstringop-strategy=rep_8byte -malign-stringops" rep8 test "$2" "$3" "-mstringop-strategy=rep_8byte -mno-align-stringops" rep8noalign @@ -109,7 +109,7 @@ echo " $best" test_all_sizes() { -if [ "$mode" == 64 ] +if [ "$mode" = 64 ] then echo " block size libcall rep1 noalg rep4 noalg rep8 noalg loop noalg unrl noalg sse noalg byte PGO dynamic BEST" else diff --git a/contrib/reghunt/bin/reg-hunt b/contrib/reghunt/bin/reg-hunt index 6427535dabe..aff4e9005b5 100755 --- a/contrib/reghunt/bin/reg-hunt +++ b/contrib/reghunt/bin/reg-hunt @@ -142,7 +142,7 @@ process_patch () { # build failures, quit now. if [ ${SKIP} -eq 0 ]; then - if [ "x${REG_NEWMID}" == "x" \ + if [ "x${REG_NEWMID}" = "x" \ -o ${TEST_ID} -eq ${LATER_THAN} \ -o ${TEST_ID} -eq ${EARLIER_THAN} ]; then error "build failed for ${TEST_ID}" diff --git a/contrib/repro_fail b/contrib/repro_fail index 9ea79f2bccf..abb479d08aa 100755 --- a/contrib/repro_fail +++ b/contrib/repro_fail @@ -42,10 +42,10 @@ if [ $# -lt 2 ] ; then exit 1 fi -if [ "$1" == "--debug" ] ; then +if [ "$1" = "--debug" ] ; then debug_args="-wrapper gdb,--args" shift -elif [ "$1" == "--debug-tui" ] ; then +elif [ "$1" = "--debug-tui" ] ; then debug_args="-wrapper gdb,--tui,--args" shift else