mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rust: Use awk instead of recent xargs
@ 2023-09-28 20:21 Matthew Maurer
  2023-09-28 20:32 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Maurer @ 2023-09-28 20:21 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho
  Cc: Matthew Maurer, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, rust-for-linux,
	linux-kernel

`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>
---
 rust/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rust/Makefile b/rust/Makefile
index 87958e864be0..0efc5b5cd611 100644
--- 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}' > $@
 
 $(obj)/exports_core_generated.h: $(obj)/core.o FORCE
 	$(call if_changed,exports)
-- 
2.42.0.582.g8ccd20d70d-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-29 23:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-28 20:21 [PATCH] rust: Use awk instead of recent xargs Matthew Maurer
2023-09-28 20:32 ` Joe Perches
2023-09-29 21:36   ` David Laight
2023-09-29 23:29     ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®