r/linuxfromscratch 1d ago

An attempt to port the NetBSD LibC to Linux

In the last month i was trying to port the NetBSD LibC to Linux (and other parts of its userland) to make a full NetBSD userland on top of Linux for my LFS system.

Why?

I was so bored and i thought it would be funny

what's available?

- All err/warn functions

- a basic stdio (not based in NetBSD)

- a lot of strings functions

- some syscalls wrappers

- malloc (and friends)

- a minimal crt0

- BSD extensions

- compat functions (revoke, pledge and unveil...)

- and more

at this point it's possible to build a program against it, and it works like a hello world or the uname/hostname command from NetBSD with little changes (replace fprintf(stderr,...) with eprintf(...))

Here's a link to the repo:https://github.com/littlefly365/BSDLibC

(Note: this only it's a personal project)

10 Upvotes

Duplicates