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
Subject: [PATCH 1/8] config: use grep -E instead of egrep
Date: Fri, 24 Jun 2022 14:58:45 +0800	[thread overview]
Message-ID: <b0689e5ff8dbb150ec21d2a618a1260798138a7d.camel@xry111.site> (raw)
In-Reply-To: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site>

egrep has been deprecated in favor of grep -E for a long time, and the
next grep release (3.8 or 4.0) will print a warning of egrep is used.
Stop using egrep so we won't see the warning.

ChangeLog:

	* configure.ac: Use grep -E instead of egrep.
	* config.rpath: Likewise.
	* configure: Regenerate.

config/ChangeLog:

	* lib-ld.m4 (AC_LIB_PROG_LD_GNU): Use grep -E instead of egrep.
	(acl_cv_path_LD): Likewise.

gcc/ChangeLog:

	* configure: Regenerate.

intl/ChangeLog:

	* configure: Regenerate.

libcpp/ChangeLog:

	* configure: Regenerate.

libgcc/ChangeLog:

	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	* configure: Regenerate.
---
 config.rpath           | 8 ++++----
 config/lib-ld.m4       | 4 ++--
 configure              | 4 ++--
 configure.ac           | 4 ++--
 gcc/configure          | 8 ++++----
 intl/configure         | 4 ++--
 libcpp/configure       | 4 ++--
 libgcc/configure       | 2 +-
 libstdc++-v3/configure | 4 ++--
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/config.rpath b/config.rpath
index 4dea75957c2..20ffc3eb241 100755
--- a/config.rpath
+++ b/config.rpath
@@ -143,7 +143,7 @@ if test "$with_gnu_ld" = yes; then
       ld_shlibs=no
       ;;
     beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      if $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
         :
       else
         ld_shlibs=no
@@ -162,9 +162,9 @@ if test "$with_gnu_ld" = yes; then
     netbsd*)
       ;;
     solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      if $LD -v 2>&1 | grep -E 'BFD 2\.8' > /dev/null; then
         ld_shlibs=no
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      elif $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
         :
       else
         ld_shlibs=no
@@ -174,7 +174,7 @@ if test "$with_gnu_ld" = yes; then
       hardcode_direct=yes
       ;;
     *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      if $LD --help 2>&1 | grep -E ': supported targets:.* elf' > /dev/null; then
         :
       else
         ld_shlibs=no
