LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Kernel & C Library (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/kernel-and-c-library-797475/)

riph72 03-24-2010 01:55 AM

Kernel & C Library
 
Hello all,

1) Does the choice of C library (i.e. glibc or uclibc) affect the kernel (and it's configuration) at compile-time? Or can a given compiled kernel be used with either library?

2) How can I tell which C library a given Linux system (I won't necessarily be using an off-the-shelf distribution) is using?

If it's not obvious, my interest is directed towards "embedded" Linux...

Cheers,
Richard.

irmin 03-24-2010 07:51 PM

Hi,

the choice of library does not affect the kernel. Any C library can be used with a kernel as long as the c library uses the linux ABI (which is the case since otherwise the library is useless). You can even use two different C libraries on the same kernel or no C library at all. The source of the linux kernel does not depend on any other source code than its own. The only exception are the tools that are needed to compile the kernel.

To find the version of the C library enter the following command:
Code:

/lib/libc.so.6

riph72 03-25-2010 05:17 AM

Quote:

Originally Posted by irmin (Post 3911111)
Hi,

the choice of library does not affect the kernel. Any C library can be used with a kernel as long as the c library uses the linux ABI (which is the case since otherwise the library is useless). You can even use two different C libraries on the same kernel or no C library at all. The source of the linux kernel does not depend on any other source code than its own. The only exception are the tools that are needed to compile the kernel.

To find the version of the C library enter the following command:
Code:

/lib/libc.so.6

Thanks, that's very much the definitive answer I was looking for :)


All times are GMT -5. The time now is 06:40 AM.