diff options
| author | Nicolas Schier <n.schier@fritz.com> | 2026-06-17 16:09:48 +0200 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-10-03 14:28:11 +0200 |
| commit | 2dee3d3adcadcc57d62ba6608cd02f50b0c10264 (patch) | |
| tree | d4d90d5cb10fbc3f3954f780b4ff38abd63d2119 /scripts/checkstack.pl | |
| parent | a41ec2936d2fecdb958e4f4417781771bcfa683d (diff) | |
| download | linux-next-2dee3d3adcadcc57d62ba6608cd02f50b0c10264.tar.gz linux-next-2dee3d3adcadcc57d62ba6608cd02f50b0c10264.zip | |
rust: kbuild: Replace and dissolve procmacro-extension variable
Use make's $(basename) function [1] and substitution reference [2]
instead of $(patsubst) to extract crate names for rust procmacro
targets. As there is only one user of the procmacro-extension variable,
do the crate name extraction in-place and remove procmacro-extension.
The procmacro-extension variable is used to record the binary file
suffix of dynamically loadable rust libraries -- which is 'so' on Linux
and others and 'dylib' in MacOS -- to remove that very suffix from a
target file name for reconstructing the corresponding crate name in
cmd_rustc_procmacro. Extracting the crate name from the target name
in-place is shorter and reduces complexity.
Link: https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html # [1]
Link: https://www.gnu.org/software/make/manual/html_node/Substitution-Refs.html # [2]
Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Tested-by: Tamir Duberstein <tamird@kernel.org>
Signed-off-by: Nicolas Schier <n.schier@fritz.com>
Link: https://lore.kernel.org/linux-kbuild/CANiq72nmPPF=6AUp5mcDJVni80ORQr0AQ-4uCZaE+CzB5kV=eg@mail.gmail.com/
Link: https://patch.msgid.link/20260617-rust-kbuild-replace-procmacro-extension-v2-1-667bdc3a6435@fritz.com
[ Rebased. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
