aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Maurer <[email protected]>2023-09-28 20:49:25 +0000
committerMiguel Ojeda <[email protected]>2023-10-15 21:48:24 +0200
commit45f97e6385cad6d0e48a27ddcd08793bb4d35851 (patch)
tree0b3a7d3acc924c8899ce9b05d74579b3615f6920
parente08ff622c91af997cb89bc47e90a1a383e938bd0 (diff)
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 <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Tested-by: Alice Ryhl <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
-rw-r--r--rust/Makefile4
1 files changed, 1 insertions, 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)