Skip to content
Open
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
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ DIST= $(DISTFILES) $(DISTDIRS)
LIBRARY= @LIBRARY@
LDLIBRARY= @LDLIBRARY@
BLDLIBRARY= @BLDLIBRARY@
MODULE_LDFLAGS_SHARED=$(if $(LIBPYTHON),$(BLDLIBRARY))
PY3LIBRARY= @PY3LIBRARY@
DLLLIBRARY= @DLLLIBRARY@
LDLIBRARYDIR= @LDLIBRARYDIR@
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix library name in python3.pc on Android.
2 changes: 1 addition & 1 deletion Modules/makesetup
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
;;
esac
rule="$file: $objs \$(MODULE_${mods_upper}_LDEPS)"
rule="$rule; \$(BLDSHARED) $objs $libs \$(LIBPYTHON) -o $file"
rule="$rule; \$(BLDSHARED) $objs $libs \$(MODULE_LDFLAGS_SHARED) -o $file"
echo "$rule" >>$rulesf
done
done
Expand Down
11 changes: 7 additions & 4 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6669,18 +6669,21 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
AC_MSG_RESULT([$LDVERSION])

# Configure the flags and dependencies used when compiling shared modules.
# Do not rename LIBPYTHON - it's accessed via sysconfig by package build
# systems (e.g. Meson) to decide whether to link extension modules against
# libpython.
AC_SUBST([MODULE_DEPS_SHARED])
AC_SUBST([LIBPYTHON])
MODULE_DEPS_SHARED='$(MODULE_DEPS_STATIC) $(EXPORTSYMS)'

# On most platforms, extension modules aren't linked against libpython, so
# LIBPYTHON must be empty.
LIBPYTHON=''

# On Android and Cygwin the shared libraries must be linked with libpython.
# LIBPYTHON is used by python-config, python3.pc, the commands for building the
# stdlib's own extension modules, and external package build systems via
# sysconfig, so its value must be suitable for all those contexts.
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
LIBPYTHON="\$(BLDLIBRARY)"
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
fi

# On iOS the shared libraries must be linked with the Python framework
Expand Down
Loading