summaryrefslogtreecommitdiff
path: root/Documentation/kbuild
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2025-02-10 17:42:45 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2025-03-15 21:19:32 +0900
commitac954145e1ee3f72033161cbe4ac0b16b5354ae7 (patch)
tree1521b1089ba6b334892364c2f3bc070044293ed5 /Documentation/kbuild
parent144fced6852ba11c90560c996e986b4563f089af (diff)
downloadlinux-next-ac954145e1ee3f72033161cbe4ac0b16b5354ae7.tar.gz
linux-next-ac954145e1ee3f72033161cbe4ac0b16b5354ae7.zip
kbuild: rust: add rustc-min-version support function
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>
Diffstat (limited to 'Documentation/kbuild')
-rw-r--r--Documentation/kbuild/makefiles.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
index 25e04e47faff..3b9a8bc671e2 100644
--- a/Documentation/kbuild/makefiles.rst
+++ b/Documentation/kbuild/makefiles.rst
@@ -667,6 +667,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
-----------------------