[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

Guillaume Outters via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 01:18:37 PDT 2026


================
@@ -106,6 +106,7 @@ namespace {
 
 #endif // HAVE___CXA_THREAD_ATEXIT_IMPL
 
+#if defined(__linux__) || defined(__Fuchsia__)
----------------
outtersg wrote:

Is there a reason for `__cxa_thread_atexit` to have become Linux and Fuchsia-only? Did it conflict with libc's one on OSes having it there?

I'm unable to build a 22.1.2 ecosystem from a 22.1.2 on FreeBSD 10 (… OK it's 10 years old), due to **`undefined reference to '__cxa_thread_atexit'`**,
while I could from a 21.1.6: libc++abi 21.1.6 defining `__cxa_thread_atexit` (and expecting an external `__cxa_thread_atexit_impl`) supplements libc not having it; and, on a FreeBSD 15.0 (where libc has its `__cxa_thread_atexit`), that same `__cxa_thread_atexit` doesn't seem to hinder.

So _based on my small experience_ I'd say that letting it defined doesn't hurt (thanks to some overloading magics, perhaps specific to my Frankenstein-like FreeBSD/libc++abi environments?)

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


More information about the llvm-commits mailing list