public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: gcc-patches@gcc.gnu.org
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Arnaud Charlet <charlet@adacore.com>,
	Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
	 Jonathan Wakely <jwakely@redhat.com>
Subject: [PATCH v2 3/7] libbacktrace: use grep instead of fgrep
Date: Mon, 27 Jun 2022 14:09:40 +0800	[thread overview]
Message-ID: <664e8a9fa34de7dd51c18c67e5b3786818165ab1.camel@xry111.site> (raw)
In-Reply-To: <fb82297845486b14d51905ae3df8dbba726fcf57.camel@xry111.site>

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=no
 elif ! test -n "${OBJCOPY}"; then
   libbacktrace_cv_objcopy_debuglink=no
-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=yes
 else
   libbacktrace_cv_objcopy_debuglink=no
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=no
 elif ! test -n "${OBJCOPY}"; then
   libbacktrace_cv_objcopy_debuglink=no
-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=yes
 else
   libbacktrace_cv_objcopy_debuglink=no
-- 
2.36.1



  parent reply	other threads:[~2022-06-27  6:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  6:04 [PATCH v2 0/7] Avoid using obsoleted egrep/fgrep Xi Ruoyao
2022-06-27  6:07 ` [PATCH v2 1/7] config: use $EGREP instead of egrep Xi Ruoyao
2022-07-05  0:58   ` Hans-Peter Nilsson
2022-07-08  3:46   ` Eric Gallager
2022-06-27  6:09 ` [PATCH v2 2/7] fixincludes: use grep instead of egrep/fgrep Xi Ruoyao
2022-06-27  9:54   ` Eric Gallager
2022-06-27  6:09 ` Xi Ruoyao [this message]
2022-06-27  9:07   ` [PATCH v2 3/7] libbacktrace: use grep instead of fgrep Jonathan Wakely
2022-06-27 20:00   ` Ian Lance Taylor
2022-06-27  6:10 ` [PATCH v2 4/7] fortran: " Xi Ruoyao
2023-05-10 19:29   ` Bernhard Reutner-Fischer
2023-05-10 20:02     ` Thomas Koenig
2023-05-11  9:01       ` Pushed: " Xi Ruoyao
2022-06-27  6:11 ` [PATCH v2 5/7] testsuite: stop using obsoleted egrep Xi Ruoyao
2022-06-27  6:50   ` Arnaud Charlet
2022-06-27  6:12 ` [PATCH v2 6/7] contrib: use grep -E instead of egrep Xi Ruoyao
2022-06-27  9:02   ` Jonathan Wakely
2022-06-27  6:14 ` [PATCH 7/7] libffi: Use $EGREP " Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=664e8a9fa34de7dd51c18c67e5b3786818165ab1.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=charlet@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=rep.dot.nop@gmail.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).