diff options
author | Alan Modra <amodra@gmail.com> | 2022-09-28 13:37:31 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-09-28 13:37:31 +0930 |
commit | 67d1991b785bdfef1d70cddfa0202b99b43ccce9 (patch) | |
tree | 126c4d66207af2518fa7c9ceeade0ce7625278be /config/lib-ld.m4 | |
parent | f8a8e1b263752d558c79f33ca0730ca23fb4450b (diff) | |
download | gdb-67d1991b785bdfef1d70cddfa0202b99b43ccce9.zip gdb-67d1991b785bdfef1d70cddfa0202b99b43ccce9.tar.gz gdb-67d1991b785bdfef1d70cddfa0202b99b43ccce9.tar.bz2 |
egrep in binutils
Apparently some distros have a nagging egrep that helpfully tells you
egrep is deprecated and to use "grep -E". The nag message causes a ld
testsuite failure. What's more the advice isn't that good. The "-E"
flag may not be available with older versions of grep.
This patch fixes bare invocation of egrep within binutils, replacing
it with the autoconf $EGREP or with grep.
config/
* lib-ld.m4 (AC_LIB_PROG_LD_GNU): Require AC_PROG_EGREP and
invoke $EGREP.
(AC_LIB_PROG_LD): Likewise.
binutils/
* configure: Regenerate.
* embedspu.sh: Replace egrep with grep.
gold/
* testsuite/Makefile.am (flagstest_compress_debug_sections.check):
Replace egrep with grep.
* testsuite/Makefile.in: Regenerate.
* testsuite/bnd_ifunc_1.sh: Replace egrep with $EGREP.
* testsuite/bnd_ifunc_2.sh: Likewise.
* testsuite/bnd_plt_1.sh: Likewise.
* testsuite/discard_locals_test.sh: Likewise.
* testsuite/gnu_property_test.sh: Likewise.
* testsuite/no_version_test.sh: Likewise.
* testsuite/pr18689.sh: Likewise.
* testsuite/pr26936.sh: Likewise.
* testsuite/retain.sh: Likewise.
* testsuite/split_i386.sh: Likewise.
* testsuite/split_s390.sh: Likewise.
* testsuite/split_x32.sh: Likewise.
* testsuite/split_x86_64.sh: Likewise.
* testsuite/ver_test_pr16504.sh: Likewise.
intl/
* configure: Regenerate.
ld/
* testsuite/ld-elfvers/vers.exp (test_ar): Replace egrep with grep.
Diffstat (limited to 'config/lib-ld.m4')
-rw-r--r-- | config/lib-ld.m4 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/lib-ld.m4 b/config/lib-ld.m4 index 11d0ce7..73cf957 100644 --- a/config/lib-ld.m4 +++ b/config/lib-ld.m4 @@ -12,9 +12,10 @@ dnl with libtool.m4. 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, +[AC_REQUIRE([AC_PROG_EGREP])dnl +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 | $EGREP '(GNU|with BFD)' 1>&5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no @@ -29,6 +30,7 @@ AC_DEFUN([AC_LIB_PROG_LD], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_EGREP])dnl # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then @@ -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 |