Skip to content

Commit 2f5c3b0

Browse files
authored
gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764)
(LIBPYTHON was renamed MODULE_LDFLAGS in commit 7f5e3f0.)
1 parent 8c9d174 commit 2f5c3b0

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ SOABI= @SOABI@
4343
ABIFLAGS= @ABIFLAGS@
4444
ABI_THREAD= @ABI_THREAD@
4545
LDVERSION= @LDVERSION@
46-
MODULE_LDFLAGS=@MODULE_LDFLAGS@
46+
LIBPYTHON=@LIBPYTHON@
4747
GITVERSION= @GITVERSION@
4848
GITTAG= @GITTAG@
4949
GITBRANCH= @GITBRANCH@
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Rename build variable ``MODULE_LDFLAGS`` back to ``LIBPYTHON``, as it's used by
2+
package build systems (e.g. Meson).

Misc/python-config.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ LIBM="@LIBM@"
4747
LIBC="@LIBC@"
4848
SYSLIBS="$LIBM $LIBC"
4949
ABIFLAGS="@ABIFLAGS@"
50-
LIBS="@MODULE_LDFLAGS@ @LIBS@ $SYSLIBS"
50+
LIBS="@LIBPYTHON@ @LIBS@ $SYSLIBS"
5151
LIBS_EMBED="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
5252
BASECFLAGS="@BASECFLAGS@"
5353
LDLIBRARY="@LDLIBRARY@"

Misc/python.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Description: Build a C extension for Python
99
Requires:
1010
Version: @VERSION@
1111
Libs.private: @LIBS@
12-
Libs: -L${libdir} @MODULE_LDFLAGS@
12+
Libs: -L${libdir} @LIBPYTHON@
1313
Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@

Modules/makesetup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
274274
;;
275275
esac
276276
rule="$file: $objs"
277-
rule="$rule; \$(BLDSHARED) $objs $libs \$(MODULE_LDFLAGS) -o $file"
277+
rule="$rule; \$(BLDSHARED) $objs $libs \$(LIBPYTHON) -o $file"
278278
echo "$rule" >>$rulesf
279279
done
280280
done

configure

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6224,16 +6224,19 @@ AC_MSG_CHECKING([LDVERSION])
62246224
LDVERSION='$(VERSION)$(ABIFLAGS)'
62256225
AC_MSG_RESULT([$LDVERSION])
62266226

6227-
# Configure the flags and dependencies used when compiling shared modules
6227+
# Configure the flags and dependencies used when compiling shared modules.
6228+
# Do not rename LIBPYTHON - it's accessed via sysconfig by package build
6229+
# systems (e.g. Meson) to decide whether to link extension modules against
6230+
# libpython.
62286231
AC_SUBST([MODULE_DEPS_SHARED])
6229-
AC_SUBST([MODULE_LDFLAGS])
6232+
AC_SUBST([LIBPYTHON])
62306233
MODULE_DEPS_SHARED='$(MODULE_DEPS_STATIC) $(EXPORTSYMS)'
6231-
MODULE_LDFLAGS=''
6234+
LIBPYTHON=''
62326235

62336236
# On Android and Cygwin the shared libraries must be linked with libpython.
62346237
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
62356238
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
6236-
MODULE_LDFLAGS="\$(BLDLIBRARY)"
6239+
LIBPYTHON="\$(BLDLIBRARY)"
62376240
fi
62386241

62396242
# On iOS the shared libraries must be linked with the Python framework

0 commit comments

Comments
 (0)