https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84568

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks. Changing that will cause an ABI break in the headers (and so affect
user code, not just the libstdc++.so library).

Clang and GCC will still be compatible, because the macros are still set once
by configure when building libstdc++.

One solution would be to override the checks in libstdc++-v3/acinclude.m4 so
that _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY is also #undef for RISC-V, even after the
atomic built-ins are supported. That would preserve the ABI, but would mean
ref-counting in libstdc++ is sub-optimal.

Or let the default change, and vendors who want to preserve the old ABI can
configure with --with-libstdcxx-lock-policy=mutex to override the default.

Reply via email to