Changeset 37e35d2 for chapter06/introduction.xml
- Timestamp:
- 06/29/2020 07:55:01 AM (4 years ago)
- Branches:
- multilib-10.1
- Children:
- c4804e8
- Parents:
- d4fdde6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/introduction.xml
rd4fdde6 r37e35d2 6 6 ]> 7 7 8 <sect1 id="ch- system-introduction">8 <sect1 id="ch-tools-introduction-cross"> 9 9 <?dbhtml filename="introduction.html"?> 10 10 11 11 <title>Introduction</title> 12 12 13 <para>In this chapter, we enter the building site and start constructing the 14 LFS system in earnest. That is, we chroot into the temporary mini Linux system, 15 make a few final preparations, and then begin installing the packages.</para> 13 <para>This chapter shows how to cross-compile basic utilities using 14 the just built cross-toolchain. Those utilities are installed into 15 their final location, but cannot be used yet. Basic tasks still rely on 16 the host's tools. Nevertheless, the installed libraries are used when 17 linking.</para> 16 18 17 <para>The installation of this software is straightforward. Although in many 18 cases the installation instructions could be made shorter and more generic, 19 we have opted to provide the full instructions for every package to minimize 20 the possibilities for mistakes. The key to learning what makes a Linux system 21 work is to know what each package is used for and why you (or the system) 22 may need it.</para> 19 <para>Using the utilities will be possible in next chapter after entering 20 the <quote>chroot</quote> environment. But all the packages built in the 21 present chapter need to be built before we do that. Therefore we cannot be 22 independent of the host system yet.</para> 23 23 24 <para>We do not recommend using optimizations. They can make 25 a program run slightly faster, but they may also cause compilation 26 difficulties and problems when running the program. If a package refuses to 27 compile when using optimization, try to compile it without optimization and 28 see if that fixes the problem. Even if the package does compile when using 29 optimization, there is the risk it may have been compiled incorrectly because 30 of the complex interactions between the code and build tools. Also note that 31 the <option>-march</option> and <option>-mtune</option> options using values 32 not specified in the book have not been tested. This may cause problems with 33 the toolchain packages (Binutils, GCC and Glibc). The small potential gains 34 achieved in using compiler optimizations are often outweighed by the risks. 35 First-time builders of LFS are encouraged to build without custom 36 optimizations. The subsequent system will still run very fast and be stable 37 at the same time.</para> 38 39 <para>The order that packages are installed in this chapter needs to be 40 strictly followed to ensure that no program accidentally acquires a path 41 referring to <filename class="directory">/tools</filename> hard-wired into 42 it. For the same reason, do not compile separate packages in parallel. 43 Compiling in parallel may save time (especially on dual-CPU machines), but it 44 could result in a program containing a hard-wired path to <filename 45 class="directory">/tools</filename>, which will cause the program to stop 46 working when that directory is removed.</para> 47 48 <para>Before the installation instructions, each installation page provides 49 information about the package, including a concise description of what it 50 contains, approximately how long it will take to build, and how much disk 51 space is required during this building process. Following the installation 52 instructions, there is a list of programs and libraries (along with brief 53 descriptions of these) that the package installs.</para> 54 55 <note><para>The SBU values and required disk space includes 56 test suite data for all applicable packages in Chapter 6.</para></note> 57 58 <sect2> 59 <title>About libraries</title> 60 61 <para>In general, the LFS editors discourage building and installing static 62 libraries. The original purpose for most static libraries has been made 63 obsolete in a modern Linux system. In addition linking a static library 64 into a program can be detrimental. If an update to the library is needed 65 to remove a security problem, all programs that use the static library will 66 need to be relinked to the new library. Since the use of static libraries 67 is not always obvious, the relevant programs (and the procedures needed to 68 do the linking) may not even be known.</para> 69 70 <para>In the procedures in Chapter 6, we remove or disable installation of 71 most static libraries. Usually this is done by passing a 72 <option>--disable-static</option> option to <command>configure</command>. 73 In other cases, alternate means are needed. In a few cases, especially 74 glibc and gcc, the use of static libraries remains essential to the general 75 package building process. </para> 76 77 <para>For a more complete discussion of libraries, see the discussion 78 <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> 79 Libraries: Static or shared?</ulink> in the BLFS book.</para> 80 81 </sect2> 24 <para>Once again, let us recall that improper setting of <envar>LFS</envar> 25 together with building as root, may render your computer unusable. 26 This whole chapter must be done as user <systemitem 27 class="username">lfs</systemitem>, with the enviroment as described in 28 <xref linkend="ch-preps-settingenviron"/>.</para> 82 29 83 30 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.