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 806812BB1D; Fri, 6 Feb 2026 20:45:46 +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=1770410746; cv=none; b=p3ZMH293Ge/Rl2ecEf0jGDn05e/yhda1jtdWCaWxAaou37IjGB4dETdyNRTKo5+OMkzpNqeNW2pCeKcTwbqkH/LxTnwhwLvGr+7KeJ1ZP6/Nz54zNmWlWnomulWlS6Ly5TgCA6MQ9AVHToLKFHq3AOsUImOqaPivsHZOFToOvNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770410746; c=relaxed/simple; bh=O+HFQ1UozoePstlcPyJvGR3tRsRc5nWO8y2FvMc6lV8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BRUdV5ZSwTJe2XJNXvvSoiT1VKPRuP1t5dCHIrpKA5JEUX8P2VLLUIs5Xj2EYLOJ30o1Vr8JBdgq5WzssscDAzS2F+2XIwTSiVu0vIJVpbk8NBiV0Yu7FT7hJN5XOv0s+Tx+jlGy0+dJf+jlTa4bFaf0cezXsaTAR4voQnt4mBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tu5OlpZD; 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="tu5OlpZD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B797C116C6; Fri, 6 Feb 2026 20:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770410746; bh=O+HFQ1UozoePstlcPyJvGR3tRsRc5nWO8y2FvMc6lV8=; h=From:To:Cc:Subject:Date:From; b=tu5OlpZDwx5lFetlZQtYLmCeXVmb2Xq9b1daGWFb0+3dUJ17Z+8YIj+AqWKFLHSXV 6k6nYj8IlGGJjZ36HaPWKoPnU/VC41kg+0wEiQbPqaRauvgu2rXsTl640DB2hPwMJx 1mOV4/iu6aAwUb8E2pz4OVb200+D82iqdXeGkh+xtUBjog3YsNTZZkVkyAdyjqPJO1 3MxRk48YrSEVFqk7Id5LWLLVI7NYVGC8QyeaMncmAIMS/fAXO6bstro81zLoQNPgTC NdzgZV2HPGyZxwmx8uoL2e7HOcaNexZ/rBu0DooOiE2O39FKR/B8ZfNcUO21SiFx8Y LeHY9bNpBmAvg== From: Miguel Ojeda To: Miguel Ojeda , Alex Gaynor , Nathan Chancellor , Nicolas Schier Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, David Wood , Wesley Wiser , stable@vger.kernel.org Subject: [PATCH] rust: kbuild: pass `-Zunstable-options` for Rust 1.95.0 Date: Fri, 6 Feb 2026 21:45:35 +0100 Message-ID: <20260206204535.39431-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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] Signed-off-by: Miguel Ojeda --- rust/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/Makefile b/rust/Makefile index 4dcc2eff51cb..725158740fc6 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) base-commit: 18f7fcd5e69a04df57b563360b88be72471d6b62 -- 2.53.0