]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (#128322)
authorZanie Blue <contact@zanie.dev>
Mon, 30 Dec 2024 08:55:14 +0000 (02:55 -0600)
committerGitHub <noreply@github.com>
Mon, 30 Dec 2024 08:55:14 +0000 (09:55 +0100)
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 299eff6bc3bf70b0a2889c2e8cfaa3fda4f0be71..3d2c60213db591b0f5266a0aab6f2353468abce8 100755 (executable)
--- a/configure
+++ b/configure
@@ -15434,7 +15434,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 badb19d55895de93f0cfe578677ec0df57050cb4..ee034e5a9621df1c8f4e748e1022dd518960e461 100644 (file)
@@ -4220,7 +4220,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