Hi all, after looking at glibc and uClib, I have been pointed at
newlib which seems exactly what I'm after. What I am trying to do
is tricky, so I thought I would ask for some advice before I begin.
I've read through the available docs and the FAQ.
I want to port newlib to FMIOS to replace its minimal libc. FMIOS is a
microkernel system, which provides a set of libraries to emulate POSIX,
as it doesn't have POSIX system calls [http://wiki.ocgnet.org:8080/FMIOS/].
Other features/issues: native a.out at present, no shared libs, no
networking, no pthreads, gcc 2.7.1.
I have modified the system to support statically-linked ELF binaries.
At present, I can recompile all of userland and the kernel using
the ELF compiler on Linux or FreeBSD, including the existing libc.
Now I want to build gcc 3.4 to produce a native ELF compiler.
Before I try to recompile gcc, I thought I would improve the libc,
hence newlib. The native compiler only supports a.outs, so I want
to build newlib for FMIOS using the FreeBSD ELF compiler.
I'm going to have to create libgloss/fmios. I'm assuming that in
here I will need to place the code for the non-POSIX system calls,
plus the library code that emulates POSIX system calls. I guess
crt0.s goes here too. Does this all sound right? And what's the difference
between libgloss/<platform> and newlib/libc/sys/<platform>?