diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2025-02-10 17:42:45 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:11:40 +0100 |
| commit | 1814e71a4e9c20bd69dbe1e007d31c0ab2c237a2 (patch) | |
| tree | 6eb16d9fbf77e5da2625ebc6df3f80b0eb24cb09 /Documentation | |
| parent | cef081c8231b52b4a652bbd022e03d80441118be (diff) | |
| download | linux-1814e71a4e9c20bd69dbe1e007d31c0ab2c237a2.tar.gz linux-1814e71a4e9c20bd69dbe1e007d31c0ab2c237a2.tar.bz2 linux-1814e71a4e9c20bd69dbe1e007d31c0ab2c237a2.zip | |
kbuild: rust: add rustc-min-version support function
commit ac954145e1ee3f72033161cbe4ac0b16b5354ae7 upstream.
Introduce `rustc-min-version` support function that mimics
`{gcc,clang}-min-version` ones, following commit 88b61e3bff93
("Makefile.compiler: replace cc-ifversion with compiler-specific macros").
In addition, use it in the first use case we have in the kernel (which
was done independently to minimize the changes needed for the fix).
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Fiona Behrens <me@Kloenk.dev>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/kbuild/makefiles.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 7964e0c245ae..81607ce40759 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -656,6 +656,20 @@ cc-cross-prefix endif endif +$(RUSTC) support functions +-------------------------- + +rustc-min-version + rustc-min-version tests if the value of $(CONFIG_RUSTC_VERSION) is greater + than or equal to the provided value and evaluates to y if so. + + Example:: + + rustflags-$(call rustc-min-version, 108500) := -Cfoo + + In this example, rustflags-y will be assigned the value -Cfoo if + $(CONFIG_RUSTC_VERSION) is >= 1.85.0. + $(LD) support functions ----------------------- |
