[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 |
|
---|
[96e0ac7] | 18 | <para>Now prepare Glibc for compilation:</para>
|
---|
[a9fb6a45] | 19 |
|
---|
[84a7dc2] | 20 | <para><screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
|
---|
[a9fb6a45] | 21 | --disable-profile --enable-add-ons \
|
---|
[1179ee9] | 22 | --libexecdir=/usr/bin --with-headers=/usr/include</userinput></screen></para>
|
---|
[3a3b76e] | 23 |
|
---|
[96e0ac7] | 24 | <para>The meaning of the configure options:</para>
|
---|
[7bfad05] | 25 |
|
---|
| 26 | <itemizedlist>
|
---|
[e4b9338] | 27 | <listitem><para><userinput>--disable-profile</userinput>: This disables the
|
---|
[d3d229f] | 28 | building of the libraries with profiling information. Omit this option if you
|
---|
| 29 | plan to do profiling.</para></listitem>
|
---|
[7bfad05] | 30 |
|
---|
[d3d229f] | 31 | <listitem><para><userinput>--enable-add-ons</userinput>: This enables any
|
---|
| 32 | add-ons that we installed with Glibc, in our case Linuxthreads.</para></listitem>
|
---|
[7bfad05] | 33 |
|
---|
[e4b9338] | 34 | <listitem><para><userinput>--libexecdir=/usr/bin</userinput>: This will
|
---|
[d3d229f] | 35 | cause the <filename>pt_chown</filename> program to be installed in the
|
---|
| 36 | <filename>/usr/bin</filename> directory.</para></listitem>
|
---|
[96e0ac7] | 37 |
|
---|
| 38 | <listitem><para><userinput>--with-headers=/usr/include</userinput>: This
|
---|
| 39 | ensures that the kernel headers in <filename>/usr/include</filename> are used
|
---|
| 40 | for this build. If you don't pass this switch then the headers from
|
---|
| 41 | <filename>/stage1/include</filename> are used which of course is not ideal
|
---|
| 42 | (although they should be identical). Using the switch has the advantage
|
---|
| 43 | that you will be informed immediately should you have forgotten to install the
|
---|
| 44 | kernel headers into <filename>/usr/include</filename>.</para></listitem>
|
---|
[7bfad05] | 45 | </itemizedlist>
|
---|
| 46 |
|
---|
[96e0ac7] | 47 | <para>Compile the package:</para>
|
---|
[7bfad05] | 48 |
|
---|
| 49 | <para><screen><userinput>make</userinput></screen></para>
|
---|
| 50 |
|
---|
[96e0ac7] | 51 | <para>Check the results:</para>
|
---|
[a9fb6a45] | 52 |
|
---|
[bc82645e] | 53 | <para><screen><userinput>make check</userinput></screen></para>
|
---|
| 54 |
|
---|
[96e0ac7] | 55 | <para>And install the package:</para>
|
---|
| 56 |
|
---|
[7bfad05] | 57 | <para><screen><userinput>make install</userinput></screen></para>
|
---|
[a9fb6a45] | 58 |
|
---|
[96e0ac7] | 59 | <para>The locales that can make your system respond in a different language
|
---|
| 60 | weren't installed by the above command. Do it with this:</para>
|
---|
[a9fb6a45] | 61 |
|
---|
| 62 | <para><screen><userinput>make localedata/install-locales</userinput></screen></para>
|
---|
| 63 |
|
---|
[d3d229f] | 64 | <para>An alternative to running the previous command is to install only those
|
---|
[96e0ac7] | 65 | locales which you need or want. This can be achieved using the
|
---|
| 66 | <userinput>localedef</userinput> command. Information on this can be found in
|
---|
| 67 | the <filename>INSTALL</filename> file in the
|
---|
| 68 | <filename>glibc-&glibc-version;</filename> tree.</para>
|
---|
[a9fb6a45] | 69 |
|
---|
[96e0ac7] | 70 | <para>Finally, build the linuxthreads man pages:</para>
|
---|
[41d1d0e] | 71 |
|
---|
| 72 | <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man</userinput></screen></para>
|
---|
| 73 |
|
---|
[96e0ac7] | 74 | <para>And install these pages:</para>
|
---|
[41d1d0e] | 75 |
|
---|
| 76 | <para><screen><userinput>make -C ../glibc-2.3.2/linuxthreads/man install</userinput></screen></para>
|
---|
| 77 |
|
---|
[6370fa6] | 78 | </sect2>
|
---|
| 79 |
|
---|