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
6 changes: 6 additions & 0 deletions 6 Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,12 @@ Build Changes
``libdb`` 3.x and 4.x are no longer supported.
(Contributed by Christian Heimes in :issue:`45747`.)

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

C API Changes
=============

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Python binary now builds the libpython static library using
``-Wl,--whole-archive`` or ``-Wl,-all_load`` linker option to
export all symbols exported by object files.
Previously, the ``Py_FrozenMain`` symbol was not exported.
Patch by Hai Shi and Victor Stinner.
17 changes: 11 additions & 6 deletions 17 configure
Original file line number Diff line number Diff line change
Expand Up @@ -6479,12 +6479,17 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
esac
else # shared is disabled
PY_ENABLE_SHARED=0
case $ac_sys_system in
CYGWIN*)
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
esac
case $ac_sys_system in #(
CYGWIN*) :
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a' ;; #(
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) :
BLDLIBRARY='-Wl,--whole-archive $(LDLIBRARY) -Wl,--no-whole-archive' ;; #(
Darwin*) :
BLDLIBRARY='-Wl,-all_load $(LDLIBRARY)' ;; #(
*) :
;;
esac
fi

if test "$cross_compiling" = yes; then
Expand Down
14 changes: 8 additions & 6 deletions 14 configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1295,12 +1295,14 @@ if test $enable_shared = "yes"; then
esac
else # shared is disabled
PY_ENABLE_SHARED=0
case $ac_sys_system in
CYGWIN*)
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
esac
AS_CASE([$ac_sys_system],
[CYGWIN*],
[BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'],
[Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*],
[BLDLIBRARY='-Wl,--whole-archive $(LDLIBRARY) -Wl,--no-whole-archive'],
[Darwin*],
[BLDLIBRARY='-Wl,-all_load $(LDLIBRARY)'])
fi

if test "$cross_compiling" = yes; then
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.