[PR #585] [MERGED] Use -pthread flag and simplify pthread build logic #1659

Closed
opened 2026-05-05 07:58:51 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/585
Author: @chewi
Created: 3/10/2020
Status: Merged
Merged: 5/12/2020
Merged by: @shymega

Base: masterHead: pthread


📝 Commits (1)

  • a0b3124 Use -pthread flag and simplify pthread build logic

📊 Changes

4 files changed (+5 additions, -29 deletions)

View changed files

📝 CMakeLists.txt (+4 -7)
📝 res/config.h.in (+0 -6)
📝 src/lib/arch/Arch.h (+1 -3)
📝 src/lib/arch/unix/ArchMultithreadPosix.cpp (+0 -13)

📄 Description

Sometimes -lpthread is not enough. This has caused build failures on Gentoo Linux in the past.

The logic also seems needlessly complex. We check for HAVE_PTHREAD on UNIX platforms even though CMake errors out if pthreads are not found. Similarly, we have a fallback for HAVE_PTHREAD_SIGNAL being false even though we always set it to true.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/585 **Author:** [@chewi](https://github.com/chewi) **Created:** 3/10/2020 **Status:** ✅ Merged **Merged:** 5/12/2020 **Merged by:** [@shymega](https://github.com/shymega) **Base:** `master` ← **Head:** `pthread` --- ### 📝 Commits (1) - [`a0b3124`](https://github.com/debauchee/barrier/commit/a0b3124f80f5696cbf070b3b714533ab4012398d) Use -pthread flag and simplify pthread build logic ### 📊 Changes **4 files changed** (+5 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+4 -7) 📝 `res/config.h.in` (+0 -6) 📝 `src/lib/arch/Arch.h` (+1 -3) 📝 `src/lib/arch/unix/ArchMultithreadPosix.cpp` (+0 -13) </details> ### 📄 Description Sometimes `-lpthread` is not enough. This has caused build failures on Gentoo Linux in the past. The logic also seems needlessly complex. We check for `HAVE_PTHREAD` on UNIX platforms even though CMake errors out if pthreads are not found. Similarly, we have a fallback for `HAVE_PTHREAD_SIGNAL` being false even though we always set it to true. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 07:58:51 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1659
No description provided.