[Bug 293859] C11's call_once requires nonstandard library -lstdthreads for linking
[email protected] Wed, 18 Mar 2026 00:36:55 +0000
| Newsgroups | gmane.os.freebsd.devel.standards |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293859 --- Comment #8 from Konstantin Belousov <[email protected]> --- (In reply to Matthias Andree from comment #7) I am not aware of any feature in ld.bfd/lld/mold that would allow source file to affect the linker command line to include some library into the linking set. But even if there were some, it is IMO wrong to automatically link with libstdthreads because it would bring libthr into the image, which significantly changes the mode of operations for the C runtime. The fact that functions implemented in libstdthreads are specified in C standard does not make it reasonable to link it in. There are functions specified in the standard that are exported from libm, and -lm is required when math functions are used. -lstdthreads has valid important technical reasons to be separate lib and abstain from being merged into libc or linked in always. -- You are receiving this mail because: You are the assignee for the bug.