diff options
| author | Matthew Maurer <mmaurer@google.com> | 2023-09-28 20:49:25 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-12 11:10:21 +0200 |
| commit | 7bb103055cf3c1507589ab693d2375fc693859b7 (patch) | |
| tree | ef35c21caab1255b286067bd2c0719d7c1dc0728 /rust | |
| parent | 4205e8bc45d52a56d5534325c0da2e828c029daf (diff) | |
| download | linux-7bb103055cf3c1507589ab693d2375fc693859b7.tar.gz linux-7bb103055cf3c1507589ab693d2375fc693859b7.tar.bz2 linux-7bb103055cf3c1507589ab693d2375fc693859b7.zip | |
rust: Use awk instead of recent xargs
[ Upstream commit 45f97e6385cad6d0e48a27ddcd08793bb4d35851 ]
`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>
Stable-dep-of: b8673d56935c ("rust: kbuild: fix export of bss symbols")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rust/Makefile b/rust/Makefile index 6d0c0e9757f2..9321a4c83b71 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -303,9 +303,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) |
