- Timestamp:
- 05/03/2004 10:59:46 AM (20 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 0c43171, 2ec64b3, a4a675f
- Parents:
- 287ea55
- Location:
- chapter05
- Files:
-
- 5 added
- 25 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
chapter05/bash.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-bash"> 2 <title> InstallingBash-&bash-version;</title>3 <?dbhtml filename="bash.html" dir="chapter05"?>7 <title>Bash-&bash-version;</title> 8 <?dbhtml filename="bash.html"?> 4 9 5 <screen>&buildtime; &bash-time-tools; 6 &diskspace; &bash-compsize-tools;</screen> 10 <indexterm zone="ch-tools-bash"> 11 <primary sortas="a-Bash">Bash</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-bash-down; 9 &aa-bash-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 1.2 SBU 17 &diskspace; 27 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 17 26 patch:</para> 18 27 19 <screen><userinput>patch -Np1 -i ../ &bash-patch;</userinput></screen>28 <screen><userinput>patch -Np1 -i ../bash-&bash-version;-2.patch</userinput></screen> 20 29 21 30 <para>Now prepare Bash for compilation:</para> … … 41 50 </sect2> 42 51 43 <sect2><title> </title><para> </para>52 <sect2><title> </title><para> </para> 44 53 <para>The details on this package are found in <xref linkend="contents-bash"/>.</para> 45 <para> </para></sect2>54 <para> </para></sect2> 46 55 47 56 </sect1> 48 -
chapter05/binutils-pass1.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-binutils-pass1"> 2 <title> InstallingBinutils-&binutils-version; - Pass 1</title>3 <?dbhtml filename="binutils-pass1.html" dir="chapter05"?>7 <title>Binutils-&binutils-version; - Pass 1</title> 8 <?dbhtml filename="binutils-pass1.html"?> 4 9 5 <screen>&buildtime; &binutils-time-tools-pass1; 6 &diskspace; &binutils-compsize-tools-pass1;</screen> 10 <indexterm zone="ch-tools-binutils-pass1"> 11 <primary sortas="a-Binutils">Binutils</primary> 12 <secondary>tools, pass 1</secondary></indexterm> 7 13 8 &aa-binutils-down; 9 &aa-binutils-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 1.0 SBU 17 &diskspace; 194 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 22 31 <emphasis>-mcpu</emphasis> options). Therefore, if you have defined any 23 32 environment variables that override default optimizations, such as CFLAGS and 24 CXXFLAGS, we recommend un setting them when building Binutils.</para>33 CXXFLAGS, we recommend un-setting them when building Binutils.</para> 25 34 26 35 <para>The Binutils documentation recommends building Binutils outside of the … … 32 41 <note><para>If you want the SBU values listed in the rest of the book to be of 33 42 any use, you will have to measure the time it takes to build this package -- 34 from the configuration up to and including the first install. To achieve this43 from the configuration up to and including the first install. To achieve this 35 44 easily, you could wrap the four commands in a <command>time</command> command 36 45 like this: <userinput>time { ./configure ... && ... && ... … … 39 48 <para>Now prepare Binutils for compilation:</para> 40 49 41 <screen><userinput>../ &binutils-dir;/configure --prefix=/tools --disable-nls</userinput></screen>50 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen> 42 51 43 52 <para>The meaning of the configure options:</para> … … 80 89 second.</para> 81 90 82 <para> Andinstall the package:</para>91 <para>Now install the package:</para> 83 92 84 93 <screen><userinput>make install</userinput></screen> 85 94 86 <para>Now prepare the linker for the "Adjusting"phase later on:</para>95 <para>Now prepare the linker for the <quote>Adjusting</quote> phase later on:</para> 87 96 88 97 <screen><userinput>make -C ld clean … … 93 102 <itemizedlist> 94 103 <listitem><para><userinput>-C ld clean</userinput>: This tells the make program 95 to remove all the compiled files in the <filename 96 class="directory">ld</filename> subdirectory.</para></listitem> 104 to remove all the compiled files in the <filename class="directory">ld</filename> subdirectory.</para></listitem> 97 105 98 106 <listitem><para><userinput>-C ld LDFLAGS="-all-static" … … 105 113 </itemizedlist> 106 114 107 <!-- HACK - Force some whitespace to appease tidy -->108 <literallayout></literallayout>109 115 110 116 <warning><para><emphasis>Do not yet remove</emphasis> the Binutils build and … … 112 118 further on in this chapter.</para></warning> 113 119 114 <!-- HACK - Force some whitespace to appease tidy -->115 <literallayout></literallayout>116 120 117 121 </sect2> 118 122 119 <sect2><title> </title><para> </para>123 <sect2><title> </title><para> </para> 120 124 <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para> 121 <para> </para></sect2>125 <para> </para></sect2> 122 126 123 127 </sect1> 124 -
chapter05/binutils-pass2.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-binutils-pass2"> 2 <title> InstallingBinutils-&binutils-version; - Pass 2</title>3 <?dbhtml filename="binutils-pass2.html" dir="chapter05"?>7 <title>Binutils-&binutils-version; - Pass 2</title> 8 <?dbhtml filename="binutils-pass2.html"?> 4 9 5 <screen>&buildtime; &binutils-time-tools-pass2; 6 &diskspace; &binutils-compsize-tools-pass2;</screen> 10 <indexterm zone="ch-tools-binutils-pass2"> 11 <primary sortas="a-Binutils">Binutils</primary> 12 <secondary>tools, pass 2</secondary></indexterm> 7 13 8 &aa-binutils-down; 9 & aa-binutils-dep;14 <screen>&buildtime; 1.5 SBU 15 &diskspace; 108 MB</screen> 10 16 11 <sect2><title> </title><para> </para></sect2>12 17 13 18 <sect2> … … 21 26 <para>Now prepare Binutils for compilation:</para> 22 27 23 <screen><userinput>../ &binutils-dir;/configure --prefix=/tools \24 --enable-shared --with-lib-path=/tools/lib</userinput></screen>28 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \ 29 --enable-shared --with-lib-path=/tools/lib</userinput></screen> 25 30 26 31 <para>The meaning of the new configure option:</para> … … 65 70 make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen> 66 71 67 <!-- HACK - Force some whitespace to appease tidy -->68 <literallayout></literallayout>69 72 70 73 <warning><para><emphasis>Do not yet remove</emphasis> the Binutils source and … … 72 75 in the state they are in now.</para></warning> 73 76 74 <!-- HACK - Force some whitespace to appease tidy -->75 <literallayout></literallayout>76 77 77 78 </sect2> 78 79 79 <sect2><title> </title><para> </para>80 <sect2><title> </title><para> </para> 80 81 <para>The details on this package are found in <xref linkend="contents-binutils"/>.</para> 81 <para> </para></sect2>82 <para> </para></sect2> 82 83 83 84 </sect1> 84 -
chapter05/bzip2.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-bzip2"> 2 <title> InstallingBzip2-&bzip2-version;</title>3 <?dbhtml filename="bzip2.html" dir="chapter05"?>7 <title>Bzip2-&bzip2-version;</title> 8 <?dbhtml filename="bzip2.html"?> 4 9 5 <screen>&buildtime; &bzip2-time-tools; 6 &diskspace; &bzip2-compsize-tools;</screen> 10 <indexterm zone="ch-tools-bzip2"> 11 <primary sortas="a-Bzip2">Bzip2</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-bzip2-down; 9 &aa-bzip2-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.1 SBU 17 &diskspace; 2.5 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 21 30 </sect2> 22 31 23 <sect2><title> </title><para> </para>32 <sect2><title> </title><para> </para> 24 33 <para>The details on this package are found in <xref linkend="contents-bzip2"/>.</para> 25 <para> </para></sect2>34 <para> </para></sect2> 26 35 27 36 </sect1> 28 -
chapter05/chapter05.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <chapter id="chapter-temporary-tools" xreflabel="Chapter 5"> 7 <?dbhtml dir="chapter05"?> 2 8 <title>Constructing a temporary system</title> 3 <?dbhtml filename="chapter05.html" dir="chapter05"?>9 <?dbhtml filename="chapter05.html"?> 4 10 5 6 <sect1 id="ch-tools-introduction"> 7 <title>Introduction</title> 8 <?dbhtml filename="introduction.html" dir="chapter05"?> 9 10 <para>In this chapter we will compile and install a minimal 11 Linux system. This system will contain just enough tools to be able 12 to start constructing the final LFS system in the next chapter.</para> 13 14 <para>The building of this minimal system is done in two steps: first we 15 build a brand-new and host-independent toolchain (compiler, assembler, 16 linker and libraries), and then use this to build all the other essential 17 tools.</para> 18 19 <para>The files compiled in this chapter will be installed under the 20 <filename class="directory">$LFS/tools</filename> directory 21 to keep them separate from the files installed in the next chapter. 22 Since the packages compiled here are merely temporary, we don't want 23 them to pollute the soon-to-be LFS system.</para> 24 25 <para>Before issuing the build instructions for a package you are expected to 26 have already unpacked it as user <emphasis>lfs</emphasis>, and to have 27 performed a <userinput>cd</userinput> into the created directory. The build 28 instructions assume that you are using the <command>bash</command> 29 shell.</para> 30 31 <para>Several of the packages are patched before compilation, but only when 32 the patch is needed to circumvent a problem. Often the patch is needed in 33 both this and the next chapter, but sometimes in only one of them. Therefore, 34 don't worry when instructions for a downloaded patch seem to be missing. Also, 35 when applying a patch, you'll occasionally see warning messages about 36 <emphasis>offset</emphasis> or <emphasis>fuzz</emphasis>. These warnings are 37 nothing to worry about, as the patch was still successfully applied.</para> 38 39 <para>During the compilation of most packages you will see many warnings 40 scroll by on your screen. These are normal and can safely be ignored. They are 41 just what they say they are: warnings -- mostly about deprecated, but not 42 invalid, use of the C or C++ syntax. It's just that C standards have changed 43 rather often and some packages still use the older standard, which is not 44 really a problem.</para> 45 46 <para>After installing each package you should delete its source and build 47 directories, <emphasis>unless</emphasis> told otherwise. Deleting the sources 48 saves space, but also prevents misconfiguration when the same package is 49 reinstalled further on. Only for three packages you will need to keep the 50 source and build directories around for a while, so their contents can be used 51 by later commands. Do not miss the reminders.</para> 52 53 </sect1> 54 55 56 <sect1 id="tools-technicalnotes"> 57 <title>Technical notes</title> 58 <?dbhtml filename="technicalnotes.html" dir="chapter05"?> 59 60 <para>This section attempts to explain some of the rationale and technical 61 details behind the overall build method. It's not essential that you understand 62 everything here immediately. Most of it will make sense once you have performed 63 an actual build. Feel free to refer back here at any time.</para> 64 65 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to provide a sane, 66 temporary environment that we can chroot into, and from which we can produce a 67 clean, trouble-free build of the target LFS system in 68 <xref linkend="chapter-building-system"/>. Along the way, we attempt to divorce ourselves 69 from the host system as much as possible, and in so doing build a 70 self-contained and self-hosted toolchain. It should be noted that the 71 build process has been designed in such a way so as to minimize the risks for 72 new readers and provide maximum educational value at the same time. In other 73 words, more advanced techniques could be used to build the system.</para> 74 75 <important> 76 <para>Before continuing, you really should be aware of the name of your working 77 platform, often also referred to as the <emphasis>target triplet</emphasis>. For 78 many folks the target triplet will probably be 79 <emphasis>i686-pc-linux-gnu</emphasis>. A simple way to determine your target 80 triplet is to run the <filename>config.guess</filename> script that comes with 81 the source for many packages. Unpack the Binutils sources and run the script: 82 <userinput>./config.guess</userinput> and note the output.</para> 83 84 <para>You'll also need to be aware of the name of your platform's 85 <emphasis>dynamic linker</emphasis>, often also referred to as the 86 <emphasis>dynamic loader</emphasis>, not to be confused with the standard linker 87 <emphasis>ld</emphasis> that is part of Binutils. The dynamic linker is provided 88 by Glibc and has the job of finding and loading the shared libraries needed by a 89 program, preparing the program to run and then running it. For most folks the 90 name of the dynamic linker will be <emphasis>ld-linux.so.2</emphasis>. On 91 platforms that are less prevalent, the name might be 92 <emphasis>ld.so.1</emphasis> and newer 64 bit platforms might even have 93 something completely different. You should be able to determine the name 94 of your platform's dynamic linker by looking in the 95 <filename class="directory">/lib</filename> directory on your host system. A 96 surefire way is to inspect a random binary from your host system by running: 97 <userinput>readelf -l <name of binary> | grep interpreter</userinput> 98 and noting the output. The authoritative reference covering all platforms is in 99 the <filename>shlib-versions</filename> file in the root of the Glibc source 100 tree.</para> 101 </important> 102 103 <para>Some key technical points of how the <xref linkend="chapter-temporary-tools"/> build 104 method works:</para> 105 106 <itemizedlist> 107 <listitem><para>Similar in principle to cross compiling whereby tools installed 108 into the same prefix work in cooperation and thus utilize a little GNU 109 "magic".</para></listitem> 110 111 <listitem><para>Careful manipulation of the standard linker's library search 112 path to ensure programs are linked only against libraries we 113 choose.</para></listitem> 114 115 <listitem><para>Careful manipulation of <command>gcc</command>'s 116 <emphasis>specs</emphasis> file to tell the compiler which target dynamic 117 linker will be used.</para></listitem> 118 </itemizedlist> 119 120 <para>Binutils is installed first because both GCC and Glibc perform various 121 feature tests on the assembler and linker during their respective runs of 122 <command>./configure</command> to determine which software features to enable 123 or disable. This is more important than one might first realize. An incorrectly 124 configured GCC or Glibc can result in a subtly broken toolchain where the impact 125 of such breakage might not show up until near the end of the build of a whole 126 distribution. Thankfully, a test suite failure will usually alert us before too 127 much time is wasted.</para> 128 129 <para>Binutils installs its assembler and linker into two locations, 130 <filename class="directory">/tools/bin</filename> and 131 <filename class="directory">/tools/$TARGET_TRIPLET/bin</filename>. In reality, 132 the tools in one location are hard linked to the other. An important facet of 133 the linker is its library search order. Detailed information can be obtained 134 from <command>ld</command> by passing it the <emphasis>--verbose</emphasis> 135 flag. For example: <command>ld --verbose | grep SEARCH</command> will 136 show you the current search paths and their order. You can see what files are 137 actually linked by <command>ld</command> by compiling a dummy program and 138 passing the <emphasis>--verbose</emphasis> switch to the linker. For example: 139 <command>gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command> 140 will show you all the files successfully opened during the linking.</para> 141 142 <para>The next package installed is GCC and during its run of 143 <command>./configure</command> you'll see, for example:</para> 144 145 <blockquote><screen>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as 146 checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</screen></blockquote> 147 148 <para>This is important for the reasons mentioned above. It also demonstrates 149 that GCC's configure script does not search the PATH directories to find which 150 tools to use. However, during the actual operation of <command>gcc</command> 151 itself, the same search paths are not necessarily used. You can find out which 152 standard linker <command>gcc</command> will use by running: 153 <command>gcc -print-prog-name=ld</command>. 154 Detailed information can be obtained from <command>gcc</command> by passing 155 it the <emphasis>-v</emphasis> flag while compiling a dummy program. For 156 example: <command>gcc -v dummy.c</command> will show you detailed 157 information about the preprocessor, compilation and assembly stages, including 158 <command>gcc</command>'s include search paths and their order.</para> 159 160 <para>The next package installed is Glibc. The most important considerations for 161 building Glibc are the compiler, binary tools and kernel headers. The compiler 162 is generally no problem as Glibc will always use the <command>gcc</command> 163 found in a PATH directory. The binary tools and kernel headers can be a little 164 more troublesome. Therefore we take no risks and use the available configure 165 switches to enforce the correct selections. After the run of 166 <command>./configure</command> you can check the contents of the 167 <filename>config.make</filename> file in the 168 <filename class="directory">glibc-build</filename> directory for all the 169 important details. You'll note some interesting items like the use of 170 <emphasis>CC="gcc -B/tools/bin/"</emphasis> to control which binary tools are 171 used, and also the use of the <emphasis>-nostdinc</emphasis> and 172 <emphasis>-isystem</emphasis> flags to control the compiler's include search 173 path. These items help to highlight an important aspect of the Glibc package: 174 it is very self-sufficient in terms of its build machinery and generally does 175 not rely on toolchain defaults.</para> 176 177 <para>After the Glibc installation, we make some adjustments to ensure that 178 searching and linking take place only within our <filename>/tools</filename> 179 prefix. We install an adjusted <command>ld</command>, which has a hard-wired 180 search path limited to <filename class="directory">/tools/lib</filename>. Then 181 we amend <command>gcc</command>'s specs file to point to our new dynamic 182 linker in <filename class="directory">/tools/lib</filename>. This last step is 183 <emphasis>vital</emphasis> to the whole process. As mentioned above, a 184 hard-wired path to a dynamic linker is embedded into every ELF shared 185 executable. You can inspect this by running: 186 <command>readelf -l <name of binary> | grep interpreter</command>. 187 By amending <command>gcc</command>'s specs file, we are ensuring that every 188 program compiled from here through the end of this chapter will use our new 189 dynamic linker in <filename class="directory">/tools/lib</filename>.</para> 190 191 <para>The need to use the new dynamic linker is also the reason why we apply the 192 Specs patch for the second pass of GCC. Failure to do so will result in the GCC 193 programs themselves having the name of the dynamic linker from the host system's 194 <filename class="directory">/lib</filename> directory embedded into them, which 195 would defeat our goal of getting away from the host.</para> 196 197 <para>During the second pass of Binutils, we are able to utilize the 198 <emphasis>--with-lib-path</emphasis> configure switch to control 199 <command>ld</command>'s library search path. From this point onwards, the 200 core toolchain is self-contained and self-hosted. The remainder of the 201 <xref linkend="chapter-temporary-tools"/> packages all build against the new Glibc in 202 <filename class="directory">/tools</filename> and all is well.</para> 203 204 <para>Upon entering the chroot environment in <xref linkend="chapter-building-system"/>, the 205 first major package we install is Glibc, due to its self-sufficient nature that 206 we mentioned above. Once this Glibc is installed into 207 <filename class="directory">/usr</filename>, we perform a quick changeover of 208 the toolchain defaults, then proceed for real in building the rest of the 209 target LFS system.</para> 210 211 </sect1> 212 213 214 <sect1 id="tools-aboutlinking"> 215 <title>Notes on static linking</title> 216 <?dbhtml filename="aboutlinking.html" dir="chapter05"?> 217 218 <para>Most programs have to perform, beside their specific task, many rather 219 common and sometimes trivial operations. These include allocating memory, 220 searching directories, reading and writing files, string handling, pattern 221 matching, arithmetic and many other tasks. Instead of obliging each program to 222 reinvent the wheel, the GNU system provides all these basic functions in 223 ready-made libraries. The major library on any Linux system is 224 <emphasis>Glibc</emphasis>.</para> 225 226 <para>There are two primary ways of linking the functions from a library to a 227 program that uses them: statically or dynamically. When a program is linked 228 statically, the code of the used functions is included in the executable, 229 resulting in a rather bulky program. When a program is dynamically linked, what 230 is included is a reference to the dynamic linker, the name of the library, and 231 the name of the function, resulting in a much smaller executable. (A third way 232 is to use the programming interface of the dynamic linker. See the 233 <emphasis>dlopen</emphasis> man page for more information.)</para> 234 235 <para>Dynamic linking is the default on Linux and has three major advantages 236 over static linking. First, you need only one copy of the executable library 237 code on your hard disk, instead of having many copies of the same code included 238 into a whole bunch of programs -- thus saving disk space. Second, when several 239 programs use the same library function at the same time, only one copy of the 240 function's code is required in core -- thus saving memory space. Third, when a 241 library function gets a bug fixed or is otherwise improved, you only need to 242 recompile this one library, instead of having to recompile all the programs that 243 make use of the improved function.</para> 244 245 <para>If dynamic linking has several advantages, why then do we statically link 246 the first two packages in this chapter? The reasons are threefold: historical, 247 educational, and technical. Historical, because earlier versions of LFS 248 statically linked every program in this chapter. Educational, because knowing 249 the difference is useful. Technical, because we gain an element of independence 250 from the host in doing so, meaning that those programs can be used 251 independently of the host system. However, it's worth noting that an overall 252 successful LFS build can still be achieved when the first two packages are 253 built dynamically.</para> 254 255 </sect1> 256 257 258 &c5-binutils-pass1; 259 &c5-gcc-pass1; 260 &c5-kernelheaders; 261 &c5-glibc; 262 263 264 <sect1 id="ch-tools-adjusting"> 265 <title>Adjusting the toolchain</title> 266 <?dbhtml filename="adjusting.html" dir="chapter05"?> 267 268 <para>Now that the temporary C libraries have been installed, we want all 269 the tools compiled in the rest of this chapter to be linked against these 270 libraries. To accomplish this, we need to adjust the linker and the compiler's 271 specs file. Some people would say that it is <emphasis>"black magic juju below 272 this line"</emphasis>, but it is really very simple.</para> 273 274 <para>First install the adjusted linker (adjusted at the end of the first pass 275 of Binutils) by running the following command from within 276 the <filename class="directory">binutils-build</filename> directory:</para> 277 278 <screen><userinput>make -C ld install</userinput></screen> 279 280 <para>From this point onwards everything will link <emphasis>only</emphasis> 281 against the libraries in <filename>/tools/lib</filename>.</para> 282 283 <note><para>If you somehow missed the earlier warning to retain the Binutils 284 source and build directories from the first pass or otherwise accidentally 285 deleted them or just don't have access to them, don't worry, all is not lost. 286 Just ignore the above command. The result is a small chance of the subsequent 287 testing programs linking against libraries on the host. This is not ideal, but 288 it's not a major problem. The situation is corrected when we install the 289 second pass of Binutils a bit further on.</para></note> 290 291 <para>Now that the adjusted linker is installed, you have to 292 <emphasis>remove</emphasis> the Binutils build and source directories.</para> 293 294 <para>The next thing to do is to amend our GCC specs file so that it points 295 to the new dynamic linker. A simple sed will accomplish this:</para> 296 297 <!-- Ampersands are needed to allow cut and paste --> 298 299 <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs && 300 sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \ 301 $SPECFILE > tempspecfile && 302 mv -f tempspecfile $SPECFILE && 303 unset SPECFILE</userinput></screen> 304 305 <para>We recommend that you cut-and-paste the above rather than try and type it 306 all in. Or you can edit the specs file by hand if you want to: just replace the 307 occurrence of "/lib/ld-linux.so.2" with "/tools/lib/ld-linux.so.2". Be sure to 308 visually inspect the specs file to verify the intended change was actually 309 made.</para> 310 311 <important><para>If you are working on a platform where the name of the dynamic 312 linker is something other than <filename>ld-linux.so.2</filename>, you 313 <emphasis>must</emphasis> substitute <filename>ld-linux.so.2</filename> with the 314 name of your platform's dynamic linker in the above commands. Refer back to 315 <xref linkend="tools-technicalnotes"/> if necessary.</para></important> 316 317 <para>Lastly, there is a possibility that some include files from the host 318 system have found their way into GCC's private include dir. This can happen 319 because of GCC's "fixincludes" process which runs as part of the GCC build. 320 We'll explain more about this further on in this chapter. For now, run the 321 following commands to eliminate this possibility:</para> 322 323 <screen><userinput>rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen> 324 325 <!-- HACK - Force some whitespace to appease tidy --> 326 <literallayout></literallayout> 327 328 <caution><para>It is imperative at this point to stop and ensure that the basic 329 functions (compiling and linking) of the new toolchain are working as expected. 330 For this we are going to perform a simple sanity check:</para> 331 332 <screen><userinput>echo 'main(){}' > dummy.c 333 cc dummy.c 334 readelf -l a.out | grep ': /tools'</userinput></screen> 335 336 <para>If everything is working correctly, there should be no errors, and the 337 output of the last command will be (allowing for platform specific differences 338 in dynamic linker name):</para> 339 340 <blockquote><screen>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</screen></blockquote> 341 342 <para>Note especially that <filename class="directory">/tools/lib</filename> 343 appears as the prefix of our dynamic linker.</para> 344 345 <para>If you did not receive the output 346 as shown above, or received no output at all, then something is seriously wrong. 347 You will need to investigate and retrace your steps to find out where the 348 problem is and correct it. There is no point in continuing until this is done. 349 First, redo the sanity check using <command>gcc</command> instead of 350 <command>cc</command>. If this works it means the 351 <filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit 352 <xref linkend="ch-tools-gcc-pass1"/> and fix the symlink. Second, ensure your PATH 353 is correct. You can check this by running <userinput>echo $PATH</userinput> and 354 verifying that <filename class="directory">/tools/bin</filename> is at the head 355 of the list. If the PATH is wrong it could mean you're not logged in as user 356 <emphasis>lfs</emphasis> or something went wrong back in <xref 357 linkend="prepare-settingenvironment"/>. Third, something may have gone wrong 358 with the specs file amendment above. In this case redo the specs file amendment 359 ensuring to cut-and-paste the commands as was recommended.</para> 360 361 <para>Once you are satisfied that all is well, clean up the test files:</para> 362 363 <screen><userinput>rm dummy.c a.out</userinput></screen> 364 </caution> 365 366 <!-- HACK - Force some whitespace to appease tidy --> 367 <literallayout></literallayout> 368 369 </sect1> 370 371 372 &c5-tcl; 373 &c5-expect; 374 &c5-dejagnu; 375 &c5-gcc-pass2; 376 &c5-binutils-pass2; 377 378 &c5-gawk; 379 &c5-coreutils; 380 &c5-bzip2; 381 &c5-gzip; 382 &c5-diffutils; 383 &c5-findutils; 384 &c5-make; 385 &c5-grep; 386 &c5-sed; 387 &c5-gettext; 388 &c5-ncurses; 389 &c5-patch; 390 &c5-tar; 391 &c5-texinfo; 392 &c5-bash; 393 &c5-perl; 394 395 396 <sect1 id="ch-tools-stripping"> 397 <title>Stripping</title> 398 <?dbhtml filename="stripping.html" dir="chapter05"?> 399 400 <para>The steps in this section are optional, but if your LFS partition is 401 rather small, you will be glad to learn that you can remove some unnecessary 402 things. The executables and libraries you have built so far contain about 130 403 MB of unneeded debugging symbols. Remove those symbols with:</para> 404 405 <screen><userinput>strip --strip-debug /tools/lib/* 406 strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 407 408 <para>The last of the above commands will skip some twenty files, reporting 409 that it doesn't recognize their file format. Most of them are scripts instead 410 of binaries.</para> 411 412 <para>Take care <emphasis>not</emphasis> to use 413 <emphasis>--strip-unneeded</emphasis> on the libraries -- the static ones 414 would be destroyed and you would have to build the three toolchain packages 415 all over again.</para> 416 417 <para>To save another 30 MB, you can remove all the documentation:</para> 418 419 <screen><userinput>rm -rf /tools/{doc,info,man}</userinput></screen> 420 421 <para>You will now need to have at least 850 MB of free space on your LFS 422 file system to be able to build and install Glibc in the next phase. If you can 423 build and install Glibc, you can build and install the rest too.</para> 424 425 </sect1> 11 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/> 12 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/> 13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/> 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/> 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/> 25 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/> 26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/> 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/> 28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/> 31 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/> 32 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/> 33 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/> 34 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/> 35 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/> 36 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/> 37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/> 38 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/> 39 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/> 40 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/> 426 41 427 42 </chapter> 428 -
chapter05/coreutils.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-coreutils"> 2 <title> InstallingCoreutils-&coreutils-version;</title>3 <?dbhtml filename="coreutils.html" dir="chapter05"?>7 <title>Coreutils-&coreutils-version;</title> 8 <?dbhtml filename="coreutils.html"?> 4 9 5 <screen>&buildtime; &coreutils-time-tools; 6 &diskspace; &coreutils-compsize-tools;</screen> 10 <indexterm zone="ch-tools-coreutils"> 11 <primary sortas="a-Coreutils">Coreutils</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 <literallayout>Official download location for Coreutils (&coreutils-version;): 9 <ulink url="ftp://ftp.gnu.org/gnu/coreutils/"/> 10 And for the patch: 11 <ulink url="&patches-root;&coreutils-posixver-patch;"/></literallayout> 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/para[1])"/> 12 15 13 &aa-coreutils-dep; 16 <screen>&buildtime; 0.9 SBU 17 &diskspace; 69 MB</screen> 14 18 15 <sect2><title> </title><para> </para></sect2> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/para[2])"/> 20 16 21 17 22 <sect2> 18 23 <title>Installation of Coreutils</title> 19 24 20 <para>This package has an issue when compiled against Glibc-&glibc-version;. 21 Without the patch below, some of the Coreutils utilities (such as 25 <para>Prepare Coreutils for compilation:</para> 26 27 <screen><userinput>DEFAULT_POSIX2_VERSION=199209 ./configure --prefix=/tools</userinput></screen> 28 29 <para>This package has an issue when compiled against versions of glibc 30 later than 2.3.2. Some of the Coreutils utilities (such as 22 31 (<command>head</command>, <command>tail</command> and <command>sort</command>) 23 32 will reject their traditional syntax, a syntax that has been in use for 24 33 approximately 30 years. This old syntax is so pervasive that compatibility 25 should be preserved until the many places where it is used can be updated. More 26 details on this are provided in the comments inside the patch itself. Use of 27 this patch is by no means compulsory, but not using it means you'll have to 28 deal with the consequences yourself: patch the many packages that still use the 29 old syntax. Therefore, better apply the patch:</para> 30 31 <screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen> 32 33 <para>Now prepare Coreutils for compilation:</para> 34 35 <screen><userinput>./configure --prefix=/tools</userinput></screen> 34 should be preserved until the many places where it is used can be 35 updated. Backwards compatibility is achieved by setting the 36 DEFAULT_POSIX2_VERSION environment variable to "199209" in the above 37 command. If you don't want coreutils to be backwards compatible 38 with the traditional syntax, then simply omit setting the DEFAULT_POSIX2_VERSION 39 environment variable. Realise though, that doing so will mean you'll have 40 to deal with the consequences yourself: patch the many packages that still use 41 the old syntax. We therefore recommend using the instructions exactly as given 42 above.</para> 36 43 37 44 <para>Compile the package:</para> … … 51 58 </sect2> 52 59 53 <sect2><title> </title><para> </para>60 <sect2><title> </title><para> </para> 54 61 <para>The details on this package are found in <xref linkend="contents-coreutils"/>.</para> 55 <para> </para></sect2>62 <para> </para></sect2> 56 63 57 64 </sect1> 58 -
chapter05/dejagnu.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-dejagnu" xreflabel="DejaGnu"> 2 <title>Installing DejaGnu-&dejagnu-version;</title> 3 <?dbhtml filename="dejagnu.html" dir="chapter05"?> 7 <title>DejaGnu-&dejagnu-version;</title> 8 <?dbhtml filename="dejagnu.html"?> 9 10 <indexterm zone="ch-tools-dejagnu"><primary sortas="a-DejaGnu">DejaGnu</primary></indexterm> 4 11 5 12 <para>The DejaGnu package contains a framework for testing other programs.</para> 6 13 7 <screen>&buildtime; &dejagnu-time-tools;8 &diskspace; &dejagnu-compsize-tools;</screen>14 <screen>&buildtime; 0.1 SBU 15 &diskspace; 8.6 MB</screen> 9 16 10 &aa-dejagnu-down; 11 &aa-dejagnu-dep; 17 <para>For its installation Dejagnu depends on: Bash, Binutils, Coreutils, Diffutils, 18 GCC, Glibc, Grep, Make, Sed.</para> 12 19 13 <sect2><title> </title><para> </para></sect2> 20 14 21 15 22 <sect2> … … 26 33 </sect2> 27 34 28 &aa-dejagnu-shortdesc; 29 &aa-dejagnu-desc; 35 36 <sect2 id="contents-dejagnu"><title>Contents of DejaGnu</title> 37 38 <para><emphasis>Installed program</emphasis>: runtest</para> 39 40 </sect2> 41 42 43 <sect2><title>Short description</title> 44 45 <indexterm zone="ch-tools-dejagnu runtest"><primary sortas="b-runtest">runtest</primary></indexterm> 46 <para id="runtest"><command>runtest</command> is the wrapper script that finds the proper 47 expect shell and then runs DejaGnu.</para> 48 49 </sect2> 50 30 51 31 52 </sect1> 32 -
chapter05/diffutils.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-diffutils"> 2 <title> InstallingDiffutils-&diffutils-version;</title>3 <?dbhtml filename="diffutils.html" dir="chapter05"?>7 <title>Diffutils-&diffutils-version;</title> 8 <?dbhtml filename="diffutils.html"?> 4 9 5 <screen>&buildtime; &diffutils-time-tools; 6 &diskspace; &diffutils-compsize-tools;</screen> 10 <indexterm zone="ch-tools-diffutils"> 11 <primary sortas="a-Diffutils">Diffutils</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-diffutils-down; 9 &aa-diffutils-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.1 SBU 17 &diskspace; 7.5 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 28 37 </sect2> 29 38 30 <sect2><title> </title><para> </para>39 <sect2><title> </title><para> </para> 31 40 <para>The details on this package are found in <xref linkend="contents-diffutils"/>.</para> 32 <para> </para></sect2>41 <para> </para></sect2> 33 42 34 43 </sect1> 35 -
chapter05/expect.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-expect" xreflabel="Expect"> 2 <title>Installing Expect-&expect-version;</title> 3 <?dbhtml filename="expect.html" dir="chapter05"?> 7 <title>Expect-&expect-version;</title> 8 <?dbhtml filename="expect.html"?> 9 10 <indexterm zone="ch-tools-expect"><primary sortas="a-Expect">Expect</primary></indexterm> 4 11 5 12 <para>The Expect package contains a program for doing scripted dialogues with 6 13 other interactive programs.</para> 7 14 8 <screen>&buildtime; &expect-time-tools;9 &diskspace; &expect-compsize-tools;</screen>15 <screen>&buildtime; 0.1 SBU 16 &diskspace; 3.9 MB</screen> 10 17 11 &aa-expect-down; 12 &aa-expect-dep; 18 <para>Expect installation depends on: Bash, Binutils, Coreutils, Diffutils, 19 GCC, Glibc, Grep, Make, Sed, Tcl.</para> 13 20 14 <sect2><title> </title><para> </para></sect2> 21 15 22 16 23 <sect2> … … 20 27 suite run:</para> 21 28 22 <screen><userinput>patch -Np1 -i ../ &expect-patch;</userinput></screen>29 <screen><userinput>patch -Np1 -i ../expect-&expect-version;-spawn-1.patch</userinput></screen> 23 30 24 31 <para>Now prepare Expect for compilation:</para> … … 64 71 </sect2> 65 72 66 &aa-expect-shortdesc; 67 &aa-expect-desc; 73 74 <sect2 id="contents-expect"><title>Contents of Expect</title> 75 76 <para><emphasis>Installed program</emphasis>: expect</para> 77 78 <para><emphasis>Installed library</emphasis>: libexpect&expect-version;.a</para> 79 80 </sect2> 81 82 83 <sect2><title>Short description</title> 84 85 <indexterm zone="ch-tools-expect expect"><primary sortas="b-expect">expect</primary></indexterm> 86 <para id="expect"><command>expect</command> <quote>talks</quote> to other interactive 87 programs according to a script.</para> 88 89 </sect2> 90 68 91 69 92 </sect1> 70 -
chapter05/findutils.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-findutils"> 2 <title> InstallingFindutils-&findutils-version;</title>3 <?dbhtml filename="findutils.html" dir="chapter05"?>7 <title>Findutils-&findutils-version;</title> 8 <?dbhtml filename="findutils.html"?> 4 9 5 <screen>&buildtime; &findutils-time-tools; 6 &diskspace; &findutils-compsize-tools;</screen> 10 <indexterm zone="ch-tools-findutils"> 11 <primary sortas="a-Findutils">Findutils</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-findutils-down; 9 &aa-findutils-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 7.6 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 31 40 </sect2> 32 41 33 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 34 43 <para>The details on this package are found in <xref linkend="contents-findutils"/>.</para> 35 <para> </para></sect2>44 <para> </para></sect2> 36 45 37 46 </sect1> 38 -
chapter05/gawk.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-gawk"> 2 <title> InstallingGawk-&gawk-version;</title>3 <?dbhtml filename="gawk.html" dir="chapter05"?>7 <title>Gawk-&gawk-version;</title> 8 <?dbhtml filename="gawk.html"?> 4 9 5 <screen>&buildtime; &gawk-time-tools; 6 &diskspace; &gawk-compsize-tools;</screen> 10 <indexterm zone="ch-tools-gawk"> 11 <primary sortas="a-Gawk">Gawk</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 <literallayout>Official download location for Gawk (&gawk-version;): 9 <ulink url="ftp://ftp.gnu.org/pub/gnu/gawk/"/></literallayout> 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 &aa-gawk-dep; 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 17 MB</screen> 12 18 13 <sect2><title> </title><para> </para></sect2> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/para[2])"/> 20 14 21 15 22 <sect2> … … 33 40 </sect2> 34 41 35 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 36 43 <para>The details on this package are found in <xref linkend="contents-gawk"/>.</para> 37 <para> </para></sect2>44 <para> </para></sect2> 38 45 39 46 </sect1> 40 -
chapter05/gcc-pass1.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-gcc-pass1"> 2 <title> InstallingGCC-&gcc-version; - Pass 1</title>3 <?dbhtml filename="gcc-pass1.html" dir="chapter05"?>7 <title>GCC-&gcc-version; - Pass 1</title> 8 <?dbhtml filename="gcc-pass1.html"?> 4 9 5 <screen>&buildtime; &gcc-time-tools-pass1; 6 &diskspace; &gcc-compsize-tools-pass1;</screen> 10 <indexterm zone="ch-tools-gcc-pass1"> 11 <primary sortas="a-GCC">GCC</primary> 12 <secondary>tools, pass 1</secondary></indexterm> 7 13 8 <literallayout>Official download location for GCC (&gcc-version;): 9 <ulink url="ftp://ftp.gnu.org/pub/gnu/gcc/"/></literallayout> 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 &aa-gcc-dep; 16 <screen>&buildtime; 4.4 SBU 17 &diskspace; 300 MB</screen> 12 18 13 <sect2><title> </title><para> </para></sect2> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/para[2])"/> 20 14 21 15 22 <sect2> … … 17 24 18 25 <para>Unpack only the GCC-core tarball, as we won't be needing the C++ compiler 19 nor the test suite at the moment.</para>26 nor the test suite here.</para> 20 27 21 28 <para>This package is known to behave badly when you change its default … … 23 30 <emphasis>-mcpu</emphasis> options). Therefore, if you have defined any 24 31 environment variables that override default optimizations, such as CFLAGS and 25 CXXFLAGS, we recommend un setting them when building GCC.</para>32 CXXFLAGS, we recommend un-setting them when building GCC.</para> 26 33 27 34 <para>The GCC documentation recommends building GCC outside of the source … … 33 40 <para>Prepare GCC for compilation:</para> 34 41 35 <screen><userinput>../ &gcc-dir;/configure --prefix=/tools \36 --with-local-prefix=/tools \37 --disable-nls --enable-shared \38 --enable-languages=c</userinput></screen>42 <screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ 43 --with-local-prefix=/tools \ 44 --disable-nls --enable-shared \ 45 --enable-languages=c</userinput></screen> 39 46 40 47 <para>The meaning of the configure options:</para> … … 45 52 from <command>gcc</command>'s include search path. This is not absolutely 46 53 essential; however, we want to try to minimize the influence of the host 47 system, thus makingthis a sensible thing to do.</para></listitem>54 system, so this a sensible thing to do.</para></listitem> 48 55 49 56 <listitem><para><userinput>--enable-shared</userinput>: This switch may … … 84 91 programs from this first pass will soon be replaced.</para> 85 92 86 <para> Andinstall the package:</para>93 <para>Now install the package:</para> 87 94 88 95 <screen><userinput>make install</userinput></screen> … … 99 106 </sect2> 100 107 101 <sect2><title> </title><para> </para>108 <sect2><title> </title><para> </para> 102 109 <para>The details on this package are found in <xref linkend="contents-gcc"/>.</para> 103 <para> </para></sect2>110 <para> </para></sect2> 104 111 105 112 </sect1> 106 -
chapter05/gcc-pass2.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-gcc-pass2"> 2 <title> InstallingGCC-&gcc-version; - Pass 2</title>3 <?dbhtml filename="gcc-pass2.html" dir="chapter05"?>7 <title>GCC-&gcc-version; - Pass 2</title> 8 <?dbhtml filename="gcc-pass2.html"?> 4 9 5 <screen>&buildtime; &gcc-time-tools-pass2; 6 &diskspace; &gcc-compsize-tools-pass2;</screen> 10 <indexterm zone="ch-tools-gcc-pass2"> 11 <primary sortas="a-GCC">GCC</primary> 12 <secondary>tools, pass 2</secondary></indexterm> 7 13 8 &aa-gcc-down; 9 & aa-gcc-dep;14 <screen>&buildtime; 11.0 SBU 15 &diskspace; 274 MB</screen> 10 16 11 <sect2><title> </title><para> </para></sect2>12 17 13 18 <sect2> … … 38 43 to unpack both the core and the g++ tarballs (and testsuite too, if you want to 39 44 run the tests). Unpacking them in your working directory, they will all unfold 40 into a single <filename> &gcc-dir;/</filename> subdirectory.</para>45 into a single <filename>gcc-&gcc-version;/</filename> subdirectory.</para> 41 46 42 47 <para>First correct a problem and make an essential adjustment:</para> 43 48 44 <screen><userinput>patch -Np1 -i ../ &gcc-nofixincludes-patch;45 patch -Np1 -i ../ &gcc-specs-patch;</userinput></screen>49 <screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch 50 patch -Np1 -i ../gcc-&gcc-version;-specs-1.patch</userinput></screen> 46 51 47 <para>The first patch disables the GCC "fixincludes" script. We mentioned this48 briefly earlier, but a slightly more in-depth explanation of the fixincludes 49 process is warranted here. Under normal circumstances, the GCC fixincludes 50 script scans your system for header files that need to be fixed. It might find 51 that some Glibc header files on your host system need to be fixed, fix them and 52 put them in the GCC private include directory. Then, later on in53 <xref linkend="chapter-building-system"/>, after we've installed the newer Glibc, this54 private include directory would be searched before the system include 55 directory, resulting in GCC finding the fixed headers from the host system, 56 which would most likely not match the Glibc version actually used for the LFS 57 system.</para>52 <para>The first patch disables the GCC <quote>fixincludes</quote> script. We 53 mentioned this briefly earlier, but a slightly more in-depth explanation of 54 the fixincludes process is warranted here. Under normal circumstances, the GCC 55 fixincludes script scans your system for header files that need to be fixed. It 56 might find that some Glibc header files on your host system need to be fixed, 57 fix them and put them in the GCC private include directory. Then, later on in 58 <xref linkend="chapter-building-system"/>, after we've installed the newer 59 Glibc, this private include directory would be searched before the system 60 include directory, resulting in GCC finding the fixed headers from the host 61 system, which would most likely not match the Glibc version actually used for 62 the LFS system.</para> 58 63 59 64 <para>The second patch changes GCC's default location of the dynamic linker … … 78 83 <para>Now prepare GCC for compilation:</para> 79 84 80 <screen><userinput>../ &gcc-dir;/configure --prefix=/tools \81 --with-local-prefix=/tools \82 --enable-clocale=gnu --enable-shared \83 --enable-threads=posix --enable-__cxa_atexit \84 --enable-languages=c,c++</userinput></screen>85 <screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \ 86 --with-local-prefix=/tools \ 87 --enable-clocale=gnu --enable-shared \ 88 --enable-threads=posix --enable-__cxa_atexit \ 89 --enable-languages=c,c++</userinput></screen> 85 90 86 91 <para>The meaning of the new configure options:</para> … … 129 134 a summary of the test suite results, run this:</para> 130 135 131 <screen><userinput>../ &gcc-dir;/contrib/test_summary</userinput></screen>136 <screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen> 132 137 133 138 <para>(For just the summaries, pipe the output through … … 147 152 <para>The unexpected pass for g++ is due to the use of 148 153 <emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms 149 supported by GCC have support for "__cxa_atexit" in their C libraries, so this150 test is not always expected to pass.</para>154 supported by GCC have support for <quote>__cxa_atexit</quote> in their C 155 libraries, so this test is not always expected to pass.</para> 151 156 152 157 <para>The 24 unexpected passes for libstdc++ are due to the use of … … 161 166 <para>Having a few unexpected failures often cannot be avoided. The GCC 162 167 developers are usually aware of these, but haven't yet gotten around to fixing 163 them. In short, unless your results are vastly different from those at the 164 above URL, it is safe to continue.</para> 168 them. One particular case in point is the filebuf_members test in the C++ 169 standard library testsuite. This test has been observed to fail in some 170 situations, but succeeed in others. In short, unless your results are vastly 171 different from those at the above URL, it is safe to continue.</para> 165 172 166 173 <para>And finally install the package:</para> … … 176 183 </sect2> 177 184 178 <sect2><title> </title><para> </para>185 <sect2><title> </title><para> </para> 179 186 <para>The details on this package are found in <xref linkend="contents-gcc"/>.</para> 180 <para> </para></sect2>187 <para> </para></sect2> 181 188 182 189 </sect1> 183 -
chapter05/gettext.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-gettext"> 2 <title> InstallingGettext-&gettext-version;</title>3 <?dbhtml filename="gettext.html" dir="chapter05"?>7 <title>Gettext-&gettext-version;</title> 8 <?dbhtml filename="gettext.html"?> 4 9 5 <screen>&buildtime; &gettext-time-tools; 6 &diskspace; &gettext-compsize-tools;</screen> 10 <indexterm zone="ch-tools-gettext"> 11 <primary sortas="a-Gettext">Gettext</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-gettext-down; 9 &aa-gettext-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.5 SBU 17 &diskspace; 55 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 35 44 </sect2> 36 45 37 <sect2><title> </title><para> </para>46 <sect2><title> </title><para> </para> 38 47 <para>The details on this package are found in <xref linkend="contents-gettext"/>.</para> 39 <para> </para></sect2>48 <para> </para></sect2> 40 49 41 50 </sect1> 42 -
chapter05/glibc.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-glibc"> 2 <title> InstallingGlibc-&glibc-version;</title>3 <?dbhtml filename="glibc.html" dir="chapter05"?>7 <title>Glibc-&glibc-version;</title> 8 <?dbhtml filename="glibc.html"?> 4 9 5 <screen>&buildtime; &glibc-time-tools; 6 &diskspace; &glibc-compsize-tools;</screen> 10 <indexterm zone="ch-tools-glibc"> 11 <primary sortas="a-Glibc">Glibc</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-glibc-down; 9 &aa-glibc-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 11.8 SBU 17 &diskspace; 800 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 18 27 <emphasis>-mcpu</emphasis> options). Therefore, if you have defined any 19 28 environment variables that override default optimizations, such as CFLAGS and 20 CXXFLAGS, we recommend un setting them when building Glibc.</para>29 CXXFLAGS, we recommend un-setting them when building Glibc.</para> 21 30 22 31 <para>Basically, compiling Glibc in any other way than the book suggests … … 31 40 <para>Next, prepare Glibc for compilation:</para> 32 41 33 <screen><userinput>../ &glibc-dir;/configure --prefix=/tools \34 --disable-profile --enable-add-ons=linuxthreads \35 --with-binutils=/tools/bin --with-headers=/tools/include \36 --without-gd --without-cvs</userinput></screen>42 <screen><userinput>../glibc-&glibc-version;-20031202/configure --prefix=/tools \ 43 --disable-profile --enable-add-ons=linuxthreads \ 44 --with-binutils=/tools/bin --with-headers=/tools/include \ 45 --without-gd --without-cvs</userinput></screen> 37 46 38 47 <para>The meaning of the configure options:</para> 39 48 40 49 <itemizedlist> 41 <listitem><para><userinput>--disable-profile</userinput>: This disables the42 build ing of the libraries withprofiling information. Omit this option if you50 <listitem><para><userinput>--disable-profile</userinput>: This 51 builds the libraries without profiling information. Omit this option if you 43 52 plan to do profiling on the temporary tools.</para></listitem> 44 53 … … 53 62 Glibc build.</para></listitem> 54 63 55 <listitem><para><userinput>--without-gd</userinput>: This switch ensures56 th at we don't buildthe <command>memusagestat</command> program, which64 <listitem><para><userinput>--without-gd</userinput>: This prevents 65 the build of the <command>memusagestat</command> program, which 57 66 strangely enough insists on linking against the host's libraries (libgd, 58 67 libpng, libz, and so forth).</para></listitem> … … 142 151 communicate. These conventions range from very simple ones, such as the format 143 152 for representing dates and times, to very complex ones, such as the language 144 spoken. The "internationalization" of GNU programs works by means of145 <emphasis>locales</emphasis>.</para>153 spoken. The <quote>internationalization</quote> of GNU programs works by means 154 of <emphasis>locales</emphasis>.</para> 146 155 147 156 <note><para>If you are not running the test suites here in this chapter as per … … 178 187 </sect2> 179 188 180 <sect2><title> </title><para> </para>189 <sect2><title> </title><para> </para> 181 190 <para>The details on this package are found in <xref linkend="contents-glibc"/>.</para> 182 <para> </para></sect2>191 <para> </para></sect2> 183 192 184 193 </sect1> 185 -
chapter05/grep.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-grep"> 2 <title> InstallingGrep-&grep-version;</title>3 <?dbhtml filename="grep.html" dir="chapter05"?>7 <title>Grep-&grep-version;</title> 8 <?dbhtml filename="grep.html"?> 4 9 5 <screen>&buildtime; &grep-time-tools; 6 &diskspace; &grep-compsize-tools;</screen> 10 <indexterm zone="ch-tools-grep"> 11 <primary sortas="a-Grep">Grep</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-grep-down; 9 &aa-grep-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.1 SBU 17 &diskspace; 5.8 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 17 26 18 27 <screen><userinput>./configure --prefix=/tools \ 19 --disable-perl-regexp --with-included-regex</userinput></screen>28 --disable-perl-regexp --with-included-regex</userinput></screen> 20 29 21 30 <para>The meaning of the configure options:</para> … … 44 53 </sect2> 45 54 46 <sect2><title> </title><para> </para>55 <sect2><title> </title><para> </para> 47 56 <para>The details on this package are found in <xref linkend="contents-grep"/>.</para> 48 <para> </para></sect2>57 <para> </para></sect2> 49 58 50 59 </sect1> 51 -
chapter05/gzip.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-gzip"> 2 <title> InstallingGzip-&gzip-version;</title>3 <?dbhtml filename="gzip.html" dir="chapter05"?>7 <title>Gzip-&gzip-version;</title> 8 <?dbhtml filename="gzip.html"?> 4 9 5 <screen>&buildtime; &gzip-time-tools; 6 &diskspace; &gzip-compsize-tools;</screen> 10 <indexterm zone="ch-tools-gzip"> 11 <primary sortas="a-Gzip">Gzip</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-gzip-down; 9 &aa-gzip-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.1 SBU 17 &diskspace; 2.6 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 28 37 </sect2> 29 38 30 <sect2><title> </title><para> </para>39 <sect2><title> </title><para> </para> 31 40 <para>The details on this package are found in <xref linkend="contents-gzip"/>.</para> 32 <para> </para></sect2>41 <para> </para></sect2> 33 42 34 43 </sect1> 35 -
chapter05/kernel-headers.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-kernel-headers"> 2 <title> Installing Linux-&kernel-version; headers</title>3 <?dbhtml filename="kernel-headers.html" dir="chapter05"?>7 <title>Linux-&linux-version; headers</title> 8 <?dbhtml filename="kernel-headers.html"?> 4 9 5 <screen>&buildtime; &kernel-time-headers; 6 &diskspace; &kernel-compsize-headers;</screen> 10 <indexterm zone="ch-tools-kernel-headers"> 11 <primary sortas="a-Linux">Linux</primary> 12 <secondary>tools, headers</secondary></indexterm> 7 13 8 <sect2><title> </title><para> </para></sect2> 14 <screen>&buildtime; 0.1 SBU 15 &diskspace; 186 MB</screen> 16 9 17 10 18 <sect2> … … 22 30 recommends that this command be issued prior to <emphasis>each</emphasis> 23 31 kernel compilation. You shouldn't rely on the source tree being clean after 24 un tarring.</para>32 un-tarring.</para> 25 33 26 34 <para>Create the <filename>include/linux/version.h</filename> file:</para> … … 39 47 cp -R include/asm-generic /tools/include</userinput></screen> 40 48 41 <para> And finallyinstall the cross-platform kernel header files:</para>49 <para>Finally, install the cross-platform kernel header files:</para> 42 50 43 51 <screen><userinput>cp -R include/linux /tools/include</userinput></screen> … … 46 54 47 55 </sect1> 48 -
chapter05/make.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-make"> 2 <title> InstallingMake-&make-version;</title>3 <?dbhtml filename="make.html" dir="chapter05"?>7 <title>Make-&make-version;</title> 8 <?dbhtml filename="make.html"?> 4 9 5 <screen>&buildtime; &make-time-tools; 6 &diskspace; &make-compsize-tools;</screen> 10 <indexterm zone="ch-tools-make"> 11 <primary sortas="a-Make">Make</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-make-down; 9 &aa-make-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 8.8 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 31 40 </sect2> 32 41 33 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 34 43 <para>The details on this package are found in <xref linkend="contents-make"/>.</para> 35 <para> </para></sect2>44 <para> </para></sect2> 36 45 37 46 </sect1> 38 -
chapter05/ncurses.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-ncurses"> 2 <title> InstallingNcurses-&ncurses-version;</title>3 <?dbhtml filename="ncurses.html" dir="chapter05"?>7 <title>Ncurses-&ncurses-version;</title> 8 <?dbhtml filename="ncurses.html"?> 4 9 5 <screen>&buildtime; &ncurses-time-tools; 6 &diskspace; &ncurses-compsize-tools;</screen> 10 <indexterm zone="ch-tools-ncurses"> 11 <primary sortas="a-Ncurses">Ncurses</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-ncurses-down; 9 &aa-ncurses-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.7 SBU 17 &diskspace; 26 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 17 26 18 27 <screen><userinput>./configure --prefix=/tools --with-shared \ 19 --without-debug --without-ada --enable-overwrite</userinput></screen>28 --without-debug --without-ada --enable-overwrite</userinput></screen> 20 29 21 30 <para>The meaning of the configure options:</para> … … 43 52 </sect2> 44 53 45 <sect2><title> </title><para> </para>54 <sect2><title> </title><para> </para> 46 55 <para>The details on this package are found in <xref linkend="contents-ncurses"/>.</para> 47 <para> </para></sect2>56 <para> </para></sect2> 48 57 49 58 </sect1> 50 -
chapter05/patch.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-patch"> 2 <title> InstallingPatch-&patch-version;</title>3 <?dbhtml filename="patch.html" dir="chapter05"?>7 <title>Patch-&patch-version;</title> 8 <?dbhtml filename="patch.html"?> 4 9 5 <screen>&buildtime; &patch-time-tools; 6 &diskspace; &patch-compsize-tools;</screen> 10 <indexterm zone="ch-tools-patch"> 11 <primary sortas="a-Patch">Patch</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-patch-down; 9 &aa-patch-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.1 SBU 17 &diskspace; 1.9 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> 14 23 <title>Installation of Patch</title> 15 24 16 <para>Prepare Patch for compilation ( setting the preprocessor flags to25 <para>Prepare Patch for compilation (the preprocessor flag 17 26 <emphasis>-D_GNU_SOURCE</emphasis> is only needed on the PowerPC platform, on 18 27 other architectures you can leave it out):</para> … … 30 39 </sect2> 31 40 32 <sect2><title> </title><para> </para>41 <sect2><title> </title><para> </para> 33 42 <para>The details on this package are found in <xref linkend="contents-patch"/>.</para> 34 <para> </para></sect2>43 <para> </para></sect2> 35 44 36 45 </sect1> 37 -
chapter05/perl.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-perl"> 2 <title> InstallingPerl-&perl-version;</title>3 <?dbhtml filename="perl.html" dir="chapter05"?>7 <title>Perl-&perl-version;</title> 8 <?dbhtml filename="perl.html"?> 4 9 5 <screen>&buildtime; &perl-time-tools; 6 &diskspace; &perl-compsize-tools;</screen> 10 <indexterm zone="ch-tools-perl"> 11 <primary sortas="a-Perl">Perl</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-perl-down; 9 &aa-perl-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.8 SBU 17 &diskspace; 74 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 16 25 <para>First adapt some hard-wired paths to the C library:</para> 17 26 18 <screen><userinput>patch -Np1 -i ../ &perl-libc-patch;</userinput></screen>27 <screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc-1.patch</userinput></screen> 19 28 20 29 <para>Perl insists on using the <command>arch</command> program to find out … … 24 33 chmod 755 /tools/bin/arch</userinput></screen> 25 34 26 <para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl '35 <para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl POSIX' 27 36 right, they are all letters):</para> 28 37 29 <screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl '</userinput></screen>38 <screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX'</userinput></screen> 30 39 31 40 <para>The meaning of the configure option:</para> 32 41 33 42 <itemizedlist> 34 <listitem><para><userinput>-Dstatic_ext='IO Fcntl '</userinput>: This tells35 Perl to build the minimum set of static extensions needed for running the36 Coreutils test suite in the next chapter.</para></listitem>43 <listitem><para><userinput>-Dstatic_ext='IO Fcntl POSIX'</userinput>: This tells 44 Perl to build the minimum set of static extensions needed for installing and 45 testing the Coreutils package in the next chapter.</para></listitem> 37 46 </itemizedlist> 38 47 … … 49 58 </sect2> 50 59 51 <sect2><title> </title><para> </para>60 <sect2><title> </title><para> </para> 52 61 <para>The details on this package are found in <xref linkend="contents-perl"/>.</para> 53 <para> </para></sect2>62 <para> </para></sect2> 54 63 55 64 </sect1> 56 -
chapter05/sed.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-sed"> 2 <title> InstallingSed-&sed-version;</title>3 <?dbhtml filename="sed.html" dir="chapter05"?>7 <title>Sed-&sed-version;</title> 8 <?dbhtml filename="sed.html"?> 4 9 5 <screen>&buildtime; &sed-time-tools; 6 &diskspace; &sed-compsize-tools;</screen> 10 <indexterm zone="ch-tools-sed"> 11 <primary sortas="a-Sed">Sed</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-sed-down; 9 &aa-sed-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 5.2 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 31 40 </sect2> 32 41 33 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 34 43 <para>The details on this package are found in <xref linkend="contents-sed"/>.</para> 35 <para> </para></sect2>44 <para> </para></sect2> 36 45 37 46 </sect1> 38 -
chapter05/tar.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-tar"> 2 <title> InstallingTar-&tar-version;</title>3 <?dbhtml filename="tar.html" dir="chapter05"?>7 <title>Tar-&tar-version;</title> 8 <?dbhtml filename="tar.html"?> 4 9 5 <screen>&buildtime; &tar-time-tools; 6 &diskspace; &tar-compsize-tools;</screen> 10 <indexterm zone="ch-tools-tar"> 11 <primary sortas="a-Tar">Tar</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-tar-down; 9 &aa-tar-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 10 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 31 40 </sect2> 32 41 33 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 34 43 <para>The details on this package are found in <xref linkend="contents-tar"/>.</para> 35 <para> </para></sect2>44 <para> </para></sect2> 36 45 37 46 </sect1> 38 -
chapter05/tcl.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-tcl" xreflabel="Tcl"> 2 <title>Installing Tcl-&tcl-version;</title> 3 <?dbhtml filename="tcl.html" dir="chapter05"?> 7 <title>Tcl-&tcl-version;</title> 8 <?dbhtml filename="tcl.html"?> 9 10 <indexterm zone="ch-tools-tcl"><primary sortas="a-Tcl">Tcl</primary></indexterm> 4 11 5 12 <para>The Tcl package contains the Tool Command Language.</para> 6 13 7 <screen>&buildtime; &tcl-time-tools;8 &diskspace; &tcl-compsize-tools;</screen>14 <screen>&buildtime; 0.9 SBU 15 &diskspace; 23 MB</screen> 9 16 10 &aa-tcl-down; 11 &aa-tcl-dep; 17 <para>Tcl installation depends on: Bash, Binutils, Coreutils, Diffutils, 18 GCC, Glibc, Grep, Make, Sed.</para> 12 19 13 <sect2><title> </title><para> </para></sect2> 20 14 21 15 22 <sect2> 16 23 <title>Installation of Tcl</title> 17 24 18 <para>This package and the next two are only installed to be able to runthe25 <para>This package and the next two are only installed to support running the 19 26 test suites for GCC and Binutils. Installing three packages just for testing 20 27 purposes may seem like overkill, but it is very reassuring, if not essential, 21 to know that our most important tools are working properly. Even if you are22 not running the test suites here in this chapter as per our recommendation,23 these packages are still required for runningthe test suites in the next28 to know that our most important tools are working properly. Even if the 29 the test suites are not run in this chapter (we recommend not running them), 30 these packages are still required to run the test suites in the next 24 31 chapter.</para> 25 32 … … 33 40 <screen><userinput>make</userinput></screen> 34 41 35 <para> (If you insist on testingthe results, then issue:42 <para>If you want to test the results, then issue: 36 43 <userinput>TZ=UTC make test</userinput>. However, the Tcl test suite is known 37 44 to experience failures under certain host conditions that are not fully … … 41 48 (GMT), but only for the duration of the test suite run. This ensures the clock 42 49 tests are exercised correctly. More information on the TZ environment variable 43 will be given later on in <xref linkend="chapter-bootscripts"/>. )</para>50 will be given later on in <xref linkend="chapter-bootscripts"/>.</para> 44 51 45 52 <para>Install the package:</para> … … 47 54 <screen><userinput>make install</userinput></screen> 48 55 49 <!-- HACK - Force some whitespace to appease tidy -->50 <literallayout></literallayout>51 56 52 57 <warning><para><emphasis>Do not remove</emphasis> the … … 54 59 will need its internal headers.</para></warning> 55 60 56 <!-- HACK - Force some whitespace to appease tidy -->57 <literallayout></literallayout>58 61 59 <para> Andmake a necessary symbolic link:</para>62 <para>Now make a necessary symbolic link:</para> 60 63 61 64 <screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen> … … 63 66 </sect2> 64 67 65 &aa-tcl-shortdesc; 66 &aa-tcl-desc; 68 69 <sect2 id="contents-tcl"><title>Contents of Tcl</title> 70 71 <para><emphasis>Installed programs</emphasis>: tclsh (link to tclsh8.4), 72 tclsh8.4</para> 73 74 <para><emphasis>Installed library</emphasis>: libtcl8.4.so</para> 75 76 </sect2> 77 78 79 <sect2><title>Short descriptions</title> 80 81 <indexterm zone="ch-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm> 82 <para id="tclsh8.4"><command>tclsh8.4</command> is the Tcl command shell.</para> 83 84 <indexterm zone="ch-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm> 85 <para id="libtcl8.4.so"><command>libtcl8.4.so</command> is the Tcl library.</para> 86 87 </sect2> 88 67 89 68 90 </sect1> 69 -
chapter05/texinfo.xml
r287ea55 r673b0d8 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 3 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 %general-entities; 5 ]> 1 6 <sect1 id="ch-tools-texinfo"> 2 <title> InstallingTexinfo-&texinfo-version;</title>3 <?dbhtml filename="texinfo.html" dir="chapter05"?>7 <title>Texinfo-&texinfo-version;</title> 8 <?dbhtml filename="texinfo.html"?> 4 9 5 <screen>&buildtime; &texinfo-time-tools; 6 &diskspace; &texinfo-compsize-tools;</screen> 10 <indexterm zone="ch-tools-texinfo"> 11 <primary sortas="a-Texinfo">Texinfo</primary> 12 <secondary>tools</secondary></indexterm> 7 13 8 &aa-texinfo-down; 9 &aa-texinfo-dep; 14 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/para[1])"/> 10 15 11 <sect2><title> </title><para> </para></sect2> 16 <screen>&buildtime; 0.2 SBU 17 &diskspace; 16 MB</screen> 18 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/para[2])"/> 20 12 21 13 22 <sect2> … … 31 40 </sect2> 32 41 33 <sect2><title> </title><para> </para>42 <sect2><title> </title><para> </para> 34 43 <para>The details on this package are found in <xref linkend="contents-texinfo"/>.</para> 35 <para> </para></sect2>44 <para> </para></sect2> 36 45 37 46 </sect1> 38
Note:
See TracChangeset
for help on using the changeset viewer.