ccompilationcross-platformnewlib

Is there a difference between libc, newlib and uclibc interface?


I'm trying to cross-compile an SSH-server to port it on an home-made OS, using newlib (because the OS uses a lib which is based on newlib).

I got some troubles with the RedHat Newlib, and I was wondering if I can do my porting with another library (for example uclibc) ?

Is there differences between this 3 "libc" interfaces (libc, newlib, and uclibc) ?


Solution

  • GNU libc (glibc) includes ISO C, POSIX, System V, and XPG interfaces. uClibc provides ISO C, POSIX and System V, while Newlib provides only ISO C.

    While you might be able to port other libraries, they have specific OS dependencies. Unless your OS itself is POSIX compliant, it will probably be an unrealistic prospect.

    Even with Newlib, it is your responsibility to implement the syscalls appropriately to support devices, file-systems and memory management.