Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3504493rdh; Thu, 28 Sep 2023 13:47:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF170wsx50Yfs8A+6t2vnRTXQU0EwuHrUBe2769KtG51ZrFwrwu9H3mm91zUCUftGQVKm1g X-Received: by 2002:a17:903:2348:b0:1b8:a67f:1c15 with SMTP id c8-20020a170903234800b001b8a67f1c15mr4069521plh.25.1695934062496; Thu, 28 Sep 2023 13:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695934062; cv=none; d=google.com; s=arc-20160816; b=l4d7kHMbwLo2vOxhyeItmGxuUpTONeLOUB2TyLNNcJ8yZBU6rcPTF+wtLlgLmEBWhf 1WVdbp3ZxehK/yOnzLqA8AIgvXRg87D8pEu8KW2dcymsodxohkQvQlem35C689ST/prW iNr8lmi21VVwUwWhWNSopMvY9tuodjaEj5CoSxUhwaxaVf988bsqH9YbivuDQNegBwjT 1iSOUscfxV7BCsRBXMvgK4xVCTtyVzXCQBUyqCc3w3QV3/yxpRLk6+yFakSSWTXcwluT Lb9P6cmGTJ5OOUUt0ACmk+s8hLnBjuryF/17O63CONwcCpx22wkhNs1p5A2sUVwL7Flq GlLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=w+o9PIskZjCdZvPtrj+ZoRgr17uX0ahT1HdNgz9Gnic=; fh=jv8xwjy+vLLMv9RGCi8HGORcHMT8zBaJkIi0f9kXSDA=; b=TRqZFdI5UJqAQD2TtQvkBWF6LmH5LN3WCr7Q3o8c+zS0sQD+RG/SViW8O9oDVYQH2N aoFW9o/RQP+NzJiQCqODX5oeuLju1vex4mmTFNcUIMiTW+g/J/K+hJsWb4o9tjccnYaL 42Ohr6htfJBBhmbYVeOBGTKSofcah8A5XeDKFb5hwj4Tn17goukB2Cs/TGr1N8HpQLcv axwpZo0KPWSEQxt03Kd2Szcz7B2Kc3dAKvEq+8dh1KQabJBB1kK0yKPewE5ZOfjeYQBh +IOQnrhL9MdlYIuQ1WI/ANgiK6EFsqI6+UuJNpvX2yDjKYR8j0/BZdTJNqtqpicSVPOi 14aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b001bc836180dcsi21184876plh.520.2023.09.28.13.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 13:47:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DA5D084EE564; Thu, 28 Sep 2023 13:33:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbjI1UdD convert rfc822-to-8bit (ORCPT + 99 others); Thu, 28 Sep 2023 16:33:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjI1UdB (ORCPT ); Thu, 28 Sep 2023 16:33:01 -0400 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B527A193 for ; Thu, 28 Sep 2023 13:32:59 -0700 (PDT) Received: from omf17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0A99E1608A0; Thu, 28 Sep 2023 20:32:58 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA id F31731E; Thu, 28 Sep 2023 20:32:54 +0000 (UTC) Message-ID: <106c8bdb960da1568d0b3879efa76cd2acec032e.camel@perches.com> Subject: Re: [PATCH] rust: Use awk instead of recent xargs From: Joe Perches To: Matthew Maurer , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho Cc: Boqun Feng , Gary Guo , =?ISO-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 28 Sep 2023 13:32:54 -0700 In-Reply-To: <20230928202116.2298150-1-mmaurer@google.com> References: <20230928202116.2298150-1-mmaurer@google.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: F31731E X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Stat-Signature: 67tkdiae9ogk9pwpmkepescmsduebrbn X-Rspamd-Server: rspamout08 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18Bt12lxOUK/nQPPHuW9jhdiJDE/X/B1DU= X-HE-Tag: 1695933174-351742 X-HE-Meta: U2FsdGVkX1+Bb+eXtRzmfDkcJalEWFI1h+DdroDZ98TU2VBln2kEz1QIrF3HVTUf6bRGFWH/SU3QbNwxK/6cEUXTwms7Iu+5s/vpLULeFxUuaY/m1Av9DBokc8Vw0NQB0ZNMs/yK+e5wgo3cKbx3f/qYalKvE84nqPSsZ0junjAMxa9bV3i/92HnC21/nqnY6nfQi8PO5+qoZvse8Z6OC8ekbMpc72x+ymTzzajbC1Nw85rb3b2LCc1qIByoUUlAg5YlIKy0Rb0TeZzECDqHqV+TObjQY9Je5bpjaOoplPFWoCQTByAHOoC+Zj2c1sbX 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 13:33:08 -0700 (PDT) On Thu, 2023-09-28 at 20:21 +0000, Matthew Maurer wrote: > `awk` is already required by the kernel build, and the `xargs` feature > used in current Rust detection is not present in all `xargs` (notably, > toybox based xargs, used in the Android kernel build). [] > diff --git a/rust/Makefile b/rust/Makefile [] > @@ -365,8 +365,7 @@ quiet_cmd_exports = EXPORTS $@ > cmd_exports = \ > $(NM) -p --defined-only $< \ > | grep -E ' (T|R|D) ' | cut -d ' ' -f 3 \ > - | xargs -Isymbol \ > - echo 'EXPORT_SYMBOL_RUST_GPL(symbol);' > $@ > + | awk 'NF {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$0}' > $@ Perhaps remove the cut as well and use $$3 instead of $$0 ? Maybe integrate the grep as well.