Re: frankenlibc preview

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: Antti Kantee <pooka@xxxxxx>
  • Date: Fri, 27 Feb 2015 10:35:33 +0000

On 27 February 2015 at 10:11, Antti Kantee <pooka@xxxxxx> wrote:
> On 25/02/15 00:00, Justin Cormack wrote:
>>
>> There is not yet a compiler wrapper, but actually it is very simple to
>> compile stuff for it as it provides its own crt, libc, you just need
>> to add the extra libs, eg:
>>
>> ${CC} -static -nostdinc -Brump/lib -Irump/include -Lrump/lib -lc
>> ${RUMP_LDLIBS} -lfranken test/hello.c -o bin/test
>
>
> I tried it.  It works.  Unbelievable technology.
>
> I think you have created the worlds largest hello world ;)
>
> I immediately managed to optimize its size from 2MB to 800kB by not linking
> in file systems, the networking stack, etc.  Arguably those are not needed
> by your standard "hello world" application.

I was linking them in to test for bugs when running kernel threads
mainly... those are fixed now.

I don't think it is the world's largest hello world - glibc is a 1.8MB
dynamic library, so it is actually more lightweight to link in most of
NetBSD!

Currently it is missing a few features that rumprun-posix had - need
to integrated pthreads back in, i386 support, adding some options to
the build script - but it is much more comprehensible and maintainable
and those features will be back in soon.

I have prepared a branch for rumprun-posix which removes the
non-remote support. I think it is probably a good idea to merge this
as it makes the repo easier to understand and explain, and the bin-rr
commands were not that useful on a one-shot kernel. We could then
rename it rumprun-remote to reflect that purpose.

I don't actually know what to call frankenlibc - that was only the
working title...

Justin

Other related posts: