This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New vs Old Kernel Headers


Mike Frysinger wrote:
it depends on the libc. if you're using glibc, then glibc comes with a configure option where you tell it the oldest kernel version it can run on (see the --enable-kernel configure option). that way you can compile against the very latest headers (2.6.25) while still having the C library work on older versions (whatever given to --enable-kernel).
-mike
So after doing some posting & reading in various places, I've come to the following conclusions:

If you have an app that uses kernel interfaces directly (sys call,ioctl,etc) then the new app is *not* "guaranteed" to work on an old kernel. On the other hand if you have the same/similar app, created using older kernel headers, that abi is "guaranteed" to work in a new kernel version (i.e. backward compatible, but not forward compatible)

In that end, if you have a toolchain/glibc built against newer kernel versions, then you must be careful that when building binaries that interface with the kernel directly, you must compile them against older kernel headers if you intend to run them on that older kernel.

Or to be safe, compile glibc against older kernel headers(as old as the oldest kernel you intend to run). In that way, you don't have to worry about compiling certain against a different set of kernel headers, but just compile everything with the same ones you've compiled glibc with. This method does have the drawback if using a newer kernel, of not being able to have glibc use the latest features of that kernel.


Does this sound about right?



Thanks,


Marco Fonseca

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]