[libc-dev] mlibc - an existing libc with similar goals to LLVM libc

Geert Custers via libc-dev libc-dev at lists.llvm.org
Mon Dec 13 01:31:28 PST 2021


Dear Siva and David,

Thank you for your responses!

We would like to port managarm to LLVM Libc, though at the moment, this
is not possible. The biggest barrier to this being portability. However,
as far as we can tell, portability is one of the goals of the LLVM Libc
project.  We believe the mlibc codebase can help with this, as we have
quite some code already in place, and we also have this code ported to
many different smaller OSes developed by hobbyists (our portability
probably being our greatest strength).

What we imagine a collaboration to look like is something akin to the
following:
	
	1. We work out how to port additional OSes to LLVM Libc, with a
	portability model that fits our purpose.
	2. We contribute a managarm port to upstream LLVM Libc.
	3. If this all works out, we could re-license some parts of mlibc,
	and contribute a lot of our code.

However, we’d only like to continue with this if our portability &
modularity goals are aligned. For example, one thing that’s extremely
important to us is supporting a wide variety of OSes, no matter how
small or large, it’s fundamental to mlibc. With a portability-first
philosophy this should come naturally. Another big feature is
modularity. In mlibc different libc standards (such as ANSI C, POSIX,
glibc and Linux extensions) can be turned on and off by the user. These
are important features for us, and they make mlibc such a unique and
flexible libc, so if these are not met, then it would be difficult for
us to envision collaboration.

On the other hand, if we can agree on goals, and a good way forward,
then we believe that there is an opportunity to make LLVM Libc a mature,
portable and modular libc that can be used on a diverse set of OSes.

We would be excited to hear your thoughts on this.

Best, Geert (on behalf of the managarm team.)

PS: I’ve also put some relevant members of the mlibc team on CC.


More information about the libc-dev mailing list