summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-08 21:14:33 (GMT)
committerGitHub <noreply@github.com>2023-09-08 21:14:33 (GMT)
commit1f7e42131d2800f0fbb89bfd91fafa8a073e066d (patch)
tree58d64edac6b01569b3c155c10449226237a94f4f /Misc
parent697c9dcf8fc746636c6187e4f110e0e6e865b710 (diff)
downloadcpython-1f7e42131d2800f0fbb89bfd91fafa8a073e066d.zip
cpython-1f7e42131d2800f0fbb89bfd91fafa8a073e066d.tar.gz
cpython-1f7e42131d2800f0fbb89bfd91fafa8a073e066d.tar.bz2
gh-109054: configure checks if libatomic is needed (#109101)
Fix building the _testcapi extension on Linux AArch64 which requires linking to libatomic when <cpython/pyatomic.h> is used: the _Py_atomic_or_uint64() function requires libatomic __atomic_fetch_or_8() on this platform. The configure script now checks if linking to libatomic is needed and generates a new LIBATOMIC variable used to build the _testcapi extension. Building the _testcapi extension now uses the LIBATOMIC variable in its LDFLAGS, since Modules/_testcapi/pyatomic.c uses <cpython/pyatomic.h>. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Build/2023-09-07-19-58-05.gh-issue-109054.5r3S3l.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2023-09-07-19-58-05.gh-issue-109054.5r3S3l.rst b/Misc/NEWS.d/next/Build/2023-09-07-19-58-05.gh-issue-109054.5r3S3l.rst
new file mode 100644
index 0000000..d86a110
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2023-09-07-19-58-05.gh-issue-109054.5r3S3l.rst
@@ -0,0 +1,6 @@
+Fix building the ``_testcapi`` extension on Linux AArch64 which requires
+linking to libatomic when ``<cpython/pyatomic.h>`` is used: the
+``_Py_atomic_or_uint64()`` function requires libatomic
+``__atomic_fetch_or_8()`` on this platform. The configure script now checks
+if linking to libatomic is needed and generates a new LIBATOMIC variable
+used to build the _testcapi extension. Patch by Victor Stinner.