* [PATCH v2] rust: Use awk instead of recent xargs
@ 2023-09-28 20:49 Matthew Maurer
2023-09-28 21:06 ` Martin Rodriguez Reboredo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Maurer @ 2023-09-28 20:49 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>
---
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] rust: Use awk instead of recent xargs
2023-09-28 20:49 [PATCH v2] rust: Use awk instead of recent xargs Matthew Maurer
@ 2023-09-28 21:06 ` Martin Rodriguez Reboredo
2023-10-02 8:21 ` Alice Ryhl
2023-10-15 20:05 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Martin Rodriguez Reboredo @ 2023-09-28 21:06 UTC (permalink / raw)
To: Matthew Maurer, Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, rust-for-linux, linux-kernel
On 9/28/23 17:49, Matthew Maurer wrote:
> `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: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] rust: Use awk instead of recent xargs
2023-09-28 20:49 [PATCH v2] rust: Use awk instead of recent xargs Matthew Maurer
2023-09-28 21:06 ` Martin Rodriguez Reboredo
@ 2023-10-02 8:21 ` Alice Ryhl
2023-10-15 20:05 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Alice Ryhl @ 2023-10-02 8:21 UTC (permalink / raw)
To: Matthew Maurer
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
rust-for-linux, linux-kernel
On Thu, Sep 28, 2023 at 10:50 PM Matthew Maurer <mmaurer@google.com> wrote:
>
> `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>
Tested both in an Android and non-Android build.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Tested-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] rust: Use awk instead of recent xargs
2023-09-28 20:49 [PATCH v2] rust: Use awk instead of recent xargs Matthew Maurer
2023-09-28 21:06 ` Martin Rodriguez Reboredo
2023-10-02 8:21 ` Alice Ryhl
@ 2023-10-15 20:05 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2023-10-15 20:05 UTC (permalink / raw)
To: Matthew Maurer
Cc: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, rust-for-linux, linux-kernel
On Thu, Sep 28, 2023 at 10:50 PM Matthew Maurer <mmaurer@google.com> wrote:
>
> `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>
Applied to `rust-next` -- thanks everyone!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-15 20:06 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:49 [PATCH v2] rust: Use awk instead of recent xargs Matthew Maurer
2023-09-28 21:06 ` Martin Rodriguez Reboredo
2023-10-02 8:21 ` Alice Ryhl
2023-10-15 20:05 ` Miguel Ojeda
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®