Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1650934rwb; Fri, 13 Jan 2023 15:41:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXstOMRbf1pb6hfrKuG1uHwZhepcgJXhIDUogoQegwhBbpJ0VSG1zirZh1z34yhGj771Heak X-Received: by 2002:a17:906:fcda:b0:852:dc8d:3a01 with SMTP id qx26-20020a170906fcda00b00852dc8d3a01mr18283291ejb.55.1673653295514; Fri, 13 Jan 2023 15:41:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673653295; cv=none; d=google.com; s=arc-20160816; b=fFi9keILPK3WobaxC/4PcL1sVufyHeqRHxpMgcJuYpbJNZn5g6svC+bRy958kT0yav ex8Q6XB1h/N0+Nl5bs/x/qlV5Hbj/+71vCKYyT+QfAQEgvveA0SW6Eel6TtwW4ji7zx7 FCPVbq4G34vle1Rnqb5yXBX6ylfe2DLl1+7QEYSDDKtWG4dH/uxe3aGsBYJvl3nv6+X4 3NrcFLQOX+QGMPox4E6r045xHpSrvaOMVNBrsErLVjcElBGav9+GmRm7XkTBfrniEHka R6g2TdRzZ5+fJx2mWUhFe0Q3AWGcO2wawZqhJN9/chytCScvgCraI28UTJpf7Po6MX9U dw6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ciy0ZWTd3lGR7fuS0JZR+cGtHCn30vXUtznCeqNuNtU=; b=o6aq1NfyaarOD9LRBdWTJl6lTZN1IuCJFzcJNAZ3B3Hujf2UUzVIidwmdtgfR8/mH3 b2svPfZlGBkB0CDClGk5kE6VfmI1W/3g2hv29mqdJK+zAWF01Dw9mXfwZowXjViuFTFH aW45uQ69xVB3JrpuwciIkqreWRqBpLgcHIIFx1MM/OJhzjLYGZDWPJxVCZHe15ivg0SE heko/JWqaOwggi14bUmRiQFr6a/TTvqS4E/iLM0WqrHgggVeWumDYWuMjJtg4tvBaMWf ZLyX7nQM3Dy19BzGvdzxXu7dep2Mahca2onJE0V8tKh0UZtFRx9Wnhnc/SsWRZlYF9zV S//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P76dLekg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb27-20020a170907961b00b0084c7e7eb6fdsi24862829ejc.131.2023.01.13.15.41.23; Fri, 13 Jan 2023 15:41:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P76dLekg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjAMXQE (ORCPT + 52 others); Fri, 13 Jan 2023 18:16:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjAMXPh (ORCPT ); Fri, 13 Jan 2023 18:15:37 -0500 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A22A78147; Fri, 13 Jan 2023 15:15:32 -0800 (PST) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-4d59d518505so136375177b3.1; Fri, 13 Jan 2023 15:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ciy0ZWTd3lGR7fuS0JZR+cGtHCn30vXUtznCeqNuNtU=; b=P76dLekgwuMNxZPfxLDlCyL/lIIgZNjPmY8vqWnk0vw6tZRka1mEs/c8B0YbZ+vj4F TX5TiAAk93fQN3ebB++KENBioubOoKCEL3JihUsWc0QTwmYXioEV9h1tG67Ar3kjujNv Z/pIsqffFrsiSAswGddq5zo3MnHmlc4eXhaR2XkmKXUPMKeMhntx9MQ3yWXu2TGjPVI/ 7ahQSi7qmjq0c6FGW08WYmBTg15PzLqT9bk41vHUAuYM1moOM9f3s2ZKLABOaCn+5bEb bl7hhVRapNCFqtfbS25qUZcHq0nVJucpG0Gus9ivCPuJt3gmC3AZkJQw8ii+LiMD1Gt2 Ef8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ciy0ZWTd3lGR7fuS0JZR+cGtHCn30vXUtznCeqNuNtU=; b=FVEovS7/5NRAXv9LklDo81nWNL0Pi24/snHm7HZT+pIqICOSj7MwSLbPLLNZzLRkAG Koa7VQ1k7rKY+/mY4h1a4cp+Z+PnmhOlQBFsKaGcSOvxjoavsT+XOKOPQTCX83JyFDmM qTKeHaSSj3xfyxnZ+Ea7GuIcyWB0vT5PAHNdQ3O+Iqwl15oSQ+Ga5qa+ofWANL/tBaEU flxCwWctsuRMXVKFJWmQblDQpQp5sD2XrJJ4jKu1h1W4HFbJYMk2HQ9RNdfNBNYUtPOn +N992iWar3YybNXgy3YLY0EH0SztTYBD1C1XRbR7j/51qIlJsybyugSt/OeQ93umJdxf LM+Q== X-Gm-Message-State: AFqh2kqk5qm83iDOo4Koymkkb1xP4U3V8NpdVhu/UIIPru/IBjVFKW3s XXdb/ipM4YuCLorEUna8z8u0QVau7NhsqVA+vnI= X-Received: by 2002:a05:690c:dc3:b0:4db:3ac0:78a3 with SMTP id db3-20020a05690c0dc300b004db3ac078a3mr941595ywb.266.1673651731430; Fri, 13 Jan 2023 15:15:31 -0800 (PST) MIME-Version: 1.0 References: <20230109204520.539080-1-ojeda@kernel.org> <20230109204520.539080-6-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Sat, 14 Jan 2023 00:15:20 +0100 Message-ID: Subject: Re: [PATCH 6/6] kbuild: rust_is_available: normalize version matching To: Masahiro Yamada Cc: Miguel Ojeda , linux-kbuild@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 7:23 AM Masahiro Yamada wrote: > > Maybe, your purpose is to use sed consistently, but > perhaps you can avoid forking sed if you know the > format of the first line. The most unknown format would be the one of the libclang check, where there may be other lines before the one we are interested in. However, the pattern expansion would still match newlines, right? > BTW, what is missing here is, you do not check if > ${RUSTC} is really rustc. > > I can fool this script to print > "arithmetic expression: expecting primary: "100000 * + 100 * + " We can test if nothing was printed by `sed` for that (or do it with shell builtins). Having said that, I would say fooling the script on purpose is an more of an oddity compared to the case `MAKEFLAGS` attempts to cover (please see my reply on the other patch). So if we cover this, then I would say we should really cover the other one. Cheers, Miguel