From: Martin Jansa Date: Thu, 27 Mar 2025 13:27:36 +0000 (+0100) Subject: cargo_common: add CARGO_HOME to DEBUG_PREFIX_MAP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fjansa%2Fmaster;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git cargo_common: add CARGO_HOME to DEBUG_PREFIX_MAP * 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 --- diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index c9eb2d09a5..75540f2159 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -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. diff --git a/meta/recipes-devtools/python/python3-maturin_1.9.1.bb b/meta/recipes-devtools/python/python3-maturin_1.9.1.bb index ce38e93136..3204ea19ab 100644 --- a/meta/recipes-devtools/python/python3-maturin_1.9.1.bb +++ b/meta/recipes-devtools/python/python3-maturin_1.9.1.bb @@ -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 \