mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
crash: fix buildpaths QA properly via gdb --with-sysroot=/
The recipe passed --with-sysroot=${STAGING_DIR_TARGET} to the bundled gdb's
configure. gdb bakes that path in as its default target sysroot, so the
resulting /usr/bin/crash binary embedded the build-time recipe-sysroot path:
File /usr/bin/crash in package crash contains reference to TMPDIR [buildpaths]
This was worked around by demoting the buildpaths QA check to a warning
(ERROR_QA:remove / WARN_QA:append), which only hides the problem - the build
path is still wrong for a binary that runs on the target (or, for the
cross-canadian variant, in the SDK).
Set --with-sysroot=/ instead. crash takes the kernel/vmlinux and dump on its
command line, so gdb's compiled-in default sysroot is irrelevant at runtime;
"/" is both a sane default and contains no build path. With this the binary
no longer references TMPDIR, so the QA suppression can be removed and the
buildpaths check passes for real.
Verified with a clean build for qemux86-64: no buildpaths QA issue and no
TMPDIR references remain in the crash binary.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
@@ -37,7 +37,7 @@ EXTRA_OEMAKE:class-cross-canadian = ' \
|
||||
--target=${TARGET_SYS} \
|
||||
--disable-gdbserver \
|
||||
--disable-gprofng \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-sysroot=/ \
|
||||
ac_cv_type_gregset_t=yes \
|
||||
ac_cv_type_fpregset_t=yes \
|
||||
ac_cv_header_sys_procfs_h=yes" \
|
||||
|
||||
@@ -58,7 +58,7 @@ EXTRA_OEMAKE = ' \
|
||||
--target=${TARGET_SYS} \
|
||||
--disable-gdbserver \
|
||||
--disable-gprofng \
|
||||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-sysroot=/ \
|
||||
ac_cv_type_gregset_t=yes \
|
||||
ac_cv_type_fpregset_t=yes \
|
||||
ac_cv_header_sys_procfs_h=yes" \
|
||||
@@ -121,10 +121,3 @@ do_install:prepend () {
|
||||
RDEPENDS:${PN} += "liblzma"
|
||||
|
||||
ARM_INSTRUCTION_SET = "arm"
|
||||
|
||||
# WARNING: crash-9.0.2-r0 do_package_qa: QA Issue: File /usr/bin/crash in package crash contains reference to TMPDIR [buildpaths]
|
||||
#
|
||||
# WARNING: crash-cross-canadian-aarch64-9.0.2-r0 do_package_qa: QA Issue: File /opt/phytec-ampliphy-resy-systemd/6.0.98-devel/sysroots/x86_64-resysdk-linux/usr/bin/aarch64-resy-linux/crash in package crash-cross-canadian-aarch64 contains reference to TMPDIR [buildpaths]
|
||||
#
|
||||
ERROR_QA:remove = "buildpaths"
|
||||
WARN_QA:append = " buildpaths"
|
||||
|
||||
Reference in New Issue
Block a user