]> Savannah Git Hosting - gnulib.git/commitdiff
Fix uses of libwinpthread on mingw 10.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 14:40:20 +0000 (16:40 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2023 01:51:48 +0000 (03:51 +0200)
* m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
"guessing no".

ChangeLog
m4/threadlib.m4

index 3a8a3be8b029ca4140e50c4ebd5b0f60dfd67ebe..e382cad13e8e281c47c5e653fecdfda485f08136 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-20  Bruno Haible  <bruno@clisp.org>
+
+       Fix uses of libwinpthread on mingw 10.
+       * m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
+       "guessing no".
+
 2023-04-20  Bruno Haible  <bruno@clisp.org>
 
        execute tests: Fix compilation error on mingw (regression 2023-01-17).
index b536b04750574542c045a1e818e750efeac56d3c..39c4896ae613840935cf7b20108a734d43fbc7e2 100644 (file)
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 32a
+# threadlib.m4 serial 32b
 dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -85,10 +85,11 @@ AC_DEFUN([gl_WEAK_SYMBOLS],
   AC_CACHE_CHECK([whether imported symbols can be declared weak],
     [gl_cv_have_weak],
     [case "$host_os" in
-       cygwin*)
-         dnl On Cygwin 3.2.0 with gcc 10.2, the test below would succeed, but
-         dnl programs that use pthread_in_use() with weak symbol references
-         dnl crash miserably at runtime.
+       cygwin* | mingw*)
+         dnl On Cygwin 3.2.0 with gcc 10.2, and likewise on mingw 10.0.0 with
+         dnl gcc 11.3, the test below would succeed, but programs that use
+         dnl pthread_in_use() with weak symbol references crash miserably at
+         dnl runtime.
          gl_cv_have_weak="guessing no"
          ;;
        *)