Skip to content

Fix logic for enabling cloned functions - #22370

Open
brad0 wants to merge 1 commit into
darktable-org:masterfrom
brad0:ifunc
Open

brad0 wants to merge 1 commit into
darktable-org:masterfrom
brad0:ifunc

Conversation

@brad0

@brad0 brad0 commented Sep 23, 2026

Copy link
Copy Markdown

Summary

A fix went in to fix building with Musl but the logic was flawed.
Instead of only checking __GLIBC__ on Linux or Hurd it checks this
everywhere and __GLIBC__ has no relevance outside of Linux or Hurd.

Check for __OpenBSD__ which does not have ifunc support.

Check for PPC also __GLIBC__.

From FreeBSD/ppc64..

iop_profile.c:1273:6: error: 'target_clones' attribute needs GLIBC (2.23 and newer) that exports hardware capability bits

Checklist

  • I have read CONTRIBUTING.md and the coding style.
  • I have not merged master into the topic branch.
  • The pull request is one logical change, and every commit compiles on its own.
  • I ran the relevant tests: unit tests, src/tests/integration/ where the pixelpipe is touched, or darktable-cli as a headless smoke test.
  • New user-visible strings use _(), new preferences are registered in data/darktableconfig.xml.in.
  • A RELEASE_NOTES.md entry was added (only needed if fixing an issue in a release). Do not reference GitHub issues.

Test instructions

Build on OpenBSD and it fails to build due to ifunc usage.

Build on FreeBSD/ppc64 (without the bogus __GLIBC__ check) and it fails to build with the error above.

A fix went in to fix building with Musl but the logic was flawed.
Instead of only checking __GLIBC__ on Linux or Hurd it checks this
everywhere and __GLIBC__ has no relevance outside of Linux or Hurd.

Check for __OpenBSD__ which does not have ifunc support.

Check for PPC also __GLIBC__.

From FreeBSD/ppc64..

iop_profile.c:1273:6: error: 'target_clones' attribute needs GLIBC (2.23 and newer) that exports hardware capability bits
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.

1 participant