From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F5653A8746; Tue, 16 Jun 2026 15:27:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781623641; cv=none; b=KLGsSUzpcKYM/pRJRpTpBu211C0ArQrcK/P4u/O+dJDh2fcBJcta3vYbAUzArhhGXBwP5pRc5GsHYAXwOGJC6sAJPOwKTDheD9pITCPh5mLVY42XVVLXl1EemQXjD4qhjfxpduh+9MTuNAg3EvQL1LE1D6yy3/fAiAPidnceOGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781623641; c=relaxed/simple; bh=JFtzolJRzXOV5E/eIYM2MCMicEiNyU4IyiObzFWYfBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JmsrD98x8U9GsYCFOtSGTDe2LZOlXTka/ELfcH/ryAHTyjG9Tx8Xc/DXEd3a+Xmp+oc/wr5CV7MvSmM1mZm0xV1EMobF6yUWMgIhyKgR5dhgKyexOifDmDmqlzVV+1N0yHzzoIguCxnvBENY0mTmk3KQdpsBHJt4yDEx/YVMTwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=n7sq0wS9; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="n7sq0wS9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B28E1F000E9; Tue, 16 Jun 2026 15:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781623640; bh=YAwGM0c1i73CdqDk2uWs5JGgvPS5R5lo96LVREipHbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=n7sq0wS9U0zrmJsybI01s8nXRKLzACHPD6m+X3RtjcK0oGiZ2Hf/nWekcC64FOoL3 /TfXYe+pUzKyHftCBzxhrM/GKfxdpdkt5WnTSMre+7+XnJUExJBmLkdBM67bZQT6ac bScGKCWfX16w/dDgMwgsF6HL30NinY0dAo7H56So= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ralf Jung , Alice Ryhl , Miguel Ojeda Subject: [PATCH 7.0 188/378] rust: x86: support Rust >= 1.98.0 target spec Date: Tue, 16 Jun 2026 20:26:59 +0530 Message-ID: <20260616145120.276626553@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145109.744539446@linuxfoundation.org> References: <20260616145109.744539446@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miguel Ojeda commit 905b06d32a52afe32fcf5f30cf298c9ea6359f11 upstream. Starting with Rust 1.98.0 (expected 2026-08-20), the target spec will not support `x86-softfloat` anymore [1]. Instead, `softfloat` should be used, which is an alias. Otherwise, one gets: error: error loading target specification: rustc-abi: invalid rustc abi: 'x86-softfloat'. allowed values: 'x86-sse2', 'softfloat' at line 3 column 32 | = help: run `rustc --print target-list` for a list of built-in targets Thus conditionally use one or the other depending on the version. The alias has existed since Rust 1.95.0 (released 2026-04-16) [2], but use the newer version instead to avoid changing how the build works for existing compilers, at least until more testing takes place. Cc: Ralf Jung Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). Link: https://github.com/rust-lang/rust/pull/157151 [1] Link: https://github.com/rust-lang/rust/pull/151154 [2] Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20260530114925.260754-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Signed-off-by: Greg Kroah-Hartman --- scripts/generate_rust_target.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/scripts/generate_rust_target.rs +++ b/scripts/generate_rust_target.rs @@ -196,7 +196,9 @@ fn main() { } } else if cfg.has("X86_64") { ts.push("arch", "x86_64"); - if cfg.rustc_version_atleast(1, 86, 0) { + if cfg.rustc_version_atleast(1, 98, 0) { + ts.push("rustc-abi", "softfloat"); + } else if cfg.rustc_version_atleast(1, 86, 0) { ts.push("rustc-abi", "x86-softfloat"); } ts.push( @@ -236,7 +238,9 @@ fn main() { panic!("32-bit x86 only works under UML"); } ts.push("arch", "x86"); - if cfg.rustc_version_atleast(1, 86, 0) { + if cfg.rustc_version_atleast(1, 98, 0) { + ts.push("rustc-abi", "softfloat"); + } else if cfg.rustc_version_atleast(1, 86, 0) { ts.push("rustc-abi", "x86-softfloat"); } ts.push(