On Fri, Jun 24, 2022 at 1:27 AM Fangrui Song via Gcc-patches <[email protected]> wrote: > > On 2022-06-24, Rainer Orth wrote: > >Hi Xi, > > > >> On Fri, 2022-06-24 at 09:24 +0200, Rainer Orth wrote: > >> > >>> please remember that there's a world outside of GNU grep: e.g. Solaris > >>> /bin/grep doesn't support grep -E (while /usr/xpg4/bin/grep does), so > >>> unconditionally replacing egrep with grep -E in several places is > >>> likely > >>> to break at least the Solaris build. > >>> > >>> Please see the autoconf manual for details. I suspect you'll have to > >>> rework the patch set to use AC_PROG_EGREP and $EGREP instead. > >> > >> Thanks for the advice. I'll rework on it. > >> > >> Is there some way to access a Solaris and do some test? > > > >Sure: there's a Solaris 11.3/SPARC system (gcc211)in the GCC compile > >farm (https://gcc.gnu.org/wiki/CompileFarm). > > > >Unfortunately, there's neither Solaris 11.4 or Solaris/x86 at the > >moment, but those don't differ in this regard. > > > > Rainer > > FWIW: glibc recently got the grep -E change and the solution is to use > plain grep -E, without $EGREP things. > Isn't setting PATH a good workaround if Solaris has the problem?
glibc is a different story partly but I think GCC should go down the EGREP route. glibc is not as friendly to non-GNU based systems compared to GCC really. Though I do find that -E/-F have been part of the POSIX standard since at least 2004 which is interesting. https://pubs.opengroup.org/onlinepubs/009696899/utilities/grep.html Though GCC host/build targets can be older and some non-supported ones still. Thanks, Andrew Pinski > > https://sourceware.org/pipermail/libc-alpha/2022-June/139420.html > > > Yes, it is safe nowadays to use 'grep -E' instead of egrep. The only > > vendor-supported platform I know of where '/usr/bin/grep -E' does not > > work is Solaris 10 (end-of-life January 2024), and that's easily fixed > > by prepending /usr/xpg4/bin to PATH.
