From patchwork Wed Nov 25 22:30:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 105738 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.3149.1795645886466536677 for ; Wed, 25 Nov 2026 14:31:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=rnkDZoeN; spf=pass (domain: konsulko.com, ip: 209.85.160.177, mailfrom: scott.murray@konsulko.com) Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-55d846e884eso39198461cf.2 for ; Wed, 25 Nov 2026 14:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1795645885; x=1796250685; 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=cM2MxOyCv3++XVfBXeNljV0XrhZwzeASgbidYq7BxKk=; b=rnkDZoeNLQIuh2fV8EOAmiFionOt0dqct309+Y7oTSzSsZV3IW2NCFhG5D6KkQ6dgu cDG2pqsRmoa56ofgM4Z0lUvkHzw+9s0MQO0Go6XBp441bowSxYTd3erhTGmVntDHakdR EVYFgji0vDgExkVxWSTeHgsiyhcRf6/+2PnQs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795645885; x=1796250685; 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=cM2MxOyCv3++XVfBXeNljV0XrhZwzeASgbidYq7BxKk=; b=gfC4Nlm31oUV731JyYoUptwhcmbCOS7m3RYHFthKxBN0pRPMadTLV72KtsnJykxwwx 3mkspU89FxXviw6A9ZV2tY//FHIiIjh9MY9L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6Ft 8elUx1aaTavzpFbLKz/51sd6l0VhNdDROVIXBRQYysqSkDvfTH8QQLIrTkwmMfPPEKQ== X-Received: by 2002:ac8:5f83:0:b0:536:34db:e7c8 with SMTP id d75a77b69052e-55d76a5d53amr369992731cf.33.1795645885183; Wed, 25 Nov 2026 14:31:25 -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.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2026 14:31:24 -0800 (PST) From: Scott Murray To: yocto-patches@lists.yoctoproject.org Subject: [meta-lts-mixins][scarthgap/rust][PATCH 03/19] cargo_common: map the cargo vendoring directory for the C compiler Date: Wed, 25 Nov 2026 17:30:54 -0500 Message-ID: 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:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5521 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 5bf9dc5..885994a 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 = "${WORKDIR}/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.