diff --git a/config/lib-ld.m4 b/config/lib-ld.m4
index 11d0ce77342..e536ff4d115 100644
--- a/config/lib-ld.m4
+++ b/config/lib-ld.m4
@@ -14,7 +14,7 @@ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
@@ -88,7 +88,7 @@ AC_CACHE_VAL(acl_cv_path_LD,
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | grep -E '(GNU|with BFD)' > /dev/null; then
 	test "$with_gnu_ld" != no && break
       else
 	test "$with_gnu_ld" != yes && break
diff --git a/configure b/configure
index 5dcaab14ae9..4a22d7ab3f0 100755
--- a/configure
+++ b/configure
@@ -9448,7 +9448,7 @@ if test x${use_gnu_as} = x &&
 fi
 
 if test x${use_gnu_ld} = x &&
-   echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
+   echo " ${configdirs} " | grep -E " (go)?ld " > /dev/null 2>&1 ; then
   with_gnu_ld=yes
   extra_host_args="$extra_host_args --with-gnu-ld"
 fi
@@ -10620,7 +10620,7 @@ case " $build_configdirs " in
     # For an installed makeinfo, we require it to be from texinfo 4.7 or
     # higher, else we use the "missing" dummy.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+       | grep -E 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
       :
     else
       MAKEINFO="$MISSING makeinfo"
diff --git a/configure.ac b/configure.ac
index 85977482aee..06ffa5afbe8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2634,7 +2634,7 @@ if test x${use_gnu_as} = x &&
 fi
 
 if test x${use_gnu_ld} = x &&
-   echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
+   echo " ${configdirs} " | grep -E " (go)?ld " > /dev/null 2>&1 ; then
   with_gnu_ld=yes
   extra_host_args="$extra_host_args --with-gnu-ld"
 fi
@@ -3549,7 +3549,7 @@ changequote(,)
     # For an installed makeinfo, we require it to be from texinfo 4.7 or
     # higher, else we use the "missing" dummy.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+       | grep -E 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
       :
     else
       MAKEINFO="$MISSING makeinfo"
diff --git a/gcc/configure b/gcc/configure
index f43dc989d02..baeffd79d06 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -11160,7 +11160,7 @@ else
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | grep -E '(GNU|with BFD)' > /dev/null; then
 	test "$with_gnu_ld" != no && break
       else
 	test "$with_gnu_ld" != yes && break
@@ -11188,7 +11188,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
@@ -19674,7 +19674,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19679 "configure"
+#line 19677 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19780,7 +19780,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19785 "configure"
+#line 19783 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/intl/configure b/intl/configure
index 03f40487a92..2c5e49839b4 100755
--- a/intl/configure
+++ b/intl/configure
@@ -5090,7 +5090,7 @@ else
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | grep -E '(GNU|with BFD)' > /dev/null; then
 	test "$with_gnu_ld" != no && break
       else
 	test "$with_gnu_ld" != yes && break
@@ -5118,7 +5118,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
diff --git a/libcpp/configure b/libcpp/configure
index 75145390215..d3beed1703a 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -6807,7 +6807,7 @@ else
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | grep -E '(GNU|with BFD)' > /dev/null; then
 	test "$with_gnu_ld" != no && break
       else
 	test "$with_gnu_ld" != yes && break
@@ -6835,7 +6835,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
diff --git a/libgcc/configure b/libgcc/configure
index 61f3ace2891..a52967804ce 100755
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -5032,7 +5032,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index eac60392121..e3304dd2605 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -28473,7 +28473,7 @@ else
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some GNU ld's only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | grep -E '(GNU|with BFD)' > /dev/null; then
 	test "$with_gnu_ld" != no && break
       else
 	test "$with_gnu_ld" != yes && break
@@ -28501,7 +28501,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $LD -v 2>&1 </dev/null | grep -E '(GNU|with BFD)' 1>&5; then
   acl_cv_prog_gnu_ld=yes
 else
   acl_cv_prog_gnu_ld=no
-- 
2.36.1



  reply	other threads:[~2022-06-24  6:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  6:57 [PATCH 0/8] Stop using obsoleted egrep/fgrep Xi Ruoyao
2022-06-24  6:58 ` Xi Ruoyao [this message]
2022-06-24  7:00 ` [PATCH 2/8] fixincludes: use grep -E/-F instead of egrep/fgrep Xi Ruoyao
2022-06-24  7:02 ` [PATCH 3/8] libstdc++: use grep -E instead of egrep in scripts Xi Ruoyao
2022-06-24 10:00   ` Jonathan Wakely
2022-06-24 11:08     ` Xi Ruoyao
2022-06-24 11:18       ` Jonathan Wakely
2022-06-24 11:35         ` Jonathan Wakely
2022-06-24 11:41           ` Rainer Orth
2022-06-24 12:37             ` Xi Ruoyao
2022-06-24 12:38               ` Jonathan Wakely
2022-06-24  7:04 ` [PATCH 4/8] libbacktrace: use grep -F instead of fgrep Xi Ruoyao
2022-06-24  7:05 ` [PATCH 5/8] intl: stop using fgrep for exgettext Xi Ruoyao
2022-06-24 16:06   ` Joseph Myers
2022-06-25  4:00     ` Xi Ruoyao
2022-06-24  7:06 ` [PATCH 6/8] fortran: use grep -F instead of fgrep Xi Ruoyao
2022-06-24 11:13   ` Bernhard Reutner-Fischer
2022-06-24 12:22     ` Xi Ruoyao
2022-06-24 12:35       ` Rainer Orth
2022-06-24 18:30         ` Bernhard Reutner-Fischer
2022-06-24 13:58       ` Thomas Koenig
2022-06-24  7:09 ` [PATCH 7/8] testsuite: use grep -E instead of egrep Xi Ruoyao
2022-06-24 10:57   ` Arnaud Charlet
2022-06-24  7:10 ` [PATCH 8/8] contrib: " Xi Ruoyao
2022-06-24  7:24 ` [PATCH 0/8] Stop using obsoleted egrep/fgrep Rainer Orth
2022-06-24  7:27   ` Xi Ruoyao
2022-06-24  7:50     ` Rainer Orth
2022-06-24  8:26       ` Fangrui Song
2022-06-24  8:33         ` Andrew Pinski
2022-06-24 16:09           ` Joseph Myers
2022-06-24 16:21             ` Iain Sandoe
2022-06-24  8:45         ` Rainer Orth

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=b0689e5ff8dbb150ec21d2a618a1260798138a7d.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=gcc-patches@gcc.gnu.org \
    /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).