Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3726123rdh; Thu, 28 Sep 2023 23:59:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYrbnB9h8Hl1yI8RUItOOd4CcTP2xL8jZlq1R8RvwcdvJe563NTO0mkb+0Y0js8D+4Ikce X-Received: by 2002:a17:902:f2d1:b0:1c5:ecfc:2650 with SMTP id h17-20020a170902f2d100b001c5ecfc2650mr3729430plc.14.1695970762713; Thu, 28 Sep 2023 23:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695970762; cv=none; d=google.com; s=arc-20160816; b=ad7vpMlg6EJNLAZg+gCO0yhai9RyuNI14b73OJl7IFyHInKNTy4YrOrSeipgnv5YKq HCX8lsau3pW/32DsviFwpNh9DclwtYzIrtKzgLkqP3Y654QOivR66GPBe7pfYm8W4SZU JiDH8yjYkmc5nxauz7p5HQhm5ovrj8YysNWs0FziTfeFbjv3n3ugzYOmvtkXiIUDWsYj bh7R1gYTZUdNKk41kVtREsIITLrF+YyrPWMau7saoaBY89i1nsOxhlyqERF/olR7K1MI 5l0xEPat7XEh7sBoI2y8VB2tAjeZovbQLDzOoUDA8rrjC690sSrbzyKgTPMnSp5GQyXZ IFYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=wFc5hTa80jKfBeJT8UIj3Z/mvzdtWsUzhjvdORiKXpw=; fh=PYAvgYqw/Szh5cTMDoIblsXfLrqloBl/ioFSS0S4ldo=; b=mRImq8Gghym1zSnVAW60YvELQXDjp1T7dKCAcM56CuMFKZdtdKy0/RJGXmj1AVFoQJ DLJY0sOjo0vkQ/pcmfwIFLS5oCyGRfYiUheKEKxlRHV5g0ImeKGqQyEQKSNfmRHAJgjE IlNqsOtgCinj38H0bMiaesA35tzUETTAImIh6UKqt8p2pQvoGgRHpE+MhfdwHzCC93xg 9ymU4yCjzZBPVYDziJSyI9yYBJ2BJwvCV2BDp8QNYIye8CUPjcwLyjleRFeb0dHsYeaT eeaB+1KLMXtOIzXjJXSJn05xZWV5kxQY/OfpFCBpTnvATipYEUey/N62fyszJ3VxVF50 ZA+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="ngjN/beL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d18-20020a170902ced200b001b8a3a8d707si22560064plg.573.2023.09.28.23.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 23:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="ngjN/beL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B653D8218206; Thu, 28 Sep 2023 13:51:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbjI1Uuv (ORCPT + 99 others); Thu, 28 Sep 2023 16:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjI1Uuu (ORCPT ); Thu, 28 Sep 2023 16:50:50 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED11D19C for ; Thu, 28 Sep 2023 13:50:48 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5a23ad271d7so3767887b3.1 for ; Thu, 28 Sep 2023 13:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695934248; x=1696539048; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=wFc5hTa80jKfBeJT8UIj3Z/mvzdtWsUzhjvdORiKXpw=; b=ngjN/beLi46M8TAkdt7/MULJHvyPvbBVjV5l4Qw2LDwxjC0lWtpzfQwvwnsNkxeIwQ hjFL8dqsw+G4LXCmqCUbnGLfAUY2nsemSpz5COqRfODCKJv6VJAW2gy0vDMCjqwxWudu 1h2hZGSOvlSTPVzYXgnZw5vr6rx4TUlWx53pgmJufzGnOmLvqCRqCyeOOgIrf+PXILZP oslEQb/7QxKN2QYdgGFt1eH61wAkmr0kdKRUJVMozYu4xGDVmxwvFkaJ2STBeAN2d5Nr SPWynijTTnwJ0WLxDoan1Uawhlzdiwa6nHzSgvCeOI9bdPG5IjT4i5wDTpLYqLwQEuSs 0clQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695934248; x=1696539048; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wFc5hTa80jKfBeJT8UIj3Z/mvzdtWsUzhjvdORiKXpw=; b=qCQKjRHy51DVUVvyFDzO4WmrWAUZ1vpxxEQZ14UPp5R9DrvK4Lpq3bRT5wLdhY+9fp 7JFTjrOZ51/63bZMDKHYZoXalkCrV35ROuiPXV5CGWcALJaoGmH0fIoCtDT0na09zCKx cQ6RLf4hFKPYz0VGrDqDsav5XddrU7sotJyGUscmQVmnKa7Kq2F2O7sTv3sa8ExDAyif lvQyt5ifvIUNQdZLdZBrhdu8iuNfQDQTDZkhEYgI9XbNBQH6RBqN2b7uYir+XAP80RkK fqAdkV1G1nhUTfJxo9bO3u/Go4SLjvWyC+Q62PAnLmE5OMttubOOAOXKBzOR49Fg5Hfq zd9A== X-Gm-Message-State: AOJu0Yy22bMMMXiug1ujAjDdeXr989NWlViLvDE0Y1Pqi9RwmG76471v adfiVwDdiOe96V8R0R4S1mpBSibCJjGq X-Received: from anyblade.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:1791]) (user=mmaurer job=sendgmr) by 2002:a25:fc26:0:b0:d80:904d:c211 with SMTP id v38-20020a25fc26000000b00d80904dc211mr31278ybd.7.1695934248220; Thu, 28 Sep 2023 13:50:48 -0700 (PDT) Date: Thu, 28 Sep 2023 20:49:25 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.582.g8ccd20d70d-goog Message-ID: <20230928205045.2375899-1-mmaurer@google.com> Subject: [PATCH v2] rust: Use awk instead of recent xargs From: Matthew Maurer To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho Cc: Matthew Maurer , Boqun Feng , Gary Guo , "=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?=" , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 28 Sep 2023 13:51:19 -0700 (PDT) `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). Signed-off-by: Matthew Maurer --- I absorbed the grep and cut into the awk command as well, as Joe Perches suggested. rust/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rust/Makefile b/rust/Makefile index 87958e864be0..c4e583e9e443 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -364,9 +364,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE 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 '/ (T|R|D) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@ $(obj)/exports_core_generated.h: $(obj)/core.o FORCE $(call if_changed,exports) -- 2.42.0.582.g8ccd20d70d-goog