Copy the kernel include dirs instead of linking to them.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@610 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Simon Perreault 2001-05-11 03:00:48 +00:00
parent 3e444c644d
commit c4dfd49bf6
2 changed files with 6 additions and 29 deletions

View File

@ -27,15 +27,12 @@ needing later on.
</para> </para>
<para> <para>
<userinput>ln -s ../src/linux/include/linux</userinput> and <userinput>cp -r ../src/linux/include/linux .</userinput> and
<userinput>ln -s ../src/linux/include/asm:</userinput> These <userinput>cp -r ../src/linux/include/asm .</userinput>: These
commands create the linux and asm symlinks in the $LFS/usr/include commands copy the kernel headers in the <filename>$LFS/usr/include</filename>
directory that point to the proper directories in the Linux source tree. directory. For details on why we don't link to these directories (anymore)
Packages that need kernel headers include them with lines like #include instead of copying them, please refer to the <filename>README</filename>
&lt;linux/errno.h&gt;. These paths are relative to the /usr/include file in the kernel source.
directory so the /usr/include/linux link points to the directory
containing the Linux kernel header files. The same goes for the asm
symlink.
</para> </para>
</sect2> </sect2>

View File

@ -18,26 +18,6 @@ The kernel configuration file is created by running the following command:
<userinput>yes "" | make config &amp;&amp;</userinput> <userinput>yes "" | make config &amp;&amp;</userinput>
<userinput>make dep &amp;&amp;</userinput> <userinput>make dep &amp;&amp;</userinput>
<userinput>cd $LFS/usr/include &amp;&amp;</userinput> <userinput>cd $LFS/usr/include &amp;&amp;</userinput>
<userinput>ln -s ../src/linux/include/linux &amp;&amp;</userinput>
<userinput>ln -s ../src/linux/include/asm</userinput>
</literallayout></blockquote>
</sect2>
<sect2>
<title>FHS compliance notes</title>
<para>
According to the FHS, the /usr/include/linux and /usr/include/asm should be
actual directories, not symbolic links to the ones belonging to the current
kernel. The major advantage is that programs will compile with the headers glibc
was compiled with, and this may prevent some compiling hell. Until now, in all
of LFS' history, no compiling problem has been reported by using symlinks. So if
you're tight on space, we recommend using symlinks. But if you want to be FHS
compliant, replace the two last lines from the commands above with those:
</para>
<blockquote><literallayout>
<userinput>cp -r ../src/linux/include/linux . &amp;&amp;</userinput> <userinput>cp -r ../src/linux/include/linux . &amp;&amp;</userinput>
<userinput>cp -r ../src/linux/include/asm .</userinput> <userinput>cp -r ../src/linux/include/asm .</userinput>
</literallayout></blockquote> </literallayout></blockquote>