diff options
| author | Yash Shinde <Yash.Shinde@windriver.com> | 2025-10-08 06:01:37 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-13 18:01:03 +0100 |
| commit | bd0535ddf8ffbbafc557aa6541ad1015baa5ec16 (patch) | |
| tree | 8f2459043089df3fe07525536f110db63c4f9407 /meta/recipes-devtools | |
| parent | 91f50b7c55968b0857818cf05c03488cd19452d4 (diff) | |
| download | poky-bd0535ddf8ffbbafc557aa6541ad1015baa5ec16.tar.gz | |
cargo-c: fix debug symbols containing TMPDIR references
When building cargo-c with DEBUG mode, QA checks fail due to
absolute paths from the build environment (TMPDIR) being embedded into
the debug symbols/binaries. This causes issues such as:
ERROR: do_package_qa: File /usr/bin/.debug/cargo-capi contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-cinstall contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-cbuild contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-ctest contains reference to TMPDIR [buildpaths]
To fix this, pass an additional -ffile-prefix-map option to DEBUG_PREFIX_MAP to
ensure that paths under `${CARGO_HOME}` are remapped to `${TARGET_DBGSRC_DIR}`.
This ensures debug info is reproducible and does not leak host-specific paths.
(From OE-Core rev: 3239961e35434592c06ec2cae2885ab464d35744)
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb b/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb index fd15f02da9..5ef68e13c2 100644 --- a/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb +++ b/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb | |||
| @@ -12,6 +12,8 @@ SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c \ | |||
| 12 | SRC_URI[cargo-c.sha256sum] = "17d431789b050b0fcf678455dfd5ceb7e5b45cd806140f8fe03b16b995d6cbff" | 12 | SRC_URI[cargo-c.sha256sum] = "17d431789b050b0fcf678455dfd5ceb7e5b45cd806140f8fe03b16b995d6cbff" |
| 13 | S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}" | 13 | S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}" |
| 14 | 14 | ||
| 15 | DEBUG_PREFIX_MAP += "-ffile-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}" | ||
| 16 | |||
| 15 | inherit cargo cargo-update-recipe-crates pkgconfig | 17 | inherit cargo cargo-update-recipe-crates pkgconfig |
| 16 | 18 | ||
| 17 | DEPENDS = "openssl curl" | 19 | DEPENDS = "openssl curl" |
