From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2DB07385843A; Mon, 18 Mar 2024 14:06:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DB07385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770802; bh=yEuMshNfRVhpe0leI6kJIRSCY1r+8mbcXfyqM8kYXk4=; h=From:To:Subject:Date:From; b=Pze5L0yBbY0ZHrupYAEGDSAlYDZDVVYTEacBu3h/hPuPa0Nb7VtB1HOIMNLc1ZQTe 5ZKmDSOHoIxhmeu1ksgplgYFBxSPPPf05ACekdrx1K5R8Qou5vYu6w6nzF7e2hb7XE Yuycrv+Fl2wPNYUAmVCKxOpQ8cy3zXet+9Un4op0= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-10259] libstdc++: use grep -E instead of egrep in scripts X-Act-Checkin: gcc X-Git-Author: Xi Ruoyao X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 5c156f5be49007a5434452335f29844eb17868a6 X-Git-Newrev: c6f80dca4e51eaab3f12884e19b3dbbfe9cdffd7 Message-Id: <20240318140642.2DB07385843A@sourceware.org> Date: Mon, 18 Mar 2024 14:06:42 +0000 (GMT) List-Id: https://gcc.gnu.org/g:c6f80dca4e51eaab3f12884e19b3dbbfe9cdffd7 commit r12-10259-gc6f80dca4e51eaab3f12884e19b3dbbfe9cdffd7 Author: Xi Ruoyao Date: Fri Jun 24 15:02:23 2022 +0800 libstdc++: use grep -E instead of egrep in scripts 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. grep's from GNU, BSD (including Mac OS X), AIX, BusyBox all support -E and -F. Solaris grep doesn't support -E, but extract_symvers.in already contains a special case for Solaris and doxygen documentation generation is already broken on non-GNU. libstdc++-v3/ChangeLog: * scripts/extract_symvers.in: Use grep -E instead of egrep. * scripts/run_doxygen: Likewise. (cherry picked from commit fa4e97907fc979f550c3f02cde03d9c35f99df9b) Diff: --- libstdc++-v3/scripts/extract_symvers.in | 4 ++-- libstdc++-v3/scripts/run_doxygen | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/scripts/extract_symvers.in b/libstdc++-v3/scripts/extract_symvers.in index dd9f63d4f16..d8ea62355ae 100755 --- a/libstdc++-v3/scripts/extract_symvers.in +++ b/libstdc++-v3/scripts/extract_symvers.in @@ -54,8 +54,8 @@ SunOS) ${readelf} ${lib} |\ sed -e 's/ \[: [A-Fa-f0-9]*\] //' -e '/\.dynsym/,/^$/p;d' |\ sed -e 's/ \[: [0-9]*\] //' |\ - egrep -v ' (LOCAL|UND) ' |\ - egrep -v ' (_DYNAMIC|_GLOBAL_OFFSET_TABLE_|_PROCEDURE_LINKAGE_TABLE_|_edata|_end|_etext)$' |\ + grep -E -v ' (LOCAL|UND) ' |\ + grep -E -v ' (_DYNAMIC|_GLOBAL_OFFSET_TABLE_|_PROCEDURE_LINKAGE_TABLE_|_edata|_end|_etext)$' |\ sed -e 's/ : / :_/g' |\ sed -e 's/ : / :_/g' |\ sed -e 's/ : / :_/g' |\ diff --git a/libstdc++-v3/scripts/run_doxygen b/libstdc++-v3/scripts/run_doxygen index 86da071d86c..50514c744c9 100644 --- a/libstdc++-v3/scripts/run_doxygen +++ b/libstdc++-v3/scripts/run_doxygen @@ -291,7 +291,7 @@ cxxflags="-Og -g -std=gnu++23" $gxx $cppflags $cxxflags ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader || exit 1 # Doxygen outputs something like "\fC#include \fP" and # we want that internal header to be replaced with something like . -problematic=`egrep -l '#include <.*h>' [a-z]*.3` +problematic=`grep -E -l '#include <.*h>' [a-z]*.3` for f in $problematic; do # this is also slow, but safe and easy to debug oldh=`sed -n '/fC#include .*/\1/p' $f` @@ -303,7 +303,7 @@ rm stdheader # Some of the pages for generated modules have text that confuses certain # implementations of man(1), e.g. on GNU/Linux. We need to have another # top-level *roff tag to /stop/ the .SH NAME entry. -problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3` +problematic=`grep -E --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3` #problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3' for f in $problematic; do