summaryrefslogtreecommitdiff
path: root/rust/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-07-25 10:15:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-07-25 10:15:23 -0700
commit3dab139d4795f688e4f243e40c7474df00d329d9 (patch)
treea1a5e86f6d9e9ea1c74d6d04541f9be9e3c12d17 /rust/Makefile
parentef9ce800df95726978490534f9e2c14ca71858e8 (diff)
parent880c43b185ca52239e75bc546cc4f4d9154d0fed (diff)
Merge tag 'rust-fixes-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linuxHEADmaster
Pull rust fixes from Miguel Ojeda: "Toolchain and infrastructure: - 'zerocopy' crates: update to v0.8.54 to fix a modpost error under 'CONFIG_CC_OPTIMIZE_FOR_SIZE=y'. There are actually two updates in the PR: the one to v0.8.52 is fairly large and was originally not intended for a fixes PR, but the actual fix landed in the v0.8.54 one. Thus I included both here. The v0.8.52 update includes two things upstream added for us: '--cfg no_fp_fmt_parse' to avoid a local workaround, and the new 'most_traits' feature. The good news is that, after these updates, the delta with upstream is now trivial: only an identifier prefix change and the SPDX parentheses. - Fix an objtool warning by adding one more 'noreturn' function for Rust 1.99.0 (expected 2026-10-01). - Clean up new 'semicolon_in_expressions_from_macros' lint errors for Rust 1.99.0 (expected 2026-10-01). The lint can be allowed, but it will be a hard error at some point in the future anyway, so clean it up now. - Locally allow new 'suspicious_runtime_symbol_definitions' lint for Rust 1.98.0 (expected 2026-08-20). - Globally allow 'clippy::unwrap_or_default' lint since it relies on optimizations -- under 'CONFIG_CC_OPTIMIZE_FOR_SIZE=y' it does not work well. 'kernel' crate: - 'time' module: fix 'Delta::as_micros_ceil()' to round negative values correctly" * tag 'rust-fixes-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: rust: time: fix as_micros_ceil() to round correctly for negative Delta rust: device: avoid trailing ; in printing macros objtool/rust: add one more `noreturn` Rust function for Rust 1.99.0 rust: zerocopy: update to v0.8.54 rust: zerocopy: update to v0.8.52 rust: allow `clippy::unwrap_or_default` globally rust: allow `suspicious_runtime_symbol_definitions` lint for Rust >= 1.98
Diffstat (limited to 'rust/Makefile')
-rw-r--r--rust/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/rust/Makefile b/rust/Makefile
index a870d1616c71..627ed79dc6f5 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -84,11 +84,15 @@ core-flags := \
--edition=$(core-edition) \
$(call cfgs-to-flags,$(core-cfgs))
+zerocopy-cfgs := \
+ no_fp_fmt_parse
+
zerocopy-flags := \
- --cap-lints=allow
+ --cap-lints=allow \
+ $(call cfgs-to-flags,$(zerocopy-cfgs))
zerocopy-envs := \
- CARGO_PKG_VERSION=0.8.50
+ CARGO_PKG_VERSION=0.8.54
proc_macro2-cfgs := \
feature="proc-macro" \
@@ -128,11 +132,15 @@ syn-flags := \
--extern quote \
$(call cfgs-to-flags,$(syn-cfgs))
+zerocopy_derive-cfgs := \
+ zerocopy_unstable_linux
+
zerocopy_derive-flags := \
--cap-lints=allow \
--extern proc_macro2 \
--extern quote \
- --extern syn
+ --extern syn \
+ $(call cfgs-to-flags,$(zerocopy_derive-cfgs))
pin_init_internal-cfgs := \
kernel USE_RUSTC_FEATURES
@@ -644,9 +652,11 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L
rust-analyzer:
$(Q)MAKEFLAGS= $(srctree)/scripts/generate_rust_analyzer.py \
--cfgs='core=$(core-cfgs)' $(core-edition) \
+ --cfgs='zerocopy=$(zerocopy-cfgs)' \
--cfgs='proc_macro2=$(proc_macro2-cfgs)' \
--cfgs='quote=$(quote-cfgs)' \
--cfgs='syn=$(syn-cfgs)' \
+ --cfgs='zerocopy_derive=$(zerocopy_derive-cfgs)' \
--cfgs='pin_init_internal=$(pin_init_internal-cfgs)' \
--cfgs='pin_init=$(pin_init-cfgs)' \
--envs='zerocopy=$(zerocopy-envs)' \