Bug 15988 - Non-deterministic package_qa in allarch+clang combination
Summary: Non-deterministic package_qa in allarch+clang combination
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-10-02 12:53 UTC by Ross Burton
Modified: 2026-05-22 12:02 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2025-10-02 12:53:13 UTC
In builds of linux-firmware when TOOLCHAIN=clang, the package_qa is non-deterministic.

The ldflags test in package_qa_hash_style() uses elf.run_objdump() which calls ${OBJDUMP}, but notably just returns the empty string if objdump fails with an error.

With TOOLCHAIN=clang, OBJDUMP is "${HOST_PREFIX}llvm-objdump".  The package_qa task depends on POPULATESYSROOTDEPS which for target builds is "virtual/cross-binutils:do_populate_sysroot", which is not where llvm-objdump is.

Several issues jump out at me:
1) run_objdump() should likely _at least_ warn if it fails, if not fail
2) clang.bbclass should extend POPULATESYSROOTDEPS to include llvm-native.
Comment 1 Ross Burton 2025-10-02 15:19:32 UTC
3) allarch clears POPULATESYSROOTDEPS
Comment 2 Ross Burton 2025-10-02 15:30:28 UTC
I wish bugzilla let you edit comments.

Re (3) we can't not unset POPULATESYSROOTDEPS because otherwise it depends on cross-binutils-allarch, which doesn't exist.

A horrible but interesting solution would be to use binutils-native as a provider of cross-binutils-allarch. Another approach might be to actually build both binutils-native (strip, etc) and binutils-cross (ld and anything else that needs to know about sysroots) which means we can be more specific about dependencies.