classification
Title: configure fails to detect C11 atomic support on clang
Type: Stage: resolved
Components: Build Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, miss-islington
Priority: normal Keywords: patch

Created on 2018-07-15 23:47 by benjamin.peterson, last changed 2018-07-16 00:48 by benjamin.peterson. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8288 merged benjamin.peterson, 2018-07-15 23:49
PR 8289 merged miss-islington, 2018-07-16 00:02
PR 8290 merged benjamin.peterson, 2018-07-16 00:04
Messages (4)
msg321697 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-07-15 23:47
clang supports C11 atomic APIs just fine but Python's configure fails to detect it:

configure:16529: checking for stdatomic.h
configure:16545: clang -pthread -o conftest    conftest.c -lpthread -ldl  -lutil >&5
conftest.c:389:5: error: _Atomic cannot be applied to incomplete type 'void' 
    _Atomic void *py_atomic_address = (void*) &value;
    ^
1 error generated.

Indeed, the atomic uninhabited type is not very useful. If we wanted an atomic pointer, we should write _Atomic(void *).
msg321698 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-07-16 00:01
New changeset 15c7b2abdfb93f8902dd72474818aee2bf97fa66 by Benjamin Peterson in branch 'master':
bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288)
https://github.com/python/cpython/commit/15c7b2abdfb93f8902dd72474818aee2bf97fa66
msg321704 - (view) Author: miss-islington (miss-islington) Date: 2018-07-16 00:44
New changeset 3fc12f0e2ad9ba49243f5a43a8803018b2ff5904 by Miss Islington (bot) in branch '3.7':
bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288)
https://github.com/python/cpython/commit/3fc12f0e2ad9ba49243f5a43a8803018b2ff5904
msg321705 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-07-16 00:48
New changeset 8487ef61dea9fb0579f0be8f01d74fa20d3b8ed1 by Benjamin Peterson in branch '3.6':
[3.6] bpo-34121: Fix detection of C11 atomic support on clang. (GH-8290)
https://github.com/python/cpython/commit/8487ef61dea9fb0579f0be8f01d74fa20d3b8ed1
History
Date User Action Args
2018-07-16 00:48:48benjamin.petersonsetmessages: + msg321705
2018-07-16 00:44:14miss-islingtonsetnosy: + miss-islington
messages: + msg321704
2018-07-16 00:05:26benjamin.petersonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-07-16 00:04:15benjamin.petersonsetpull_requests: + pull_request7824
2018-07-16 00:02:13miss-islingtonsetpull_requests: + pull_request7823
2018-07-16 00:01:45benjamin.petersonsetmessages: + msg321698
2018-07-15 23:49:57benjamin.petersonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request7822
2018-07-15 23:48:06benjamin.petersonsetcomponents: + Build, - Interpreter Core
2018-07-15 23:47:57benjamin.petersoncreate