Skip to content

Libc (FreeBSD): uses base objdump to detect libc version - #2711

Merged
CarterLi merged 1 commit into
fastfetch-cli:devfrom
pkubaj:fbsd-libc-fix
Nov 7, 2026
Merged

CarterLi merged 1 commit into
fastfetch-cli:devfrom
pkubaj:fbsd-libc-fix

Conversation

@pkubaj

@pkubaj pkubaj commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The FBSD libc version (shown as libc by the Version module) is only detected at
configure time when binutils' /usr/local/bin/objdump is installed. Supported
FreeBSD releases ship llvm-objdump as /usr/bin/objdump in base, and it gives the
same result. Without binutils, which is the normal case in a clean poudriere jail,
the version is silently left out.

DragonFly sets FreeBSD too, so the elseif(FreeBSD ...) branch has been catching
it before the DragonFly branch, and FF_DF_VERSION was never set.

Related issue (required for new logos for new distros)

None.

Changes

  • Try /usr/bin/objdump first on FreeBSD (the existing MidnightBSD branch, now
    FreeBSD AND NOT DragonFly, which still covers MidnightBSD), and keep
    /usr/local/bin/objdump as the fallback.
  • Exclude DragonFly from both FreeBSD branches so its own branch is reached again.
  • CHANGELOG entry under # Unreleased.

Screenshots

N/A

Checklist

  • I have tested my changes locally.

Tested on FreeBSD 15.1-RELEASE/powerpc64 (POWER9): git am on dev cad01fd,
cmake --trace-expand shows the /usr/bin/objdump branch running, configure prints
Found FBSD 1.9, fastfetch --format json -s Version reports "libc": "FBSD 1.9",
ctest 20/20, presets/all.jsonc runs. Base /usr/bin/objdump -T /lib/libc.so.*
also gives FBSD_1.8 on 14.4. DragonFly and MidnightBSD were not tested; the
MidnightBSD path is unchanged.

The FBSD version was only detected when binutils' /usr/local/bin/objdump
was installed. Supported FreeBSD releases ship llvm-objdump as
/usr/bin/objdump in base, which gives the same result, so try it first
like MidnightBSD already does and keep /usr/local/bin/objdump as a
fallback.

DragonFly sets FreeBSD too, so exclude it from both branches. Until now
the FreeBSD branch caught DragonFly first and the DF version was never
detected.
@CarterLi
CarterLi merged commit ec3386c into fastfetch-cli:dev Nov 7, 2026
26 checks passed
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.

2 participants