[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] libc on Mini-OS



On Tue, 2015-09-29 at 22:12 -0400, Carl Patenaude Poulin wrote:
> Hi all,
> 
> We're still on a quest to get Rust programs to compile on Mini-OS.
> Right now, we need a libc to sandwich between the two. As far as we
> know, Mini-OS only works well with Newlib and Rust only works well
> with glibc. There's also the option of musl.
> 
> We'd be the happiest if we could make glibc work on Mini-OS, but
> we've seen points to this being very hard to accomplish. Instead,
> I've been trying to get a "Hello world!" Newlib/Mini-OS app to
> compile, based on a tutorial from 2006 on the subject[1].
> Unfortunately, that resource seems hopelessly antiquated, so I
> figured I'd ask the experts :)
> 
> I have several questions:
> 1. Have there been any efforts around getting glibc to run on Mini
> OS? Is there documentation on the subject?
> 2. Similarly, what's the status of Newlib on Mini-OS? How do you
> suggest we tackle that?
> 3. Which libc do you think we should go with?

My answer to all three of these would be to suggest that you investigate
rumpkernels (rumpkernels.org) which provides a BSD libc environment (which
is more POSIX than newlib by far and should therefore be easier to get Rust
working on). When targeting Xen rumpkernels uses mini-os for the lower
levels and achieves similar aims in a much more pleasant and accessible
way.

Does rust run on native NetBSD? If so then that removes one big hurdle.
Googling seems to suggest there have been some efforts in this direction
but I'm not clear if they are "done".

I would imagine that the rust maintainers would be more accepting of
patches which make rust usable on NetBSD than they might be of newlib or
some other even more niche libc, which means rust-on-rumpkernels would have
less to maintain themselves.

(my actual answer to 1a and 1b would be "No" and to 2 would be "moribund")

> 4. How does the Mini-OS build system create a Xen-appropriate ELF
> file without the use of a cross-compiler? Most resources I've found
> recommend the use of a cross-compiler, but nothing of the sort seems
> to be happening here.

mini-os uses the native compiler with various options to stop it linking
against system libraries.

AIUI Rump-kernels use wrappers which look just like cross compilers
(although under the hood I think they might do something similar to raw
mini-os)

Ian.


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.