]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 30 Dec 2024 17:42:49 +0000 (18:42 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Dec 2024 17:42:49 +0000 (17:42 +0000)
(cherry picked from commit 81376fef76a53fb79893bfa9c9db18d97c228fbe)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst b/Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst
new file mode 100644 (file)
index 0000000..ed72cc8
--- /dev/null
@@ -0,0 +1,3 @@
+Set ``LIBS`` instead of ``LDFLAGS`` when checking if :mod:`sqlite3` library
+functions are available. This fixes the ordering of linked libraries during
+checks, which was incorrect when using a statically linked ``libsqlite3``.
index 635e2372e905ff8e6be613bc8b821a591bd18ae5..c14d27ede2b173e9ae35302f89a8edc45e62b488 100755 (executable)
--- a/configure
+++ b/configure
@@ -15019,7 +15019,7 @@ save_LIBS=$LIBS
 
 
   CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
-  LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
+  LIBS="$LIBSQLITE3_LIBS $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
index de9d7f56ffb5718fc3cd1d3e3819e02e3cd009bb..bc8c357e99667ee896650151c34a85fbeb2d93dd 100644 (file)
@@ -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"
-  LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
+  LIBS="$LIBSQLITE3_LIBS $LIBS"
 
   AC_CHECK_HEADER([sqlite3.h], [
     have_sqlite3=yes