1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Q1: Why does Debian's libc point the /usr/include/linux and
/usr/include/asm symlinks to a specific kernel instead of using the
standard convention of pointing them to the currently installed
kernel?
A1: Occasionally, changes in the kernel headers cause problems with
the compilation of libc and of programs that use libc. To ensure that
users are not affected by these problems, we configure libc to use the
headers from a kernel that is known to work with libc.
Q2: What if I want to compile a program that needs a feature from a
later kernel than is used by libc?
A2: In practice, most programs will not have this problem. However,
when you do run across one, you can just use -I/usr/src/linux/include
when compiling that specific program.
Q3: How to compile glibc for sparc in batch mode?
A3: Miguel de Icaza explains why you can't do it with standard kernel.
> >[...]
> > 4/ How to avoid installation of dynamic linker to /lib in the middle of
> > compilation to be able to run programs like rpcgen?
> > Other architectures can run programs without installing glibc by prefixing
> > any command with dynamic linker ld-linux.so.2. Why this behavior isn't true
> > for LinuxSPARC?
>
> because of an assumption of GNU libc. They assume that *every*
> architecture is supposed to have enough space before the ELF entry
> point to hold the linker.
>
> Since the linker does not have a starting offset defined (and because
> it is PIC code, it can be loaded anywere), when you invoke:
> /lib/ld-linux.so.2 filename, this puts the linker at 0x0 and the code
> at the architecture ELF standard entry point.
>
> In the Intel, this is something around 0x8040000, on the Alpha this is
> 0x120002120. And *surprise* *surprise*, on the SPARC, this is 0x10000
> (yes, 64k) which is not enough space to hold the linker (which has
> about 85k).
>
> The solution would be to patch the kernel load the shared object files
> at some other location.
Richard Henderson has made such patch available. Thanks to him.
It is included in this package for convenience.
Get it from debian/patches/delf-20 file.
|