8000 bpo-44133: Export Py_FrozenMain() symbol by vstinner · Pull Request #26130 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-44133: Export Py_FrozenMain() symbol #26130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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 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 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)

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.
0