Skip to content

Use elf_aux_info() on OpenBSD PowerPC#2007

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
brad0:openbsd_elf_aux_info
Nov 14, 2025
Merged

Use elf_aux_info() on OpenBSD PowerPC#2007
Dead2 merged 1 commit intozlib-ng:developfrom
brad0:openbsd_elf_aux_info

Conversation

@brad0
Copy link
Copy Markdown
Contributor

@brad0 brad0 commented Nov 14, 2025

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 14, 2025

Walkthrough

Adds OpenBSD to FreeBSD-specific conditional checks in configure, CMake, and arch/power source so OpenBSD follows the same runtime hardware-capability and PPC-intrinsics detection paths (elf_aux_info() where used). No other logic or error handling changed.

Changes

Cohort / File(s) Summary
Hardware capability reading
arch/power/power_features.c
Replaced #ifdef __FreeBSD__ with `#if defined(FreeBSD)
PPC intrinsics detection
cmake/detect-intrinsics.cmake
Broadened PPC intrinsic detection guards (Altivec / POWER8 / POWER9 checks) to include OpenBSD alongside FreeBSD by changing #ifdef __FreeBSD__ to `#if defined(FreeBSD)
Configure runtime tests & messages
configure
Updated test program guards and user-facing messages to include OpenBSD where FreeBSD was previously checked; messages now reference getauxval() or elf_aux_info() and test code calls elf_aux_info() on FreeBSD/OpenBSD, getauxval() otherwise.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Configure as Configure script / test program
    participant LibC as System libc
    participant Kernel as Kernel auxv

    Note right of Configure `#DDEDED`: Runtime detection flow (updated)

    Configure->>LibC: query for hardware caps
    alt FreeBSD or OpenBSD
        Configure->>LibC: call elf_aux_info(AT_HWCAP / AT_HWCAP2)
        LibC->>Kernel: request auxv entries
        Kernel-->>LibC: return entries
        LibC-->>Configure: return flags
    else Other OS
        Configure->>LibC: call getauxval(AT_HWCAP / AT_HWCAP2)
        LibC->>Kernel: request auxv entries
        Kernel-->>LibC: return entries
        LibC-->>Configure: return flags
    end
Loading

Suggested labels: Build Env

Suggested reviewers:

  • Dead2

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether a description exists and relates to the changeset. Add a pull request description explaining the purpose of extending elf_aux_info() support to OpenBSD and any relevant context or testing performed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: extending elf_aux_info() support to OpenBSD PowerPC, which aligns with the modifications across three files to include OpenBSD alongside FreeBSD for auxiliary vector access.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 06717dc and 87d6ac9.

📒 Files selected for processing (3)
  • arch/power/power_features.c (2 hunks)
  • cmake/detect-intrinsics.cmake (3 hunks)
  • configure (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • cmake/detect-intrinsics.cmake
  • configure
  • arch/power/power_features.c
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN
  • GitHub Check: EL10 GCC S390X DFLTCC UBSAN

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@brad0 brad0 force-pushed the openbsd_elf_aux_info branch 2 times, most recently from f7baa77 to 06717dc Compare November 14, 2025 01:30
@brad0 brad0 changed the title Use elf_aux_info() on OpenBSD Use elf_aux_info() on OpenBSD PowerPC Nov 14, 2025
@brad0 brad0 force-pushed the openbsd_elf_aux_info branch from 06717dc to 87d6ac9 Compare November 14, 2025 01:44
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.81%. Comparing base (8003f57) to head (87d6ac9).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2007      +/-   ##
===========================================
- Coverage    83.21%   81.81%   -1.40%     
===========================================
  Files          160      160              
  Lines        12955    12955              
  Branches      3145     3145              
===========================================
- Hits         10780    10599     -181     
- Misses        1138     1324     +186     
+ Partials      1037     1032       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@Dead2 Dead2 left a comment

Choose a reason for hiding this comment

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

LGTM

@Dead2 Dead2 merged commit 30ff317 into zlib-ng:develop Nov 14, 2025
154 of 156 checks passed
@brad0 brad0 deleted the openbsd_elf_aux_info branch November 14, 2025 23:53
@Dead2 Dead2 mentioned this pull request Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants