Gentoo Archives: gentoo-dev

From: Wilbert van Bakel <wilbertml@×××××××××.net>
To: sean@××××××××××.org, gentoo-dev@g.o
Subject: Re: [gentoo-dev] linux-headers-2.4.19 related to glibc-2.2.5?
Date: Sun, 08 Sep 2002 13:30:25
Message-Id: 001b01c25765$c3d62560$6f111b3f@net
In Reply to: Re: [gentoo-dev] linux-headers-2.4.19 related to glibc-2.2.5? by Sean
1 http://www.linuxfromscratch.org/view/3.3/chapter05/kernel.html:
2
3 Why we copy the kernel headers and don't symlink them
4 In the past, it was common practice for people to symlink the
5 /usr/include/linux and asm directories to /usr/src/linux/include/linux and
6 asm respectively. This is a bad idea as this extract from a post by Linus
7 Torvalds to the Linux Kernel Mailing List points out:
8
9 I would suggest that people who compile new kernels should:
10
11 - not have a single symbolic link in sight (except the one that the
12 kernel build itself sets up, namely the "linux/include/asm" symlink
13 that is only used for the internal kernel compile itself)
14
15 And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
16 header files, even though I haven't run a 2.2.13 kernel in a _loong_
17 time. But those headers were what glibc was compiled against, so those
18 headers are what matches the library object files.
19
20 And this is actually what has been the suggested environment for at
21 least the last five years. I don't know why the symlink business keeps
22 on living on, like a bad zombie. Pretty much every distribution still
23 has that broken symlink, and people still remember that the linux
24 sources should go into "/usr/src/linux" even though that hasn't been
25 true in a _loong_ time.
26
27
28 The relevant part here is where he states that the headers should be the
29 ones which glibc was compiled against. These are the headers which should
30 remain accessible and so by copying them, we ensure that we follow these
31 guidelines. Also note that as long as you don't have those symlinks, it is
32 perfectly fine to have the kernel sources in /usr/src/linux.
33
34 ----- Original Message -----
35 From: "Sean" <sean@××××××××××.org>
36 To: <wilbertml@×××××××××.net>; <gentoo-dev@g.o>
37 Sent: Sunday, September 08, 2002 7:14 AM
38 Subject: Re: [gentoo-dev] linux-headers-2.4.19 related to glibc-2.2.5?
39
40
41 -----BEGIN PGP SIGNED MESSAGE-----
42 Hash: SHA1
43
44 It shouldn't cause any problems ... since I don't use the gentoo supplied
45 kernel source, I always keep a symlink from /usr/src/linux/include/linux to
46 /usr/include/linux
47
48 Sean

Replies

Subject Author
Re: [gentoo-dev] linux-headers-2.4.19 related to glibc-2.2.5? Sean <sean@××××××××××.org>