# port musl libc



## Rudoland (Mar 26, 2016)

I am planning to port musl libc to FreeBSD userspace in addition to our native c library.
Is it really need for community?


----------



## ronaldlees (Mar 27, 2016)

Rudoland said:


> I am planning to port musl libc to FreeBSD userspace in addition to our native c library.
> Is it really need for community?



Sometimes you create a need by planting a seed.     So, go ahead and port musl (I don't know if it's already in ports though.  You might check.)

BTW:  Welcome to the FreeBSD forum.


----------



## Rudoland (Mar 28, 2016)

Standard query: https://www.freebsd.org/cgi/ports.cgi?query=musl&stype=all&sektion=all
System answer: Sorry, nothing found.
Musl libc is much less than the native library, so it is more suitable for embedded systems (OpenWRT project, for example).
However, FreeBSD has not port of this library. I do not understand why.


----------



## NewGuy (Mar 29, 2016)

The "Why" is probably that musl libc has a strong dependency on both the Linux kernel (version 2.6 and higher) as well as a dependency on the GNU compiler Neither of those features makes it an attractive project to port to FreeBSD. (see http://www.musl-libc.org/faq.html)


----------



## Rudoland (Mar 31, 2016)

Good news from http://www.musl-libc.org/faq.html:  ... you will also need a C99 compiler ... gcc 3.3 or later (with the GNU assembler and linker) and clang 3.2 or later are known to work. ...
Bad news from http://www.musl-libc.org/faq.html: ... with support for gcc-style __asm__ statements and assembly source files, and weak symbol support in the linker.
However, linuxulator may be help.


----------

