From: Greg Kroah-Hartman Date: Sun, 7 Sep 2025 12:15:54 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.4.299~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcdc4ae2f51879241b1f909722685d473c805f34;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: rust-support-rust-1.91.0-target-spec.patch --- diff --git a/queue-6.12/rust-support-rust-1.91.0-target-spec.patch b/queue-6.12/rust-support-rust-1.91.0-target-spec.patch new file mode 100644 index 0000000000..e7979f1f50 --- /dev/null +++ b/queue-6.12/rust-support-rust-1.91.0-target-spec.patch @@ -0,0 +1,52 @@ +From 8851e27d2cb947ea8bbbe8e812068f7bf5cbd00b Mon Sep 17 00:00:00 2001 +From: Miguel Ojeda +Date: Fri, 29 Aug 2025 21:55:25 +0200 +Subject: rust: support Rust >= 1.91.0 target spec + +From: Miguel Ojeda + +commit 8851e27d2cb947ea8bbbe8e812068f7bf5cbd00b upstream. + +Starting with Rust 1.91.0 (expected 2025-10-30), the target spec format +has changed the type of the `target-pointer-width` key from string +to integer [1]. + +Thus conditionally use one or the other depending on the version. + +Cc: Waffle Maybe +Link: https://github.com/rust-lang/rust/pull/144443 [1] +Link: https://lore.kernel.org/r/20250829195525.721664-1-ojeda@kernel.org +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + scripts/generate_rust_target.rs | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/scripts/generate_rust_target.rs ++++ b/scripts/generate_rust_target.rs +@@ -223,7 +223,11 @@ fn main() { + ts.push("features", features); + ts.push("llvm-target", "x86_64-linux-gnu"); + ts.push("supported-sanitizers", ["kcfi", "kernel-address"]); +- ts.push("target-pointer-width", "64"); ++ if cfg.rustc_version_atleast(1, 91, 0) { ++ ts.push("target-pointer-width", 64); ++ } else { ++ ts.push("target-pointer-width", "64"); ++ } + } else if cfg.has("X86_32") { + // This only works on UML, as i386 otherwise needs regparm support in rustc + if !cfg.has("UML") { +@@ -243,7 +247,11 @@ fn main() { + } + ts.push("features", features); + ts.push("llvm-target", "i386-unknown-linux-gnu"); +- ts.push("target-pointer-width", "32"); ++ if cfg.rustc_version_atleast(1, 91, 0) { ++ ts.push("target-pointer-width", 32); ++ } else { ++ ts.push("target-pointer-width", "32"); ++ } + } else if cfg.has("LOONGARCH") { + panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target"); + } else { diff --git a/queue-6.12/series b/queue-6.12/series index 8ef1819b13..40880081e4 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -143,3 +143,4 @@ kunit-kasan_test-disable-fortify-string-checker-on-kasan_strings-test.patch mm-fix-accounting-of-memmap-pages.patch thermal-drivers-mediatek-lvts-disable-low-offset-irq-for-minimum-threshold.patch dmaengine-mediatek-fix-a-possible-deadlock-error-in-mtk_cqdma_tx_status.patch +rust-support-rust-1.91.0-target-spec.patch