]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109054: configure checks if libatomic is needed (#109101)
authorVictor Stinner <vstinner@python.org>
Fri, 8 Sep 2023 21:14:33 +0000 (23:14 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 21:14:33 +0000 (23:14 +0200)
commit1f7e42131d2800f0fbb89bfd91fafa8a073e066d
tree58d64edac6b01569b3c155c10449226237a94f4f
parent697c9dcf8fc746636c6187e4f110e0e6e865b710
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>
Misc/NEWS.d/next/Build/2023-09-07-19-58-05.gh-issue-109054.5r3S3l.rst [new file with mode: 0644]
configure
configure.ac