]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cargo_common: add CARGO_HOME to DEBUG_PREFIX_MAP
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 27 Mar 2025 13:27:36 +0000 (14:27 +0100)
committerMartin Jansa <martin.jansa@gmail.com>
Fri, 1 Aug 2025 07:34:35 +0000 (09:34 +0200)
* it was done with CFLAGS only in python3-maturin but it could be useful
  for other recipes as well, move it to bbclass which sets CARGO_HOME

* python3-maturin buildflags issue is reproducible with scarthgap:
  WARNING: python3-maturin-1.4.0-r0 do_package_qa: QA Issue: File /usr/bin/.debug/maturin in package python3-maturin-dbg contains reference to TMPDIR [buildpaths]
  but not with whinlatter

meta/classes-recipe/cargo_common.bbclass
meta/recipes-devtools/python/python3-maturin_1.9.1.bb

index c9eb2d09a522d57c8a96464a810cfbce33ee35f6..75540f2159dfee4fae6b0400cfefa6f4c7834438 100644 (file)
@@ -20,6 +20,9 @@ inherit rust-common
 # Where we download our registry and dependencies to
 export CARGO_HOME = "${UNPACKDIR}/cargo_home"
 
+DEBUG_PREFIX_MAP:append = " -ffile-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}/cargo_home"
+
+
 # The pkg-config-rs library used by cargo build scripts disables itself when
 # cross compiling unless this is defined. We set up pkg-config appropriately
 # for cross compilation, so tell it we know better than it.
index ce38e9313600ff0c6fe62e56f53f7f91a83c0066..3204ea19ab4d90fa776c30247a39fc68bb2fdf61 100644 (file)
@@ -9,8 +9,6 @@ SRC_URI[sha256sum] = "97b52fb19d20c1fdc70e4efdc05d79853a4c9c0051030c93a793cd5181
 
 S = "${UNPACKDIR}/maturin-${PV}"
 
-CFLAGS += "-ffile-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}/cargo_home"
-
 DEPENDS += "\
     python3-setuptools-rust-native \
     python3-semantic-version-native \