From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 95493385701C for ; Mon, 27 Jun 2022 09:07:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95493385701C Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-407-_9dFJQf2OZeSXl_6yg8eyg-1; Mon, 27 Jun 2022 05:07:40 -0400 X-MC-Unique: _9dFJQf2OZeSXl_6yg8eyg-1 Received: by mail-ej1-f70.google.com with SMTP id sb34-20020a1709076da200b00722f4a9865bso2156014ejc.1 for ; Mon, 27 Jun 2022 02:07:40 -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=JP5phEItPaEFu7SoE3myzgzGF9kKmjq2SszwX0Kpgss=; b=AZu/VplKEdYiT2xf/CikGGvYfivREQz1sUWe2rdmCIpfDZS9h5sHxdaXMWcQHo+boK yAf1q89XLW65MCS5uO6+0o38j7HESv/CSJcKMhFlS3FkglEsH2thyB6W5hs24c1nzLrH BTVN1YG0FSmiabYh4Qyojj+C5xrvD48+r+2e774bXLwv+i34G4rURgJ4DCD9B7s/M6IV x5ZFz0YvkV5A0eFm6glRCCNjddqJtD6+hG/s/LxhSwjF5eR5tXit8EBjg+vl5OO9xSxt yLKjmpYVOjK4T9H7hSgxR0jrU/XQI5gpOa746xqL+HEqGB1NJmrGPSmHy8bb0lV0MY+q C7tw== X-Gm-Message-State: AJIora/UTr+JOiy7vY6//fEkdHbp1jj9nEpdppcSYuZqskkoZE1prAPd OdQnnp9JWDNh51BrcuVXyW4qsxIXqQgpfxaNH9+0qe8xHgBe285RToG1ED3cf6iNer+JYEkR2VW G5mUK6su8Clle+Odf8gBZOQ2G5kUmPPLOQA== X-Received: by 2002:a05:6402:354b:b0:437:60fd:4891 with SMTP id f11-20020a056402354b00b0043760fd4891mr15605558edd.344.1656320859449; Mon, 27 Jun 2022 02:07:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saphEZYHlS90RMewrT47lnjD9yCaezC+BrqXldx7iz3m0S5tyHFU4K3SedAgfJbGD5+i663crC0I6NR9THJRY= X-Received: by 2002:a05:6402:354b:b0:437:60fd:4891 with SMTP id f11-20020a056402354b00b0043760fd4891mr15605539edd.344.1656320859273; Mon, 27 Jun 2022 02:07:39 -0700 (PDT) MIME-Version: 1.0 References: <664e8a9fa34de7dd51c18c67e5b3786818165ab1.camel@xry111.site> In-Reply-To: <664e8a9fa34de7dd51c18c67e5b3786818165ab1.camel@xry111.site> From: Jonathan Wakely Date: Mon, 27 Jun 2022 10:07:28 +0100 Message-ID: Subject: Re: [PATCH v2 3/7] libbacktrace: use grep instead of fgrep To: Xi Ruoyao Cc: gcc Patches , Rainer Orth , Arnaud Charlet , Bernhard Reutner-Fischer X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, 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: 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: Mon, 27 Jun 2022 09:07:50 -0000 On Mon, 27 Jun 2022 at 07:09, Xi Ruoyao wrote: > > fgrep has been deprecated in favor of grep -F for a long time, and the > next grep release (3.8 or 4.0) will print a warning of fgrep is used. > But, we can't simply replace fgrep to grep -F, or the build will break > with some non-GNU grep implementations (lacking -F support). > > As "add-gnu-debuglink" is definitely not a non-trivial regex, simply > replace fgrep with grep. FWIW, GNU grep will be just as fast when using grep as fgrep in this case, because it detects that the pattern is a fixed string that contains no special characters and automatically uses the same matching engine as fgrep. So for GNU grep, there's no downside to this change.