From: Matthew Maurer Date: Thu, 28 Sep 2023 20:49:25 +0000 (+0000) Subject: rust: Use awk instead of recent xargs X-Git-Tag: v6.7-rc1~164^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45f97e6385cad6d0e48a27ddcd08793bb4d35851;p=thirdparty%2Flinux.git rust: Use awk instead of recent xargs `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 Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl Reviewed-by: Martin Rodriguez Reboredo Link: https://lore.kernel.org/r/20230928205045.2375899-1-mmaurer@google.com Signed-off-by: Miguel Ojeda --- diff --git a/rust/Makefile b/rust/Makefile index 87958e864be02..c4e583e9e4438 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)