Skip to content

Commit 45f97e6

Browse files
maurerojeda
authored andcommitted
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 <mmaurer@google.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Link: https://lore.kernel.org/r/20230928205045.2375899-1-mmaurer@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent e08ff62 commit 45f97e6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

rust/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE
364364
quiet_cmd_exports = EXPORTS $@
365365
cmd_exports = \
366366
$(NM) -p --defined-only $< \
367-
| grep -E ' (T|R|D) ' | cut -d ' ' -f 3 \
368-
| xargs -Isymbol \
369-
echo 'EXPORT_SYMBOL_RUST_GPL(symbol);' > $@
367+
| awk '/ (T|R|D) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
370368

371369
$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
372370
$(call if_changed,exports)

0 commit comments

Comments
 (0)