From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id CE4D53851C13; Fri, 24 Jun 2022 12:35:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE4D53851C13 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id B25D0BDF30; Fri, 24 Jun 2022 14:35:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YLY_jydLQaIB; Fri, 24 Jun 2022 14:35:21 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508554ce.dip0.t-ipconnect.de [80.133.84.206]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 53796BDF2F; Fri, 24 Jun 2022 14:35:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1656074121; bh=RXCyC8c4bwYhtqiBUmkQuYc7sNnYrLz2a6uGcEFoZ6o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Tdn3Y4An6xLvhs7RkpOR1QB5vRlDhFJE6d33AmJFBM2nShWxH7Kd2484nbn2Zh7MW acRjVe104XaxtU082uSVKrwUO1Ev9au3QyGy5hPJM9bjDxjpkgpvtxxmZwM34ihBkt 1x5eUGa9nS7mRuHR8pEwCPGGwps8Rj8OxNAu8fY+BmZhZAeQb7uTtcVFXRRJSBM9u7 w7m13ywJOgy+D5tOmWu0YaoB084TXxGJbKZvQnkbdc1vhRtwPmkPVfEsqzkoXlUNEP 80kWDmh3YcAspcoB8QKbM+JU3H2OsEUjY1BhsIeHa57a60sOraUgZkV1ZKxVSn7SS1 Ht9ZQoLMjBz9Q== From: Rainer Orth To: Xi Ruoyao Cc: Bernhard Reutner-Fischer , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH 6/8] fortran: use grep -F instead of fgrep References: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> <3fe5664607c4e530fbb91048c2e363ddee917250.camel@xry111.site> <20220624131331.0b157480@nbbrfq> <09114af24f7f09eb2fa6c7dc743de18480d8bd7d.camel@xry111.site> Date: Fri, 24 Jun 2022 14:35:20 +0200 In-Reply-To: <09114af24f7f09eb2fa6c7dc743de18480d8bd7d.camel@xry111.site> (Xi Ruoyao's message of "Fri, 24 Jun 2022 20:22:42 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3786.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_NONE, 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 12:35:24 -0000 Hi Xi, > On Fri, 2022-06-24 at 13:13 +0200, Bernhard Reutner-Fischer wrote: > >> > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if $(SHELL) -c 'install-inf= o --version | sed 1q | fgrep -s -v >> > -i debian' >/dev/null 2>&1; then \ >> > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if $(SHELL) -c 'install-inf= o --version | sed 1q | grep -F -s -v >> > -i debian' >/dev/null 2>&1; then \ >> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo " install-= info --delete --info-dir=3D$(DESTDIR)$(infodir) >> > $(DESTDIR)$(infodir)/gfortran.info"; \ >> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 install-info --= delete --info-dir=3D$(DESTDIR)$(infodir) >> > $(DESTDIR)$(infodir)/gfortran.info || : ; \ >> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0else : ; fi; \ >>=20 >> I'd replace -s >/dev/null 2>&1 with -q while at it. >>=20 >> But why is -F used here in the first place? >> I do not see much in debian that can be interpreted as a regex? > > I'm not sure. It was there since 2004. Perhaps the author thinks fgrep > may save several CPU cycles :). I'll just use a plain grep in PATCH v2. > > Rainer: do you have some idea about the availability of "-q" on > different hosts? If you agree I'll use it instead of -s > /dev/null > too. again, the autoconf manual warns agains it, even more so against -s. That's the first reference for portability issues and shouldn't be ignored without good reason. In the GCC and Solaris context, /bin/grep supports both -q and -s in Solaris 11.3 and 11.4. It doesn't support -q on Solaris 10, though (again, no longer relevant for GCC). Rainer --=20 ---------------------------------------------------------------------------= -- Rainer Orth, Center for Biotechnology, Bielefeld University