This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Recognize -pthread
Type: enhancement Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, wiz
Priority: normal Keywords: patch

Created on 2014-05-09 09:16 by wiz, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pthread.diff wiz, 2014-05-09 09:16
Pull Requests
URL Status Linked Edit
PR 30032 closed wiz, 2021-12-10 17:05
Messages (5)
msg218144 - (view) Author: Thomas Klausner (wiz) * Date: 2014-05-09 09:16
makesetup should know about the "-pthread" compiler flag.
msg408236 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-10 18:10
Which platforms or compilers use -pthread?
msg408238 - (view) Author: Thomas Klausner (wiz) * Date: 2021-12-10 18:13
gcc supports this flag. According to the man page:

This option consistently for both compilation and linking.  This option is supported on GNU/Linux targets, most other Unix derivatives, and also on x86 Cygwin and MinGW targets.

On NetBSD, using -pthread is the recommended method to enable thread support.

clang on NetBSD also supports this flag. I don't have access to clang on other systems.
msg408241 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-10 18:32
Python's configure script should detect when a platform needs -pthread and automatically include the flags for linking and compiling of all files. Under which circumstances do you need -pthread in a Setup file?
msg408256 - (view) Author: Thomas Klausner (wiz) * Date: 2021-12-10 23:08
I must confess, I don't know.
This patch has been in pkgsrc since at least the import of the first python 2.7 package in 2011, and I haven't dug deeper.

If you think it is unnecessary, I'll trust you. I've just removed it from the python 3.10 package in pkgsrc.
History
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65660
2021-12-10 23:08:50wizsetstatus: open -> closed

messages: + msg408256
stage: patch review -> resolved
2021-12-10 18:32:57christian.heimessetmessages: + msg408241
2021-12-10 18:13:59wizsetmessages: + msg408238
2021-12-10 18:10:36christian.heimessetversions: + Python 3.11, - Python 3.5
nosy: + christian.heimes

messages: + msg408236

components: + Build, - Extension Modules
2021-12-10 17:05:07wizsetstage: patch review
pull_requests: + pull_request28257
2014-05-09 09:16:03wizcreate