summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-20 16:40:20 +0200
committerBruno Haible <bruno@clisp.org>2023-04-20 16:40:20 +0200
commitebb4fc023d744ea059d1bc5c820213ceb8a370bf (patch)
treefccb950574a8a4b130887d7617ac660e69b8ca1a
parente524987de9c1746ad1c9d3def0adff2582545eb9 (diff)
downloadgnulib-ebb4fc023d744ea059d1bc5c820213ceb8a370bf.tar.gz
Fix uses of libwinpthread on mingw 10.
* m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to "guessing no".
-rw-r--r--ChangeLog6
-rw-r--r--m4/threadlib.m411
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ca6b2caf69..485ed10025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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>
+
Move remaining call_once tests from mtx-tests to call_once-tests.
* tests/test-call_once1.c: Renamed from tests/test-call_once.c.
* tests/test-call_once2.c: New file, based on tests/test-mtx.c.
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 7202b9528d..c19d047221 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 35
+# threadlib.m4 serial 36
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"
;;
*)