Skip to content

[elfutils] Bump bundled elfutils 0.192 -> 0.195#5142

Open
FIM43-Redeye wants to merge 2 commits into
ROCm:mainfrom
FIM43-Redeye:users/FIM43-Redeye/bundled-elfutils-0.195
Open

[elfutils] Bump bundled elfutils 0.192 -> 0.195#5142
FIM43-Redeye wants to merge 2 commits into
ROCm:mainfrom
FIM43-Redeye:users/FIM43-Redeye/bundled-elfutils-0.195

Conversation

@FIM43-Redeye
Copy link
Copy Markdown
Contributor

Summary

Bumps the TheRock-bundled elfutils from 0.192 to 0.195 (released 2026-04-15).

Why

elfutils 0.192's libcpu/riscv_disasm.c:1259 discards const from a bsearch return, tripping amd-llvm clang's -Werror=incompatible-pointer-types-discards-qualifiers (#5120) and GCC 15's -Werror=discarded-qualifiers. 0.195 fixes this at source — the result is correctly typed const struct known_csrs * (now at :1262).

Same root-cause class as the rocprofsys-vendored elfutils 0.188 backport that landed in rocm-systems#5574 (2026-04-30), but applied at the more current bundled-side version where elfutils carries the fix natively rather than as a downstream patch.

What changes

Single-file: third-party/sysdeps/linux/elfutils/CMakeLists.txt

Verification

  • Full integrate-tip build (Ubuntu 26.04, GCC 15.2.0, amd-llvm clang) — green
  • Bundled elfutils builds clean — riscv_disasm.c compiles without the const-discard cascade
  • amd-llvm, debug-tools, profiler, core consumers re-link without recompilation, confirming 0.192 → 0.195 is libdw/libelf ABI-compatible
  • libdw.so / libelf.so soname unchanged

Closes #5120.

elfutils 0.192's libcpu/riscv_disasm.c:1259 discards `const` from a
bsearch return, tripping amd-llvm clang's
-Werror=incompatible-pointer-types-discards-qualifiers (ROCm#5120) and
GCC 15's -Werror=discarded-qualifiers. 0.195 fixes this at source:
the result is correctly typed `const struct known_csrs *`
(now at :1262).

Tarball uploaded to the rocm-third-party-deps S3 mirror by
@ScottTodd via ROCm#5139; SHA512 verified against the canonical
sourceware tarball.

Verified on a full integrate-tip build (Ubuntu 26.04 / GCC 15.2.0 /
amd-llvm clang): bundled elfutils builds clean; amd-llvm,
debug-tools, profiler, and core consumers re-link without
recompilation, confirming 0.192 -> 0.195 is libdw/libelf
ABI-compatible.

Closes ROCm#5120.
@FIM43-Redeye FIM43-Redeye marked this pull request as ready for review May 9, 2026 00:18
Copilot AI review requested due to automatic review settings May 9, 2026 00:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the TheRock-bundled elfutils sysdep to a newer upstream release (0.195) by bumping the fetched tarball URL and corresponding integrity hash, addressing the clang/GCC const-discard build failure noted in #5120.

Changes:

  • Bump bundled elfutils tarball from 0.192 → 0.195.
  • Update the S3 mirror URL and SHA512 URL_HASH to match the 0.195 archive.
  • Update the “Originally mirrored from” comment to reflect the new upstream source URL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

[issue] elfutils 0.192 fails to build under amd-llvm/clang due to -Werror=incompatible-pointer-types-discards-qualifiers

2 participants