]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Sep 2025 12:16:10 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Sep 2025 12:16:10 +0000 (14:16 +0200)
added patches:
rust-support-rust-1.91.0-target-spec.patch

queue-6.16/rust-support-rust-1.91.0-target-spec.patch [new file with mode: 0644]
queue-6.16/series

diff --git a/queue-6.16/rust-support-rust-1.91.0-target-spec.patch b/queue-6.16/rust-support-rust-1.91.0-target-spec.patch
new file mode 100644 (file)
index 0000000..bb5b6d8
--- /dev/null
@@ -0,0 +1,52 @@
+From 8851e27d2cb947ea8bbbe8e812068f7bf5cbd00b Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Fri, 29 Aug 2025 21:55:25 +0200
+Subject: rust: support Rust >= 1.91.0 target spec
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+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 <waffle.lapkin@gmail.com>
+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 <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -225,7 +225,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") {
+@@ -245,7 +249,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 {
index 155e13b6552a830118a754e271518dff2672a44a..8cf9eaf8fa2bcb7c42b64d29c488c68cf7f05e1f 100644 (file)
@@ -140,3 +140,4 @@ net-pcs-rzn1-miic-correct-modctrl-register-offset.patch
 microchip-lan865x-fix-module-autoloading.patch
 microchip-lan865x-fix-lan8651-autoloading.patch
 drm-dp-change-aux-dpcd-probe-address-from-lane0_1_status-to-training_pattern_set.patch
+rust-support-rust-1.91.0-target-spec.patch