From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 8DE61386DC6F for ; Mon, 27 Jun 2022 06:09:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8DE61386DC6F Received: from [192.168.124.21] (unknown [113.140.11.126]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 6B64866807; Mon, 27 Jun 2022 02:09:42 -0400 (EDT) Message-ID: <664e8a9fa34de7dd51c18c67e5b3786818165ab1.camel@xry111.site> Subject: [PATCH v2 3/7] libbacktrace: use grep instead of fgrep From: Xi Ruoyao To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Arnaud Charlet , Bernhard Reutner-Fischer , Jonathan Wakely Date: Mon, 27 Jun 2022 14:09:40 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, GIT_PATCH_0, LIKELY_SPAM_FROM, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_PDS_OTHER_BAD_TLD, 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-List-Received-Date: Mon, 27 Jun 2022 06:09:47 -0000 fgrep has been deprecated in favor of grep -F for a long time, and the next grep release (3.8 or 4.0) will print a warning of fgrep is used. But, we can't simply replace fgrep to grep -F, or the build will break with some non-GNU grep implementations (lacking -F support). As "add-gnu-debuglink" is definitely not a non-trivial regex, simply replace fgrep with grep. libbacktrace/ChangeLog: * configure.ac (AC_PROG_FGREP): Use grep instead of fgrep. * configure: Regenerate. --- libbacktrace/configure | 2 +- libbacktrace/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libbacktrace/configure b/libbacktrace/configure index 17f470a4bec..537486d34f2 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -13831,7 +13831,7 @@ else libbacktrace_cv_objcopy_debuglink=3Dno elif ! test -n "${OBJCOPY}"; then libbacktrace_cv_objcopy_debuglink=3Dno -elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then +elif ${OBJCOPY} --help | grep add-gnu-debuglink >/dev/null 2>&1; then libbacktrace_cv_objcopy_debuglink=3Dyes else libbacktrace_cv_objcopy_debuglink=3Dno diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac index 597c9705db8..857987a2859 100644 --- a/libbacktrace/configure.ac +++ b/libbacktrace/configure.ac @@ -500,7 +500,7 @@ AC_CACHE_CHECK([whether objcopy supports debuglink], libbacktrace_cv_objcopy_debuglink=3Dno elif ! test -n "${OBJCOPY}"; then libbacktrace_cv_objcopy_debuglink=3Dno -elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then +elif ${OBJCOPY} --help | grep add-gnu-debuglink >/dev/null 2>&1; then libbacktrace_cv_objcopy_debuglink=3Dyes else libbacktrace_cv_objcopy_debuglink=3Dno --=20 2.36.1