Changeset 7f1fcd8 for chapter05/toolchaintechnotes.xml
- Timestamp:
- 10/24/2003 05:28:42 PM (21 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, 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_0, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 323ef74
- Parents:
- 494f01f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/toolchaintechnotes.xml
r494f01f r7f1fcd8 8 8 an actual build. Feel free to refer back here at any time.</para> 9 9 10 <para>The overall goal of Chapter 5 is to provide a sane, temporary environment 11 that we can chroot into, and from which we can produce a clean, trouble-free 12 build of the target LFS system in Chapter 6. Along the way, we attempt to 13 divorce ourselves from the host system as much as possible, and in so doing 14 build a self-contained and self-hosted toolchain. It should be noted that the 10 <para>The overall goal of <xref linkend="chapter05"/> is to provide a sane, 11 temporary environment that we can chroot into, and from which we can produce a 12 clean, trouble-free build of the target LFS system in 13 <xref linkend="chapter06"/>. Along the way, we attempt to divorce ourselves 14 from the host system as much as possible, and in so doing build a 15 self-contained and self-hosted toolchain. It should be noted that the 15 16 build process has been designed in such a way so as to minimize the risks for 16 17 new readers and provide maximum educational value at the same time. In other … … 45 46 </important> 46 47 47 <para>Some key technical points of how the Chapter 5 build method works:</para> 48 <para>Some key technical points of how the <xref linkend="chapter05"/> build 49 method works:</para> 48 50 49 51 <itemizedlist> … … 129 131 <userinput>'readelf -l <name of binary> | grep interpreter'</userinput>. 130 132 By amending <userinput>gcc</userinput>'s specs file, we are ensuring that every 131 program compiled from here through the end of Chapter 5 will use our new 132 dynamic linker in <filename class="directory">/tools/lib</filename>.</para> 133 program compiled from here through the end of <xref linkend="chapter05"/> will 134 use our new dynamic linker in 135 <filename class="directory">/tools/lib</filename>.</para> 133 136 134 137 <para>The need to use the new dynamic linker is also the reason why we apply the … … 142 145 <userinput>ld</userinput>'s library search path. From this point onwards, the 143 146 core toolchain is self-contained and self-hosted. The remainder of the 144 Chapter 5packages all build against the new Glibc in147 <xref linkend="chapter05"/> packages all build against the new Glibc in 145 148 <filename class="directory">/tools</filename> and all is well.</para> 146 149 147 <para>Upon entering the chroot environment in Chapter 6, the first major package 148 we install is Glibc, due to its self-sufficient nature that we mentioned above. 149 Once this Glibc is installed into <filename class="directory">/usr</filename>, 150 we perform a quick changeover of the toolchain defaults, then proceed for real 151 in building the rest of the target Chapter 6 LFS system.</para> 150 <para>Upon entering the chroot environment in <xref linkend="chapter06"/>, the 151 first major package we install is Glibc, due to its self-sufficient nature that 152 we mentioned above. Once this Glibc is installed into 153 <filename class="directory">/usr</filename>, we perform a quick changeover of 154 the toolchain defaults, then proceed for real in building the rest of the 155 target <xref linkend="chapter06"/> LFS system.</para> 152 156 153 157 <sect2> … … 181 185 make use of the improved function.</para> 182 186 183 <para>Why do we statically link the first two packages in Chapter 5? The reasons 184 are threefold: historical, educational and technical. Historical because earlier 185 versions of LFS statically linked every program in Chapter 5. Educational 186 because knowing the difference is useful. Technical because we gain an element 187 of independence from the host in doing so, i.e. those programs can be used 187 <para>If dynamic linking has several advantages, why then do we statically link 188 the first two packages in this chapter? The reasonsare threefold: historical, 189 educational, and technical. Historical, because earlier versions of LFS 190 statically linked every program in this chapter. Educational, because knowing 191 the difference is useful. Technical, because we gain an element of independence 192 from the host in doing so, meaning that those programs can be used 188 193 independently of the host system. However, it's worth noting that an overall 189 successful LFS build can still be achieved when the first two packages are built190 dynamically.</para>194 successful LFS build can still be achieved when the first two packages are 195 built dynamically.</para> 191 196 192 197 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.