Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ Optimizations
Build Changes
=============

* The Python binary now builds the libpython static library using
``-Wl,--whole-archive`` linker option to export all symbols exported by
object files. Previously, the ``Py_FrozenMain`` symbol was not exported.
(Contributed by Victor Stinner in :issue:`44133`.)


Deprecated
==========
Expand Down
2 changes: 1 addition & 1 deletion 2 Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c

# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o -Wl,--whole-archive $(BLDLIBRARY) -Wl,--no-whole-archive $(LIBS) $(MODLIBS) $(SYSLIBS)
Comment thread
pablogsal marked this conversation as resolved.

platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The Python binary now builds the libpython static library using
``-Wl,--whole-archive`` linker option to export all symbols exported by
object files. Previously, the ``Py_FrozenMain`` symbol was not exported.
Patch by Victor Stinner.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.