]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-146264: Use static HACL deps for static module builds (GH-146265)
authorIhar Hrachyshka <ihar.hrachyshka@gmail.com>
Sat, 11 Apr 2026 21:31:10 +0000 (17:31 -0400)
committerGitHub <noreply@github.com>
Sat, 11 Apr 2026 21:31:10 +0000 (14:31 -0700)
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 a599cd639eac6fdc66f516c344aa060b1ed760a8..07c16a4e37874e42e7c722bf1f8565cedae51eb1 100755 (executable)
--- a/configure
+++ b/configure
@@ -33089,7 +33089,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 d7785c6f3e6e73aae674f18e7c406b39a5c6e463..d6e152d42b765e297c43302be96291a318786649 100644 (file)
@@ -8217,7 +8217,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