[libcxx-commits] [libcxx] [libc++] Remove ios_base::__xindex_ from the ABI (PR #198994)

Peter Smith via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 10 06:16:25 PDT 2026


smithp35 wrote:

Just to give some context. On an armv6-m, like Cortex-M0 there are no atomic instructions so all calls will go out to libatomic. At least one issue where this has been mentioned https://github.com/llvm/llvm-project/issues/58603 

Unfortunately there isn't an easy way to implement libatomic on a v6-m in a way that would transparently satisfy all users. The most common implementation is to disable interrupts, do the operation, re-enable interrupts. However disabling interrupts requires privileged (handler mode I think) so it isn't universally applicable. The other possible implementation is to just do the operation without touching interrupts, but that may not be the desired behaviour.

The end result is an undefined link error for the missing libatomic functions.

A lot of embedded toolchains prefer to build without atomic<int> for v6-m to avoid running into this problem.



https://github.com/llvm/llvm-project/pull/198994


More information about the libcxx-commits mailing list