]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44133: Link Python executable with object files (GH-30556)
authorVictor Stinner <vstinner@python.org>
Thu, 13 Jan 2022 18:24:28 +0000 (19:24 +0100)
committerGitHub <noreply@github.com>
Thu, 13 Jan 2022 18:24:28 +0000 (19:24 +0100)
commit6be848922bc0f4c632c255c39de82a45b6480286
treec20a5ac0989b76b96cb5e391bd445d21e68eca30
parent0885999a8e5ffad3fae0302675ad0030e33a15af
bpo-44133: Link Python executable with object files (GH-30556)

When Python is built without --enable-shared, the "python" program is
now linked to object files, rather than being linked to the Python
library (libpython.a), to make sure that all symbols are exported.
Previously, the linker omitted some symbols like the Py_FrozenMain()
function.

When Python is configured with --without-static-libpython, the Python
static library (libpython.a) is no longer built.

* Check --without-static-libpython earlier in configure.ac
* Add LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variables to Makefile.
* test_capi now ensures that the "Py_FrozenMain" symbol is exported.
Lib/test/test_capi.py
Makefile.pre.in
Misc/NEWS.d/next/Build/2022-01-12-13-34-52.bpo-44133.HYCNXb.rst [new file with mode: 0644]
Misc/NEWS.d/next/Build/2022-01-12-13-42-16.bpo-44133.NgyNAh.rst [new file with mode: 0644]
configure
configure.ac