[llvm-dev] A libc in LLVM

Kamil Rytarowski via llvm-dev
Thu, 27 Jun 2019 17:16:43 -0000

On 25.06.2019 21:12, Rich Felker via llvm-dev wrote:
> Since I have a little experience in this area, I'd like to chime in on
> it. :-) TL;DR I think it's a reall, REALLY bad idea.

As a contributor to NetBSD libc, I don't see any benefits in the
proposal. Mentioned motivations like static linking, static PIE are
supported natively out of the box.

Tighter sanitizer integration? NetBSD supports in-libc UBSan and
whole-distribution sanitization (ASan, UBSan, TSan, MSan.. in various
degrees of completeness).

Licensing issues? The implementation is (L)GPL-free...

NetBSD libc is an integral and inseparable part of the NetBSD
distribution. We share the same code with the kernel, userland
utilities, bootloader, rumpkernels..

Every kernel has its own specific syscall ABI layer and thus parts like
libpthread need to be implemented largely for each OS separately. Even
every BSD is totally different here. Portable libdl? Not really as we
shall support dynamic loader specifics on per-OS basis.

Furthermore downstream OSs like NetBSD need downstream specific behavior
in toolchain that is tightly integrated into loader/libc/kernel.

Reimplementing libc would be a tremendous work for literally no gain.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190627/3bf85eaf/attachment.sig>