]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake.conf/rust-common: Fix DEBUG_PREFIX_MAP_EXTRA handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Nov 2025 09:26:50 +0000 (09:26 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Nov 2025 17:48:50 +0000 (17:48 +0000)
To avoid errors we need to set a weak default for DEBUG_PREFIX_MAP_EXTRA
as it is not always set by toolchain include files.

Also, bug YOCTO #15976 mixes flags to the llvm compiler in rust and
we need to avoid the canon-prefix-map option in DEBUG_PREFIX_MAP_EXTRA.
For now, just remove this until we can properly fix the rust flags handling.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rust-common.bbclass
meta/conf/bitbake.conf

index 31331c7a268001058182c1da7815a096e31fb21f..34bb2377cf41895830f756ab685adbe0ebe829eb 100644 (file)
@@ -18,6 +18,8 @@ RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}"
 RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
 RUSTLIB_DEP ??= "libstd-rs"
 RUST_PANIC_STRATEGY ??= "unwind"
+# See https://bugzilla.yoctoproject.org/show_bug.cgi?id=15976
+DEBUG_PREFIX_MAP_EXTRA:toolchain-gcc = ""
 
 def target_is_armv7(d):
     '''Determine if target is armv7'''
index 600d4baffb7220034373af84b1f840e87e6fb871..729f92fcdb986d021f9242a4b104e80cd431f81e 100644 (file)
@@ -649,6 +649,7 @@ EXTRA_OEMAKE:prepend:task-install = "${PARALLEL_MAKEINST} "
 # Optimization flags.
 ##################################################################
 TARGET_DBGSRC_DIR ?= "/usr/src/debug/${PN}/${PV}"
+DEBUG_PREFIX_MAP_EXTRA ??= ""
 # Beware: applied last to first
 DEBUG_PREFIX_MAP ?= "${DEBUG_PREFIX_MAP_EXTRA} \
  -ffile-prefix-map=${S}=${TARGET_DBGSRC_DIR} \