Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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) ?

like image 835
Pierre Avatar asked Dec 18 '22 21:12

Pierre


1 Answers

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.

like image 76
Clifford Avatar answered Dec 28 '22 06:12

Clifford