From patchwork Mon Nov 16 23:12:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 104569 Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.6301.1794870776408316459 for ; Mon, 16 Nov 2026 15:12:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=e+8Vftqd; spf=pass (domain: konsulko.com, ip: 209.85.222.45, mailfrom: scott.murray@konsulko.com) Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-99bf7b97f12so221582241.0 for ; Mon, 16 Nov 2026 15:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1794870775; x=1795475575; 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=n1PXFM5122XFA8wU6RuABqm/h6dYdyv9g6WY7+KVlcg=; b=e+8Vftqdj9UA/GkRwPd2at5rqwP93jBIH+xKzQ97+/NGL65m3JKj2Cp7OA2ToCf85w deCeA3rZxj5OK08XnnsZEiE/+aiPMdst2iVa+b2dRuGnbaQLTmWekB76UfWQ2Wo4EOKy rJvFl1+PAIleNTLtUMpkRhAPNnvBzNvK8b/mM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794870775; x=1795475575; 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=n1PXFM5122XFA8wU6RuABqm/h6dYdyv9g6WY7+KVlcg=; b=cMT42y6c+lxcOf2CDdMXsB0AGsowgmLB2LYHwVTfAHLZFe7RMvNpyqgQxzQzjva6xn oRrANS2JNKTzJjbC1QRqq6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 yoGKKYoHx9MOLNq1US3u9CV/367UzKT216pzFzeUl9lpG1fWKhOVLSOpIrEIsrhRY9J4= X-Received: by 2002:a05:6102:644a:b0:7ce:645a:139e with SMTP id ada2fe7eead31-7d69f7d3540mr248463137.23.1794870774948; Mon, 16 Nov 2026 15:12:54 -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 71dfb90a1353d-5ee34e9516dsm7575235e0c.12.2026.11.16.15.12.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 15:12:54 -0800 (PST) From: Scott Murray To: yocto-patches@lists.yoctoproject.org Subject: [meta-lts-mixins][wrynose/rust][PATCH 03/19] cargo_common: map the cargo vendoring directory for the C compiler Date: Mon, 16 Nov 2026 18:12:24 -0500 Message-ID: <509fb1941c0dd7de502ec175de1595cd22adcd51.1794870526.git.scott.murray@konsulko.com> X-Mailer: git-send-email 2.56.0 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 ; Mon, 16 Nov 2026 23:13:03 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5441 From: Markus Volk Crates that ship C or assembly sources, ring being a prominent one, compile them through the cc crate rather than rustc. RUST_DEBUG_REMAP only passes --remap-path-prefix to rustc, and DEBUG_PREFIX_MAP covers S, B and the sysroots, so nothing rewrites the paths below CARGO_HOME. The build directory of every vendored crate therefore ends up in the debug symbols, which trips the buildpaths QA check and leaves recipes working around it by dropping their -dbg package. Add the vendoring directory to DEBUG_PREFIX_MAP so those objects are remapped like the rest. Tested on corei7-64 with yazi and eilmeldung, both of which had dropped their -dbg package for this reason: after the change they package the debug symbols with no reference to the build tree left. AI-Generated: Uses Claude Code (Claude Opus 5) Signed-off-by: Markus Volk Signed-off-by: Mathieu Dubois-Briand (adapted from oe-core commit fd245ac1c2dfa2de2dad96b7db2a0201bc5c25d4) Signed-off-by: Scott Murray --- classes-recipe/cargo_common.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes-recipe/cargo_common.bbclass b/classes-recipe/cargo_common.bbclass index f58bd80..1478262 100644 --- a/classes-recipe/cargo_common.bbclass +++ b/classes-recipe/cargo_common.bbclass @@ -51,6 +51,11 @@ CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${BUILD_DIR}" # Where we download our registry and dependencies to export CARGO_HOME = "${UNPACKDIR}/cargo_home" +# Crates that compile C or assembly sources do so through the cc crate, which +# is not covered by the rustc specific RUST_DEBUG_REMAP, so map the vendoring +# directory for the C compiler as well. +DEBUG_PREFIX_MAP += "-ffile-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}" + # Don't instruct cargo to use crates downloaded by bitbake. Some rust packages, # for example the rust compiler itself, come with their own vendored sources. # Specifying two [source.crates-io] will not work.