Porting newlib to a new os

nicko.koinkoin@free.fr nicko.koinkoin@free.fr
Fri Jun 27 03:23:00 GMT 2008

Selon nicko.koinkoin@free.fr:

> Hello everybody,
> I am trying to port newlib on top on an unsupported OS. I have already
> written
> the system call stubs, the crt0.S file, but now I wonders how to build the
> library.
> I uses Linux as my development platform, meaning that I want to compile
> newlib
> on Linux for my OS. I have seen that (I thinks the simplest way) this can
> been
> done by replacing the *.c files in libgloss/ that implement the system calls
> with those for my OS.
> However, I would like to use the nice and portable architecture of newlib, so
> I
> have created the directory $(NEWLIB_SRC)/newlib/libc/sys/k2, a configure.in,
> and
> copied my system call and crt0.S files inside. Next I have added the
> following
> in $(NEWLIB_SRC)/newlib/configure.host :
> i[34567]86-*-k2*)
>        sys_dir=k2
>        ;;
> and also the newlib/libc/sys/configure.in file.
> But now I don't known the next steps. In fact I have tried to add my OS in
> $(NEWLIB_SRC)/config.sub, but then of course it tries cross-compil with a
> i386-pc-k2-gcc etc ... which I haven't yet.
> So is there a way to compile/build the library for another OS (i.e. by
> providing
> the ld script etc ...)?
> Thanks
> --
> Nicko

More information about the Newlib mailing list