From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A4A80262FEC; Sun, 1 Mar 2026 02:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330675; cv=none; b=bJQPiui5SzZCJLKDqUh3uUQzdsJGlX6ldKb60HULEZLjwNyELX6wXDQy1qZgv9747RhCk08J2k8uuU4Lj/gfWQIjbusBoQhagITmGioXGYBp4q6ufUzTHkHoBFATrm40NKb9dzW8BS9QNgKd9cylxUzT2JbYGLL9LGOySCafBD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330675; c=relaxed/simple; bh=RneSqO77SPtKlPlrjTpRDVwnuTVBSZTVYktsO9uXJLw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bOM2/l7csYHCnitDpxdc6DEUznRWnHD8kzNNnQHhm8XoVR3Kmdjr9GlpfWrRT0oL0vHDqkrdYnf7UlsCyDRR9J05Iinx91RkSsdg7Qz8f8QCkzwD6wQVXTz0ahRGQmXKXPMQb6naJObT9l3/lmlTTVCu6jIcEW3zcAew6KEVgyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OsANHFED; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OsANHFED" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE8C8C19421; Sun, 1 Mar 2026 02:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772330675; bh=RneSqO77SPtKlPlrjTpRDVwnuTVBSZTVYktsO9uXJLw=; h=From:To:Cc:Subject:Date:From; b=OsANHFEDqiEGJtPcemGXyBNGY5gbGfphDkZX3NLVe8zWyKqZraXyjohrGMJ0L1KEM ElOri9aQCGaTCw0HtJlcCk6r3i1K8avJfdDMIUdB0TTAWPF+7bsFm4lkDXJ+oFb6Gx H3dcIIRi8IXnGlKEG8JVDnSXpTKsWJLoU+7b0j9VyDdJut5RIULvgs5KUwW3NTXlyf qnanKjKMEkoYU8uHH+ZSrTjP/eBHsZ707e+KB4osbT6IzcW+w6P2i0uQYAhg/0WC4j rt5EJvuRc8MjWmNQw1GSp6ltt7GRne1HjvX0L+WEcstQ8Lb8AX1L6SsYdJUNfug8bM gNcAUx3keNH/Q== From: Sasha Levin To: stable@vger.kernel.org, ojeda@kernel.org Cc: David Wood , Wesley Wiser , Gary Guo , rust-for-linux@vger.kernel.org Subject: FAILED: Patch "rust: kbuild: pass `-Zunstable-options` for Rust 1.95.0" failed to apply to 5.10-stable tree Date: Sat, 28 Feb 2026 21:04:33 -0500 Message-ID: <20260301020433.1733030-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 0a9be83e57de0d0ca8ca4ec610bc344f17a8e5e7 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Fri, 6 Feb 2026 21:45:35 +0100 Subject: [PATCH] rust: kbuild: pass `-Zunstable-options` for Rust 1.95.0 Custom target specifications are unstable, but starting with Rust 1.95.0, `rustc` requires to explicitly pass `-Zunstable-options` to use them [1]: error: error loading target specification: custom targets are unstable and require `-Zunstable-options` | = help: run `rustc --print target-list` for a list of built-in targets David (Rust compiler team lead), writes: "We're destabilising custom targets to allow us to move forward with build-std without accidentally exposing functionality that we'd like to revisit prior to committing to. I'll start a thread on Zulip to discuss with the RfL team how we can come up with an alternative for them." Thus pass it. Cc: David Wood Cc: Wesley Wiser 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/151534 [1] Reviewed-by: Gary Guo Tested-by: Gary Guo Link: https://patch.msgid.link/20260206204535.39431-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- rust/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/Makefile b/rust/Makefile index 4dcc2eff51cb2..725158740fc6f 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -552,6 +552,8 @@ $(obj)/$(libpin_init_internal_name): private rustc_target_flags = --cfg kernel $(obj)/$(libpin_init_internal_name): $(src)/pin-init/internal/src/lib.rs FORCE +$(call if_changed_dep,rustc_procmacro) +# `rustc` requires `-Zunstable-options` to use custom target specifications +# since Rust 1.95.0 (https://github.com/rust-lang/rust/pull/151534). quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L $@ cmd_rustc_library = \ OBJTREE=$(abspath $(objtree)) \ @@ -562,6 +564,7 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L --crate-type rlib -L$(objtree)/$(obj) \ --crate-name $(patsubst %.o,%,$(notdir $@)) $< \ --sysroot=/dev/null \ + -Zunstable-options \ $(if $(rustc_objcopy),;$(OBJCOPY) $(rustc_objcopy) $@) \ $(cmd_objtool) -- 2.51.0