aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-08-19 18:02:53 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2025-08-21 13:26:17 +0100
commitfb7c62f7a8fed8e30c5bd6cbb0fdb26774ba247d (patch)
tree9289a02eb89adb8e479856c8feef3b13e6c35ecc
parentd1dec304453fa4874d16daaa15e6f477435edda4 (diff)
downloadgcc-fb7c62f7a8fed8e30c5bd6cbb0fdb26774ba247d.zip
gcc-fb7c62f7a8fed8e30c5bd6cbb0fdb26774ba247d.tar.gz
gcc-fb7c62f7a8fed8e30c5bd6cbb0fdb26774ba247d.tar.bz2
libstdc++: Use pthread_mutex_clocklock when TSan is active [PR121496]
This reverts r14-905-g3b7cb33033fbe6 which disabled the use of pthread_mutex_clocklock when TSan is active. That's no longer needed, because GCC has TSan interceptors for pthread_mutex_clocklock since GCC 15.1 and Clang has them since 18.1.0 (released March 2024). The interceptor was added by https://github.com/llvm/llvm-project/pull/75713 libstdc++-v3/ChangeLog: PR libstdc++/121496 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK): Do not use _GLIBCXX_TSAN in _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK macro. * configure: Regenerate. Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
-rw-r--r--libstdc++-v3/acinclude.m42
-rwxr-xr-xlibstdc++-v3/configure2
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 080a4fc..027735e 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4511,7 +4511,7 @@ AC_DEFUN([GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK], [
[glibcxx_cv_PTHREAD_MUTEX_CLOCKLOCK=no])
])
if test $glibcxx_cv_PTHREAD_MUTEX_CLOCKLOCK = yes; then
- AC_DEFINE(_GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK, (_GLIBCXX_TSAN==0), [Define if pthread_mutex_clocklock is available in <pthread.h>.])
+ AC_DEFINE(_GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK, 1, [Define if pthread_mutex_clocklock is available in <pthread.h>.])
fi
CXXFLAGS="$ac_save_CXXFLAGS"
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 4ad781a..d57cfd5 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -21881,7 +21881,7 @@ fi
$as_echo "$glibcxx_cv_PTHREAD_MUTEX_CLOCKLOCK" >&6; }
if test $glibcxx_cv_PTHREAD_MUTEX_CLOCKLOCK = yes; then
-$as_echo "#define _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK (_GLIBCXX_TSAN==0)" >>confdefs.h
+$as_echo "#define _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK 1" >>confdefs.h
fi