Skip to content

Improve pthread flag handling and update kogyan submodule#356

Merged
kaorut merged 3 commits into
mainfrom
modernize
May 2, 2026
Merged

Improve pthread flag handling and update kogyan submodule#356
kaorut merged 3 commits into
mainfrom
modernize

Conversation

@kaorut
Copy link
Copy Markdown
Member

@kaorut kaorut commented May 2, 2026

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:

  • Refined the logic in configure.ac to set AX_PTHREAD_LINK_CFLAGS based on the presence of -pthread or -pthreads in PTHREAD_CFLAGS, and to add the appropriate flag to LDFLAGS only when necessary. This makes the pthread linking process more robust and avoids potential issues with different compilers and platforms.

Submodule update:

  • Updated the kogyan submodule to point to a newer commit (4217a272a2e25d6b7e8b49643a9177a9157aca72).

kaorut added 3 commits May 2, 2026 16:10
…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.
@kaorut kaorut added this to the 1.10.0 milestone May 2, 2026
@kaorut kaorut self-assigned this May 2, 2026
Copilot AI review requested due to automatic review settings May 2, 2026 13:46
@kaorut kaorut added task-enhancement New feature or request v1.10.0 labels May 2, 2026
@kaorut kaorut linked an issue May 2, 2026 that may be closed by this pull request
7 tasks
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.ac so pthread link flags are inferred from PTHREAD_CFLAGS via AS_CASE.
  • Added conditional LDFLAGS mutation for detected -pthread/-pthreads usage.
  • Updated the kogyan submodule 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.

Comment thread configure.ac
Comment thread configure.ac
@kaorut kaorut added the v1.9.1 label May 2, 2026
@kaorut kaorut merged commit 5a2ba1b into main May 2, 2026
25 checks passed
@kaorut kaorut deleted the modernize branch May 2, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Modernize the dependencies.

2 participants