Conversation
…ags #349 Improved pthread flag handling to prevent redundant linking flags. - Reset AX_PTHREAD_LINK_CFLAGS to empty initially - Set AX_PTHREAD_LINK_CFLAGS only when PTHREAD_CFLAGS is exactly "-pthread" or "-pthreads" - Conditionally prepend AX_PTHREAD_LINK_CFLAGS to LDFLAGS only when non-empty - Ensures no duplicate pthread flags regardless of compiler (Clang/GCC)
Modernize pthread handling to match Boost 1.91.0 requirement. Replaced AS_IF with AS_CASE to properly detect and set AX_PTHREAD_LINK_CFLAGS only when PTHREAD_CFLAGS is exactly "-pthread" or "-pthreads", avoiding incorrect handling of other values. This ensures consistent linking behavior across modern compilers.
Modernizes the kogyan dependency as part of #349.
7 tasks
There was a problem hiding this comment.
Pull request overview
This PR updates the Autotools configuration used by the Linux build path so pthread compiler/linker flags are propagated differently, and it also bumps the kogyan submodule reference. In the broader codebase, this affects how bootstrap.sh/configure produce link flags for the CI and source-based build flows.
Changes:
- Reworked
configure.acso pthread link flags are inferred fromPTHREAD_CFLAGSviaAS_CASE. - Added conditional
LDFLAGSmutation for detected-pthread/-pthreadsusage. - Updated the
kogyansubmodule SHA to a newer commit.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
configure.ac |
Adjusts how AX_PTHREAD results are translated into linker flags during configure-time setup. |
kogyan |
PR metadata indicates a submodule pointer update, but the submodule diff/gitlink change was not included in the provided contents, so only the SHA bump intent could be inferred. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 pull request updates the handling of pthread compiler and linker flags in the build configuration and also updates a submodule reference. The main focus is to ensure the correct pthread flags are used for linking, improving portability and compatibility across different systems.
Build system improvements:
configure.acto setAX_PTHREAD_LINK_CFLAGSbased on the presence of-pthreador-pthreadsinPTHREAD_CFLAGS, and to add the appropriate flag toLDFLAGSonly when necessary. This makes the pthread linking process more robust and avoids potential issues with different compilers and platforms.Submodule update:
kogyansubmodule to point to a newer commit (4217a272a2e25d6b7e8b49643a9177a9157aca72).