From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by sourceware.org (Postfix) with ESMTPS id C959F3858293 for ; Fri, 8 Jul 2022 03:46:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C959F3858293 Received: by mail-ua1-x932.google.com with SMTP id n3so5135088uak.13 for ; Thu, 07 Jul 2022 20:46:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0fguGwvOf8mMovUs/tGI2i1XssiHEKp7nYsmcU/5ZRE=; b=SdpqZBhkjohXbjnimlepj0m4nGv34UKBcOFn1dSL+BcN/GSQ27Zpnt2bO+SlrTEEnt rK3AJ349flNPNnXnAHH3Dg22VYP81n72+ei2c27x8PzX2wjqTsEJ0RE1xwkyBXxZfsUo WIqUvWC5F06H03PvDL022Ul0cY/5mcfkKbMgAKxKiwEHtC5gybgxMzrFKAj7pnuBSLkV sm2abp12UPwZ1Nu9AlFE8i5ZEPnRF95OQutTikwo+cWejo5ksWBtYe5bvTldL2502G1f yzRa460kH+XrEwRXD1D50RKFU1bxyMD8QKxbp6RUfRq5/LrERR+blubYgu8PpLam49LV I35Q== X-Gm-Message-State: AJIora/W+sCgMel4lf2pWCMKeE37pqqK6SGwLuQ/2tATY9YdH62Dpw44 APVk5mTnPTbs2+xXr7IRU13oaoo2DXnlz7fJZu3IG4gdE9M= X-Google-Smtp-Source: AGRyM1vsYuVOm/Wa50n1u5Rsxg98UFABo4AWoGyzEez3wIgmxkwnmj3KvgA7MxCj1fyHpWO8lWsBKMZZr24JV8HTjzs= X-Received: by 2002:a05:6130:121:b0:382:dbf7:93a1 with SMTP id h33-20020a056130012100b00382dbf793a1mr456496uag.89.1657251992780; Thu, 07 Jul 2022 20:46:32 -0700 (PDT) MIME-Version: 1.0 References: <227ea157c8576df47a9d016f5f25b7c6feaee53e.camel@xry111.site> In-Reply-To: <227ea157c8576df47a9d016f5f25b7c6feaee53e.camel@xry111.site> From: Eric Gallager Date: Thu, 7 Jul 2022 23:46:21 -0400 Message-ID: Subject: Re: [PATCH v2 1/7] config: use $EGREP instead of egrep To: Xi Ruoyao Cc: gcc-patches , Bernhard Reutner-Fischer , Jonathan Wakely , libstdc++@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_PASS, 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: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2022 03:46:39 -0000 On Mon, Jun 27, 2022 at 2:07 AM Xi Ruoyao via Gcc-patches wrote: > > egrep has been deprecated in favor of grep -E for a long time, and the > next GNU grep release (3.8 or 4.0) will print a warning if egrep is used. > Unfortunately, old hosts with non-GNU grep may lack the support for -E > option. Use AC_PROG_EGREP and $EGREP variable so we'll work fine on > both old and new platforms. > > ChangeLog: > > * configure.ac: Call AC_PROG_EGREP, and use $EGREP instead of > egrep. > * config.rpath: Use $EGREP instead of egrep. config.rpath is imported from gnulib where this problem is already fixed apparently; wouldn't it make more sense to re-import a fresh config.rpath from upstream gnulib instead of patching GCC's local copy? > * configure: Regenerate. > > config/ChangeLog: > > * lib-ld.m4 (AC_LIB_PROG_LD_GNU): Call AC_PROG_EGREP, and use > $EGREP instead of egrep. > (acl_cv_path_LD): Likewise. > * lib-link.m4 (AC_LIB_RPATH): Call AC_PROG_EGREP, and pass > $EGREP to config.rpath. > > gcc/ChangeLog: > > * configure: Regenerate. > > intl/ChangeLog: > > * configure: Regenerate. > > libcpp/ChangeLog: > > * configure: Regenerate. > > libgcc/ChangeLog: > > * configure: Regenerate. > > libstdc++-v3/ChangeLog: > > * configure: Regenerate. > --- > config.rpath | 10 +-- > config/lib-ld.m4 | 6 +- > config/lib-link.m4 | 4 +- > configure | 136 ++++++++++++++++++++++++++++++++++++++++- > configure.ac | 5 +- > gcc/configure | 13 ++-- > intl/configure | 9 +-- > libcpp/configure | 9 +-- > libgcc/configure | 2 +- > libstdc++-v3/configure | 9 +-- > 10 files changed, 172 insertions(+), 31 deletions(-) > > diff --git a/config.rpath b/config.rpath > index 4dea75957c2..4ada7468c22 100755 > --- a/config.rpath > +++ b/config.rpath > @@ -29,7 +29,7 @@ > # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM > # or > # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM > -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld > +# The environment variables CC, GCC, EGREP, LDFLAGS, LD, with_gnu_ld > # should be set by the caller. > # > # The set of defined variables is at the end of this script. > @@ -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 | $EGREP ': 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 | $EGREP '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 | $EGREP ': 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 | $EGREP ': supported targets:.* elf' > /dev/null; then > : > else > ld_shlibs=no > diff --git a/config/lib-ld.m4 b/config/lib-ld.m4 > index 11d0ce77342..88a014b7a74 100644 > --- a/config/lib-ld.m4 > +++ b/config/lib-ld.m4 > @@ -14,7 +14,8 @@ 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 &5; then > +AC_REQUIRE([AC_PROG_EGREP])dnl > +if $LD -v 2>&1 &5; then > acl_cv_prog_gnu_ld=yes > else > acl_cv_prog_gnu_ld=no > @@ -28,6 +29,7 @@ AC_DEFUN([AC_LIB_PROG_LD], > [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], > test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) > AC_REQUIRE([AC_PROG_CC])dnl > +AC_REQUIRE([AC_PROG_EGREP])dnl > AC_REQUIRE([AC_CANONICAL_HOST])dnl > # Prepare PATH_SEPARATOR. > # The user is always right. > @@ -88,7 +90,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 | $EGREP '(GNU|with BFD)' > /dev/null; then > test "$with_gnu_ld" != no && break > else > test "$with_gnu_ld" != yes && break > diff --git a/config/lib-link.m4 b/config/lib-link.m4 > index 20e281fd323..5bbbd999de0 100644 > --- a/config/lib-link.m4 > +++ b/config/lib-link.m4 > @@ -99,8 +99,10 @@ AC_DEFUN([AC_LIB_RPATH], > AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld > AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host > AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir > + AC_REQUIRE([AC_PROG_EGREP]) dnl we use $GREP > AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ > - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ > + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" EGREP="$EGREP" \ > + with_gnu_ld="$with_gnu_ld" \ > ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh > . ./conftest.sh > rm -f ./conftest.sh > diff --git a/configure b/configure > index 5dcaab14ae9..e0f9a0708ea 100755 > --- a/configure > +++ b/configure > @@ -724,6 +724,8 @@ target_subdir > host_subdir > build_subdir > build_libsubdir > +EGREP > +GREP > AWK > SED > LN_S > @@ -2763,6 +2765,136 @@ fi > test -n "$AWK" && break > done > > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 > +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } > +if ${ac_cv_path_GREP+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if test -z "$GREP"; then > + ac_path_GREP_found=false > + # Loop through the user's path and test for each of PROGNAME-LIST > + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin > +do > + IFS=$as_save_IFS > + test -z "$as_dir" && as_dir=. > + for ac_prog in grep ggrep; do > + for ac_exec_ext in '' $ac_executable_extensions; do > + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" > + as_fn_executable_p "$ac_path_GREP" || continue > +# Check for GNU ac_path_GREP and select it if it is found. > + # Check for GNU $ac_path_GREP > +case `"$ac_path_GREP" --version 2>&1` in > +*GNU*) > + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; > +*) > + ac_count=0 > + $as_echo_n 0123456789 >"conftest.in" > + while : > + do > + cat "conftest.in" "conftest.in" >"conftest.tmp" > + mv "conftest.tmp" "conftest.in" > + cp "conftest.in" "conftest.nl" > + $as_echo 'GREP' >> "conftest.nl" > + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break > + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break > + as_fn_arith $ac_count + 1 && ac_count=$as_val > + if test $ac_count -gt ${ac_path_GREP_max-0}; then > + # Best one so far, save it but keep looking for a better one > + ac_cv_path_GREP="$ac_path_GREP" > + ac_path_GREP_max=$ac_count > + fi > + # 10*(2^10) chars as input seems more than enough > + test $ac_count -gt 10 && break > + done > + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; > +esac > + > + $ac_path_GREP_found && break 3 > + done > + done > + done > +IFS=$as_save_IFS > + if test -z "$ac_cv_path_GREP"; then > + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 > + fi > +else > + ac_cv_path_GREP=$GREP > +fi > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 > +$as_echo "$ac_cv_path_GREP" >&6; } > + GREP="$ac_cv_path_GREP" > + > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 > +$as_echo_n "checking for egrep... " >&6; } > +if ${ac_cv_path_EGREP+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 > + then ac_cv_path_EGREP="$GREP -E" > + else > + if test -z "$EGREP"; then > + ac_path_EGREP_found=false > + # Loop through the user's path and test for each of PROGNAME-LIST > + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR > +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin > +do > + IFS=$as_save_IFS > + test -z "$as_dir" && as_dir=. > + for ac_prog in egrep; do > + for ac_exec_ext in '' $ac_executable_extensions; do > + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" > + as_fn_executable_p "$ac_path_EGREP" || continue > +# Check for GNU ac_path_EGREP and select it if it is found. > + # Check for GNU $ac_path_EGREP > +case `"$ac_path_EGREP" --version 2>&1` in > +*GNU*) > + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; > +*) > + ac_count=0 > + $as_echo_n 0123456789 >"conftest.in" > + while : > + do > + cat "conftest.in" "conftest.in" >"conftest.tmp" > + mv "conftest.tmp" "conftest.in" > + cp "conftest.in" "conftest.nl" > + $as_echo 'EGREP' >> "conftest.nl" > + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break > + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break > + as_fn_arith $ac_count + 1 && ac_count=$as_val > + if test $ac_count -gt ${ac_path_EGREP_max-0}; then > + # Best one so far, save it but keep looking for a better one > + ac_cv_path_EGREP="$ac_path_EGREP" > + ac_path_EGREP_max=$ac_count > + fi > + # 10*(2^10) chars as input seems more than enough > + test $ac_count -gt 10 && break > + done > + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; > +esac > + > + $ac_path_EGREP_found && break 3 > + done > + done > + done > +IFS=$as_save_IFS > + if test -z "$ac_cv_path_EGREP"; then > + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 > + fi > +else > + ac_cv_path_EGREP=$EGREP > +fi > + > + fi > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 > +$as_echo "$ac_cv_path_EGREP" >&6; } > + EGREP="$ac_cv_path_EGREP" > + > + > > srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` > > @@ -9448,7 +9580,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} " | $EGREP " (go)?ld " > /dev/null 2>&1 ; then > with_gnu_ld=yes > extra_host_args="$extra_host_args --with-gnu-ld" > fi > @@ -10620,7 +10752,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 > + | $EGREP '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..19d34edba1c 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -88,6 +88,7 @@ ACX_PROG_LN > AC_PROG_LN_S > AC_PROG_SED > AC_PROG_AWK > +AC_PROG_EGREP > > srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` > > @@ -2634,7 +2635,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} " | $EGREP " (go)?ld " > /dev/null 2>&1 ; then > with_gnu_ld=yes > extra_host_args="$extra_host_args --with-gnu-ld" > fi > @@ -3549,7 +3550,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 > + | $EGREP '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..c58ec9b2273 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 | $EGREP '(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 &5; then > +if $LD -v 2>&1 &5; then > acl_cv_prog_gnu_ld=yes > else > acl_cv_prog_gnu_ld=no > @@ -11200,13 +11200,14 @@ with_gnu_ld=$acl_cv_prog_gnu_ld > > > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > $as_echo_n "checking for shared library run path origin... " >&6; } > if ${acl_cv_rpath+:} false; then : > $as_echo_n "(cached) " >&6 > else > > - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ > + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" EGREP="$EGREP" \ > + with_gnu_ld="$with_gnu_ld" \ > ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh > . ./conftest.sh > rm -f ./conftest.sh > @@ -19674,7 +19675,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 19678 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -19780,7 +19781,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 19784 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > diff --git a/intl/configure b/intl/configure > index 03f40487a92..3caa5a51940 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 | $EGREP '(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 &5; then > +if $LD -v 2>&1 &5; then > acl_cv_prog_gnu_ld=yes > else > acl_cv_prog_gnu_ld=no > @@ -5130,13 +5130,14 @@ with_gnu_ld=$acl_cv_prog_gnu_ld > > > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > $as_echo_n "checking for shared library run path origin... " >&6; } > if ${acl_cv_rpath+:} false; then : > $as_echo_n "(cached) " >&6 > else > > - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ > + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" EGREP="$EGREP" \ > + with_gnu_ld="$with_gnu_ld" \ > ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh > . ./conftest.sh > rm -f ./conftest.sh > diff --git a/libcpp/configure b/libcpp/configure > index 75145390215..800b0bad595 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 | $EGREP '(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 &5; then > +if $LD -v 2>&1 &5; then > acl_cv_prog_gnu_ld=yes > else > acl_cv_prog_gnu_ld=no > @@ -6847,13 +6847,14 @@ with_gnu_ld=$acl_cv_prog_gnu_ld > > > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > $as_echo_n "checking for shared library run path origin... " >&6; } > if ${acl_cv_rpath+:} false; then : > $as_echo_n "(cached) " >&6 > else > > - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ > + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" EGREP="$EGREP" \ > + with_gnu_ld="$with_gnu_ld" \ > ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh > . ./conftest.sh > rm -f ./conftest.sh > diff --git a/libgcc/configure b/libgcc/configure > index 61f3ace2891..181420e67f2 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 &5; then > +if $LD -v 2>&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..f715029375b 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 | $EGREP '(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 &5; then > +if $LD -v 2>&1 &5; then > acl_cv_prog_gnu_ld=yes > else > acl_cv_prog_gnu_ld=no > @@ -28513,13 +28513,14 @@ with_gnu_ld=$acl_cv_prog_gnu_ld > > > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 > $as_echo_n "checking for shared library run path origin... " >&6; } > if ${acl_cv_rpath+:} false; then : > $as_echo_n "(cached) " >&6 > else > > - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ > + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" EGREP="$EGREP" \ > + with_gnu_ld="$with_gnu_ld" \ > ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh > . ./conftest.sh > rm -f ./conftest.sh > -- > 2.36.1 > >