cmake: Include "-pthread" in the pkg-config file if using pthreads#832
Open
mstorsjo wants to merge 2 commits intoxiph:masterfrom
Open
cmake: Include "-pthread" in the pkg-config file if using pthreads#832mstorsjo wants to merge 2 commits intoxiph:masterfrom
mstorsjo wants to merge 2 commits intoxiph:masterfrom
Conversation
This makes sure that users of the library pass the right linker flags if linking libflac statically, with a mingw toolchain that doesn't automatically link in pthreads.
ePirat
pushed a commit
to videolan/vlc
that referenced
this pull request
May 6, 2025
This fixes linking with llvm-mingw (or any mingw distribution that doesn't default to linking in winpthreads). This wasn't noticed in the upstream VLC CI, as it builds with extras/packages/win32/build.sh, which passes in -Wl,-l:libpthread.a in VLC_LDFLAGS (in order to prefer linking winpthreads statically, rather than dynamically, for libraries that do use winpthreads). This patch has been sent upstream in xiph/flac#832.
Labnann
pushed a commit
to Labnann/vlc
that referenced
this pull request
Nov 21, 2025
This fixes linking with llvm-mingw (or any mingw distribution that doesn't default to linking in winpthreads). This wasn't noticed in the upstream VLC CI, as it builds with extras/packages/win32/build.sh, which passes in -Wl,-l:libpthread.a in VLC_LDFLAGS (in order to prefer linking winpthreads statically, rather than dynamically, for libraries that do use winpthreads). This patch has been sent upstream in xiph/flac#832.
neheb
approved these changes
Jan 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes sure that users of the library pass the right linker flags if linking libflac statically, with a mingw toolchain that doesn't automatically link in pthreads.