[Bug 277047] /usr/lib/libcompiler_rt.a(atomic.o) hidden visibility causes non-atomic atomics

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 15 Feb 2024 09:33:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277047

David Chisnall <theraven@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |theraven@FreeBSD.org

--- Comment #3 from David Chisnall <theraven@FreeBSD.org> ---
Both LLVM and GCC generate calls to the same helper functions and expect them
to be provided by a platform support library.

I wrote the first version of the code for the LLVM atomics helpers and the
expectation was always that system integrators would build it into a
libatomics.so, into their C runtime, or their C standard library for dynamic
linking, or include it for static linking.

FreeBSD seems build it into compiler-rt.  It was intentionally *not* connected
to the compiler-rt build system upstream to avoid this.  It is not intended as
part of the compiler-rt static linking interface, it is a file that exists so
that system integrators building a toolchain with LLVM components don't have to
start from scratch when implementing the atomic helpers.

-- 
You are receiving this mail because:
You are the assignee for the bug.