From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 938B6385022A for ; Fri, 24 Jun 2022 08:33:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 938B6385022A Received: by mail-lf1-x134.google.com with SMTP id a2so3240741lfg.5 for ; Fri, 24 Jun 2022 01:33:38 -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=J9DZu+KNa9KoYhxlMhPA6+VgDpe9fHXA6KY+f/zAQKc=; b=ZHFoRJ9OQmQAdWMSgzFDS1fPq+osfcP6IbAn7Bty4l6Pk59ycChRd+TI+toOa1aHQg oe/i36gis9+QepoUDvDhT6gTyvIlrY08y6PoIw0mGMWFH3bm9NVNlWo/EXzTVY+l4ihF y9fcSa6fFXyyTsajNHO5KVkOCOAEfxAqlWFagwdqpp/xs485hZyM74qf05ROMZ9zoN2c 3Ve+8J5JKcwScPuEELHBdOgR/1+BnVmA2TtYzK7wfYdlWTP8lBP/EDJJk8TzpsSQpZzs ql9gp6XNJtqlHzSq3t/n4NeyKvXEdrXkfqbgi+S1bQzbjWmO6XyxwY/4vaaq0t7agYHj CK2w== X-Gm-Message-State: AJIora+SmD7aVm0qGRtcfY3gJTLsGG+WHuajvA8W5joGHnhM/VMYWZwl dN7PYpnGy5GSgFRKznpT3TPultxb8FcqjVS0P2I= X-Google-Smtp-Source: AGRyM1szjfkgrswp8d1v30pOxJt/zzcBY19YdyW/mdh7HRYN7ymxgL5wahQjtgMahkAjWRutdTn+qXxEmf6GFgsli7s= X-Received: by 2002:a05:6512:31e:b0:47f:6193:2262 with SMTP id t30-20020a056512031e00b0047f61932262mr8260890lfp.502.1656059616921; Fri, 24 Jun 2022 01:33:36 -0700 (PDT) MIME-Version: 1.0 References: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> <549d34f4ae737f632eb477f98b3cc52bff461a70.camel@xry111.site> <20220624082626.z7ma7ugyz5svlxf2@google.com> In-Reply-To: <20220624082626.z7ma7ugyz5svlxf2@google.com> From: Andrew Pinski Date: Fri, 24 Jun 2022 01:33:24 -0700 Message-ID: Subject: Re: [PATCH 0/8] Stop using obsoleted egrep/fgrep To: Fangrui Song Cc: Rainer Orth , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 08:33:41 -0000 On Fri, Jun 24, 2022 at 1:27 AM Fangrui Song via Gcc-patches 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.