On Thu, 14 Nov 2024, mmalcom...@nvidia.com wrote: > N.b. I would appreciate any feedback about how one should handle such a > situation when working with C11 _Atomic types. They have the same > problem that they require libatomic and sometimes libatomic is not > available. Is this just something that will stay as a known limitation > for certain platforms? Is there something in the works to make it more > viable?
libatomic, like libgcc, is part of the language support - you can't get full language support (including e.g. support for _Atomic structures) without sometimes needing to link with libatomic. Disabling libatomic means you don't have full language support. (It's possible you need to add more libatomic support for particular OS configurations, or arrange some system for responsibility to be split between libatomic and a board support package linked in with custom linker scripts if the way to do e.g. locking for large _Atomic operations genuinely depends on details of the RTOS in use where a *-elf target is used with GCC that doesn't know about those details. But ultimately, whether provided by libatomic or a BSP, code needs to be linked in to provide certain interfaces required for full _Atomic support.) -- Joseph S. Myers josmy...@redhat.com