[4595a37] | 1 | <sect2><title> </title><para> </para></sect2>
|
---|
| 2 |
|
---|
[6370fa6] | 3 | <sect2>
|
---|
[b7cea6e] | 4 | <title>Glibc installation</title>
|
---|
[6370fa6] | 5 |
|
---|
[96e0ac7] | 6 | <para>The Glibc build system is very well self-contained and will install
|
---|
| 7 | perfectly, even though our compiler specs file and linker scripts are still
|
---|
| 8 | pointing at <filename>/stage1</filename>. We cannot adjust the specs and
|
---|
| 9 | ldscripts before the Glibc install, because the Glibc autoconf tests would then
|
---|
| 10 | give bogus results and thus defeat our goal of achieving a clean build.</para>
|
---|
| 11 |
|
---|
[d3d229f] | 12 | <para>The documentation that comes with Glibc recommends to build the package
|
---|
| 13 | not in the source directory but in a separate, dedicated directory:</para>
|
---|
[a9fb6a45] | 14 |
|
---|
[4a7a683] | 15 | <para><screen><userinput>mkdir ../glibc-build
|
---|
[ada6eeb] | 16 | cd ../glibc-build</userinput></screen></para>
|
---|
[a9fb6a45] | 17 |
|
---|
[79b94bd] | 18 | <para>Also apply the same patch as we used previously:</para>
|
---|
| 19 |
|
---|
| 20 | <para><screen><userinput>patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
|
---|
| 21 | </userinput></screen></para>
|
---|
| 22 |
|
---|
[96e0ac7] | 23 | <para>Now prepare Glibc for compilation:</para>
|
---|
[a9fb6a45] | 24 |
|
---|
[84a7dc2] | 25 | <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
|
---|
[a9fb6a45] | 26 | --disable-profile --enable-add-ons \
|
---|
[1179ee9] | 27 | --libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para>
|
---|
[3a3b76e] | 28 |
|
---|
[96e0ac7] | 29 | <para>The meaning of the configure options:</para>
|
---|
[7bfad05] | 30 |
|
---|
| 31 | <itemizedlist>
|
---|
[e4b9338] | 32 | <listitem><para><userinput>--disable-profile</userinput>: This disables the
|
---|
[d3d229f] | 33 | building of the libraries with profiling information. Omit this option if you
|
---|
| 34 | plan to do profiling.</para></listitem>
|
---|
[7bfad05] | 35 |
|
---|
[d3d229f] | 36 | <listitem><para><userinput>--enable-add-ons</userinput>: This enables any
|
---|
| 37 | add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem>
|
---|
[7bfad05] | 38 |
|
---|
[e4b9338] | 39 | <listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will
|
---|
[d3d229f] | 40 | cause the <filename>pt_chown</filename> program to be installed in the
|
---|
| 41 | <filename>/usr/bin</filename> directory.</para></listitem>
|
---|
[96e0ac7] | 42 |
|
---|
| 43 | <listitem><para><userinput>--with-headers=/usr/include</userinput>: This
|
---|
| 44 | ensures that the kernel headers in <filename>/usr/include</filename> are used
|
---|
| 45 | for this build. If you don't pass this switch then the headers from
|
---|
| 46 | <filename>/stage1/include</filename> are used which of course is not ideal
|
---|
| 47 | (although they should be identical). Using the switch has the advantage
|
---|
| 48 | that you will be informed immediately should you have forgotten to install the
|
---|
| 49 | kernel headers into <filename>/usr/include</filename>.</para></listitem>
|
---|
[7bfad05] | 50 | </itemizedlist>
|
---|
| 51 |
|
---|
[96e0ac7] | 52 | <para>Compile the package:</para>
|
---|
[7bfad05] | 53 |
|
---|
| 54 | <para><screen><userinput>make</userinput></screen></para>
|
---|
| 55 |
|
---|
[89fcc34] | 56 | <para>Test the results:</para>
|
---|
[a9fb6a45] | 57 |
|
---|
[bc82645e] | 58 | <para><screen><userinput>make check</userinput></screen></para>
|
---|
| 59 |
|
---|
[96e0ac7] | 60 | <para>And install the package:</para>
|
---|
| 61 |
|
---|
[7bfad05] | 62 | <para><screen><userinput>make install</userinput></screen></para>
|
---|
[a9fb6a45] | 63 |
|
---|
[96e0ac7] | 64 | <para>The locales that can make your system respond in a different language
|
---|
| 65 | weren't installed by the above command. Do it with this:</para>
|
---|
[a9fb6a45] | 66 |
|
---|
| 67 | <para><screen><userinput>make localedata/install-locales</userinput></screen></para>
|
---|
| 68 |
|
---|
[d3d229f] | 69 | <para>An alternative to running the previous command is to install only those
|
---|
[96e0ac7] | 70 | locales which you need or want. This can be achieved using the
|
---|
| 71 | <userinput>localedef</userinput> command. Information on this can be found in
|
---|
| 72 | the <filename>INSTALL</filename> file in the
|
---|
| 73 | <filename>glibc-&glibc-version;</filename> tree.</para>
|
---|
[a9fb6a45] | 74 |
|
---|
[96e0ac7] | 75 | <para>Finally, build the linuxthreads man pages:</para>
|
---|
[41d1d0e] | 76 |
|
---|
| 77 | <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man</userinput></screen></para>
|
---|
| 78 |
|
---|
[96e0ac7] | 79 | <para>And install these pages:</para>
|
---|
[41d1d0e] | 80 |
|
---|
| 81 | <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man install</userinput></screen></para>
|
---|
| 82 |
|
---|
[6370fa6] | 83 | </sect2>
|
---|
| 84 |
|
---|