[Bug target/125312] [16/17 Regression] x86_64-w64-mingw32: weak_ptr::lock() / shared_from_this() multi-thread stress fails
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat May 16 10:17:39 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125312
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:1b191d0a23f3b82f6543913f8c3c2e46942af859
commit r17-552-g1b191d0a23f3b82f6543913f8c3c2e46942af859
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri May 15 10:41:33 2026 +0100
libstdc++: Make configure check for atomics work on Windows [PR125312]
The changes in r16-427-g86627faec10da5 do not work for native mingw-w64
builds because the #include with a hardcoded unix-style path doesn't
work for a native mingw-w64 compiler. This results in configure
detecting that native mingw builds do not support atomic builtins for
the _Atomic_word type, causing non-inline atomics to be used for
__gnu_cxx::__exchange_and_add and __gnu_cxx::__atomic_add, which is an
unintented ABI change (and inconsistent with mingw cross-compilers where
the configure test passes and so enables the inline functions using
atomic builtins).
This attempts to solve the problem by copying the atomic_word.h header
to the current working directory, so it can be included without using an
absolute path.
libstdc++-v3/ChangeLog:
PR libstdc++/125312
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Copy header
into cwd instead of including it via an absolute path.
* configure: Regenerate.
More information about the Gcc-bugs
mailing list