From patchwork Wed Nov 25 22:30:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 105748 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.3152.1795645889348137058 for ; Wed, 25 Nov 2026 14:31:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=Dl/g+hkD; spf=pass (domain: konsulko.com, ip: 209.85.160.179, mailfrom: scott.murray@konsulko.com) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-55c48582654so70625851cf.0 for ; Wed, 25 Nov 2026 14:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1795645888; x=1796250688; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=IY1ZM2w0XGzv7PU63zZCnuiUkwDSJUfCVI4QhllJZ4s=; b=Dl/g+hkD9nRjO3KUjgZk/j40y6m9HfpsBAdKW5QTC0wDVuv5aDJgxI9D51YCxXvP3W UTKmhdP6uke2DMboKdIg+396LuQEUk5DcsPwuh4WNiPZV/H+Dwlpj6AAfHy5Xll39UZi ARfA15B/UVkOk99JChB19CAJcJsogeGJ0Fork= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795645888; x=1796250688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=IY1ZM2w0XGzv7PU63zZCnuiUkwDSJUfCVI4QhllJZ4s=; b=NslTUg7hEA7Lt75e1VvyVZsnaCeAlyYpu8KYc4aOZbbPGQfHxWmxrji12E+UHl8juU rZwBofjCM0w0ESUxkoUZNXM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KAT0w9Uw1wjOaTx1w i6MpolW5FfroUkLgBAV2kgHMt/hyUyjt4QOeXslfQahh3XYe720jXOVMRN4GmsO9Pb2vM/HZe6W 2eVda+sD/Uw+8= X-Received: by 2002:a05:622a:14d1:b0:55d:3350:d262 with SMTP id d75a77b69052e-55d76af1864mr363480961cf.52.1795645888079; Wed, 25 Nov 2026 14:31:28 -0800 (PST) Return-Path: Received: from ghidorah.spiteful.org (107-179-213-3.cpe.teksavvy.com. [107.179.213.3]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55d78451407sm167717091cf.2.2026.11.25.14.31.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2026 14:31:27 -0800 (PST) From: Scott Murray To: yocto-patches@lists.yoctoproject.org Subject: [meta-lts-mixins][scarthgap/rust][PATCH 07/19] rust: backport deterministic DocLinkResMap serialisation Date: Wed, 25 Nov 2026 17:30:58 -0500 Message-ID: <8f04fe22783f5c6c1c3bea39257be5ea7259ede8.1795645656.git.scott.murray@konsulko.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Wed, 25 Nov 2026 22:31:38 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5526 From: Sunil Dora Backport of rust-lang/rust commit f9d9939 [1] by jprochazk and mejrs. DocLinkResMap was an UnordMap, so its iteration order varied with the build host and that order reached the encoded rmeta. An FxIndexMap keeps it stable. The commit is in rust 1.99, so this only carries it until the next rust upgrade. [1] https://github.com/rust-lang/rust/commit/f9d9939467a5185a72f0ee8da778a0b71fc966ae [YOCTO #16376] Signed-off-by: Sunil Dora Signed-off-by: Richard Purdie (adapted from oe-core commit 6bc5642801f0ac8960f5f65cf47c7f24d3d565c1) Signed-off-by: Scott Murray --- ...oc-link-metadata-order-deterministic.patch | 40 +++++++++++++++++++ recipes-devtools/rust/rust-source.inc | 1 + 2 files changed, 41 insertions(+) create mode 100644 recipes-devtools/rust/files/0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch diff --git a/recipes-devtools/rust/files/0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch b/recipes-devtools/rust/files/0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch new file mode 100644 index 0000000..8cd64f2 --- /dev/null +++ b/recipes-devtools/rust/files/0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch @@ -0,0 +1,40 @@ +From 6630363e7bc9bc0926300e242aa538b8d92cdb95 Mon Sep 17 00:00:00 2001 +From: jprochazk +Date: Tue, 15 Sep 2026 17:05:36 +0530 +Subject: [PATCH] make DocLinkResMap an FxIndexMap + +DocLinkResMap was an UnordMap, so its iteration order varied with the build +host and that order ended up in the encoded rmeta. An FxIndexMap keeps the +serialisation stable. Only the code change is carried here, not the +upstream run-make test. + +Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/f9d9939467a5185a72f0ee8da778a0b71fc966ae] + +Signed-off-by: Sunil Dora +--- + compiler/rustc_hir/src/def.rs | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs +index d0300d6..e903c0c 100644 +--- a/compiler/rustc_hir/src/def.rs ++++ b/compiler/rustc_hir/src/def.rs +@@ -4,7 +4,7 @@ use std::fmt::Debug; + + use rustc_ast as ast; + use rustc_ast::NodeId; +-use rustc_data_structures::unord::UnordMap; ++use rustc_data_structures::fx::FxIndexMap; + use rustc_error_messages::{DiagArgValue, IntoDiagArg}; + use rustc_macros::{Decodable, Encodable, StableHash}; + use rustc_span::Symbol; +@@ -969,4 +969,6 @@ pub enum LifetimeRes { + ElidedAnchor { start: NodeId, end: NodeId }, + } + +-pub type DocLinkResMap = UnordMap<(Symbol, Namespace), Option>>; ++// FxIndexMap is necessary because its data ends up in .rmeta files, so its ++// iteration order must be consistent. See #159677 for context. ++pub type DocLinkResMap = FxIndexMap<(Symbol, Namespace), Option>>; +-- +2.43.0 diff --git a/recipes-devtools/rust/rust-source.inc b/recipes-devtools/rust/rust-source.inc index 2beec08..66fbdc6 100644 --- a/recipes-devtools/rust/rust-source.inc +++ b/recipes-devtools/rust/rust-source.inc @@ -10,6 +10,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://0004-Backport-commits-from-rust-Fix-selftest-llvm23.patch;patchdir=${RUSTSRC} \ file://0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch;patchdir=${RUSTSRC} \ file://0007-cargo-omit-host-triple-from-unit-metadata-hash.patch;patchdir=${RUSTSRC} \ + file://0008-rustc-hir-make-doc-link-metadata-order-deterministic.patch;patchdir=${RUSTSRC} \ " SRC_URI[rust.sha256sum] = "be1816e7f6c40abb90245ad6e024bed2a7e88d7dda4561e4d5470207df616b9f"