]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-146264: Use static HACL deps for static module builds (GH-146265) (#148403)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 11 Apr 2026 21:54:29 +0000 (23:54 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Apr 2026 21:54:29 +0000 (21:54 +0000)
gh-146264: Use static HACL deps for static module builds (GH-146265)
(cherry picked from commit f445d2e8666c5585d613add075cabe2abc7f972b)

Co-authored-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Misc/NEWS.d/next/Build/2026-03-21-18-51-31.gh-issue-146264.Q9Ej4m.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2026-03-21-18-51-31.gh-issue-146264.Q9Ej4m.rst b/Misc/NEWS.d/next/Build/2026-03-21-18-51-31.gh-issue-146264.Q9Ej4m.rst
new file mode 100644 (file)
index 0000000..1fdafe5
--- /dev/null
@@ -0,0 +1,3 @@
+Fix static module builds on non-WASI targets by linking HACL dependencies as
+static libraries when ``MODULE_BUILDTYPE=static``, preventing duplicate
+``_Py_LibHacl_*`` symbol errors at link time.
index 7621eeabeb85db956a97a9e963e08149344b99ba..1cc1d2a2a54dd48232da97adc2f77bc27b7986d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -32758,7 +32758,7 @@ fi
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HACL* library linking type" >&5
 printf %s "checking for HACL* library linking type... " >&6; }
-if test "$ac_sys_system" = "WASI"; then
+if test "$ac_sys_system" = "WASI" || test "$MODULE_BUILDTYPE" = "static"; then
   LIBHACL_LDEPS_LIBTYPE=STATIC
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static" >&5
 printf "%s\n" "static" >&6; }
index 21df2245402eea1fdb7f3387cd581bc9c14a7332..21cef7a98181b66340e171d096b4d8eb90de0ca5 100644 (file)
@@ -8089,7 +8089,7 @@ AC_SUBST([LIBHACL_BLAKE2_SIMD256_OBJS])
 # HACL*-based cryptographic primitives
 
 AC_MSG_CHECKING([for HACL* library linking type])
-if test "$ac_sys_system" = "WASI"; then
+if test "$ac_sys_system" = "WASI" || test "$MODULE_BUILDTYPE" = "static"; then
   LIBHACL_LDEPS_LIBTYPE=STATIC
   AC_MSG_RESULT([static])
 else