https://github.com/python/cpython/commit/f2cc565b99b4371db7d6a9a4773baa1174fb3e69
commit: f2cc565b99b4371db7d6a9a4773baa1174fb3e69
branch: 3.12
author: Zanie Blue <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2025-01-04T00:47:08Z
summary:
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
(cherry picked from commit b75ed951d4de8ba85349d80c8e7f097b3cd6052f)
files:
M configure
M configure.ac
diff --git a/configure b/configure
index d6c6cde4165fb7..be04b13700b4ea 100755
--- a/configure
+++ b/configure
@@ -13296,7 +13296,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h"
"ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -13422,7 +13422,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h"
"ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -14185,7 +14185,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h"
"$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14258,7 +14258,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h"
"$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14365,8 +14365,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
@@ -15019,7 +15019,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h"
"$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
@@ -15899,7 +15899,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15965,7 +15965,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
for ac_header in gdbm.h
do :
ac_fn_c_check_header_compile "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h"
"$ac_includes_default"
@@ -19812,7 +19812,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h"
"$ac_includes_default"
@@ -19941,7 +19941,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h"
"$ac_includes_default"
@@ -20160,7 +20160,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h"
"$ac_includes_default"
@@ -20242,7 +20242,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h"
"$ac_includes_default"
@@ -20388,7 +20388,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h"
"$ac_includes_default"
@@ -20470,7 +20470,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h"
"$ac_includes_default"
@@ -24670,7 +24670,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h"
"ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -24749,7 +24749,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h"
"ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -24901,7 +24901,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h"
"ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -24982,7 +24982,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h"
"ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -25090,7 +25090,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
diff --git a/configure.ac b/configure.ac
index 4dfce49e1585cb..6c5649bffda6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3630,7 +3630,7 @@ AS_VAR_IF([have_uuid], [missing], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
AC_CHECK_HEADERS([uuid/uuid.h], [
PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes])
PY_CHECK_LIB([uuid], [uuid_generate_time_safe],
@@ -3857,7 +3857,7 @@ AS_VAR_IF([have_libffi], [missing], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
AC_CHECK_HEADER([ffi.h], [
AC_CHECK_LIB([ffi], [ffi_call], [
have_libffi=yes
@@ -3888,8 +3888,8 @@ AS_VAR_IF([have_libffi], [yes], [
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], ["
-ldl"])])
WITH_SAVE_ENV([
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
PY_CHECK_FUNC([ffi_prep_cif_var], [@%:@include <ffi.h>])
PY_CHECK_FUNC([ffi_prep_closure_loc], [@%:@include <ffi.h>])
@@ -4056,7 +4056,7 @@ WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
AC_CHECK_HEADER([sqlite3.h], [
have_sqlite3=yes
@@ -4159,7 +4159,7 @@ AS_CASE([$ac_sys_system],
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4201,7 +4201,7 @@ AC_ARG_VAR([GDBM_CFLAGS], [C compiler flags for gdbm])
AC_ARG_VAR([GDBM_LIBS], [additional linker flags for gdbm])
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
AC_CHECK_HEADERS([gdbm.h], [
AC_CHECK_LIB([gdbm], [gdbm_open], [
have_gdbm=yes
@@ -5080,7 +5080,7 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
AC_CHECK_HEADERS([zlib.h], [
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
], [have_zlib=no])
@@ -5104,7 +5104,7 @@ PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
AC_CHECK_HEADERS([bzlib.h], [
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [have_bzip2=yes], [have_bzip2=no])
], [have_bzip2=no])
@@ -5118,7 +5118,7 @@ PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
AC_CHECK_HEADERS([lzma.h], [
AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_liblzma=yes],
[have_liblzma=no])
], [have_liblzma=no])
@@ -6127,7 +6127,7 @@ AS_VAR_IF([with_readline], [readline], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_LIB([readline], [readline], [
LIBREADLINE=readline
@@ -6148,7 +6148,7 @@ AS_VAR_IF([with_readline], [edit], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
AC_CHECK_HEADERS([editline/readline.h], [
AC_CHECK_LIB([edit], [readline], [
LIBREADLINE=edit
@@ -6172,7 +6172,7 @@ AS_VAR_IF([with_readline], [no], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
m4_define([readline_includes], [
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]