Changeset 79524a0
- Timestamp:
- 06/09/2020 11:10:16 PM (4 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, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, 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:
- ccff95b
- Parents:
- ee714d3
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/aboutsbus.xml
ree714d3 r79524a0 42 42 make" by either setting an environment variable or telling the 43 43 <command>make</command> program how many processors are available. For 44 instance, an Intel i5-6500 C OUcan support four simultaneous processes with:</para>44 instance, an Intel i5-6500 CPU can support four simultaneous processes with:</para> 45 45 46 46 <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen> -
chapter05/binutils-pass1.xml
ree714d3 r79524a0 64 64 the configuration, up to and including the first install. To achieve 65 65 this easily, wrap the commands in a <command>time</command> 66 command like this: <userinput>time { ./configure ... && ...66 command like this: <userinput>time { ./configure ... && make 67 67 && make install; }</userinput>.</para> 68 68 </note> 69 <!-- 70 <note><para>The approximate build SBU values and required disk space 71 in Chapter 5 does not include test suite data.</para></note> 72 --> 69 73 70 <para>Now prepare Binutils for compilation:</para> 74 71 … … 86 83 <listitem> 87 84 <para>This tells the configure script to prepare to install the 88 Binutils programs in the <filename85 binutils programs in the <filename 89 86 class="directory">$LFS/tools</filename> directory.</para> 90 87 </listitem> … … 98 95 </listitem> 99 96 </varlistentry> 100 <!-- 101 <varlistentry> 102 <term><parameter>- -with-lib-path=/tools/lib</parameter></term> 103 <listitem> 104 <para>This specifies which library path the linker should be 105 configured to use.</para> 106 </listitem> 107 </varlistentry> 108 --> 97 109 98 <varlistentry> 110 99 <term><envar>--target=$LFS_TGT</envar></term> … … 113 102 variable is slightly different than the value returned by the 114 103 <command>config.guess</command> script, this switch will tell the 115 <command>configure</command> script to adjust Binutil's build system104 <command>configure</command> script to adjust binutil's build system 116 105 for building a cross linker. </para> 117 106 </listitem> -
chapter05/gcc-pass1.xml
ree714d3 r79524a0 133 133 134 134 <varlistentry> 135 <term><parameter>--enable-initfini-array</parameter></term> 136 <listitem> 137 <para>This switch forces the use of some internal data structures 138 that are needed but cannot be detected when building a cross 139 compiler.</para> 140 </listitem> 141 </varlistentry> 142 143 <varlistentry> 135 144 <term><parameter>--disable-shared</parameter></term> 136 145 <listitem> 137 146 <para>This switch forces GCC to link its internal libraries 138 statically. We need this because the shared libraries require glibc, 139 which is not yet installed on the target system.</para> 147 statically. We need this because the shared libraries require glibc, 148 which is not yet installed on the target system.</para> 149 </listitem> 150 </varlistentry> 151 152 <varlistentry> 153 <term><parameter>--disable-multilib</parameter></term> 154 <listitem> 155 <para>On x86_64, LFS does not support a multilib configuration. 156 This switch is harmless for x86.</para> 140 157 </listitem> 141 158 </varlistentry> … … 143 160 <varlistentry> 144 161 <term><parameter>--disable-decimal-float, --disable-threads, 145 --disable-libatomic, --disable-libgomp, <!--- -disable-libmpx,-->162 --disable-libatomic, --disable-libgomp, 146 163 --disable-libquadmath, --disable-libssp, --disable-libvtv, 147 164 --disable-libstdcxx</parameter></term> 148 165 <listitem> 149 166 <para>These switches disable support for the decimal floating point 150 extension, threading, libatomic, libgomp, <!--libmpx, -->libquadmath, libssp,167 extension, threading, libatomic, libgomp, libquadmath, libssp, 151 168 libvtv, and the C++ standard library respectively. These features 152 169 will fail to compile when building a cross-compiler and are not 153 170 necessary for the task of cross-compiling the temporary libc.</para> 154 </listitem>155 </varlistentry>156 157 <varlistentry>158 <term><parameter>--disable-multilib</parameter></term>159 <listitem>160 <para>On x86_64, LFS does not yet support a multilib configuration.161 This switch is harmless for x86.</para>162 171 </listitem> 163 172 </varlistentry> -
chapter05/generalinstructions.xml
ree714d3 r79524a0 19 19 <para>Several of the packages are patched before compilation, but only when 20 20 the patch is needed to circumvent a problem. A patch is often needed in 21 both this and the next chapter, but sometimes in only one or the other.21 both this and the following chapters, but sometimes in only one location. 22 22 Therefore, do not be concerned if instructions for a downloaded patch seem 23 23 to be missing. Warning messages about <emphasis>offset</emphasis> or … … 94 94 <listitem> 95 95 <para>Using the <command>tar</command> program, extract the package 96 to be built. In Chapter 5, ensure you are the <emphasis>lfs</emphasis>97 user when extracting the package.</para>96 to be built. In Chapters 5 and 6, ensure you are 97 the <emphasis>lfs</emphasis> user when extracting the package.</para> 98 98 </listitem> 99 99 <listitem> -
chapter05/glibc.xml
ree714d3 r79524a0 212 212 </caution> 213 213 214 <note><para>Building packages in the next sectionswill serve as an214 <note><para>Building packages in the next chapter will serve as an 215 215 additional check that the toolchain has been built properly. If some 216 216 package, especially binutils-pass2 or gcc-pass2, fails to build, it is … … 219 219 220 220 <para>Now that our cross-toolchain is complete, finalize the installation 221 of the limits.h header. For doing so, run a nutility provided by the GCC221 of the limits.h header. For doing so, run a utility provided by the GCC 222 222 developers:</para> 223 223 -
chapter05/libstdc++.xml
ree714d3 r79524a0 54 54 </note> 55 55 56 <para>Create a separate build directory for Libstdc++ and enter it:</para>56 <para>Create a separate build directory for libstdc++ and enter it:</para> 57 57 58 58 <screen><userinput remap="pre">mkdir -v build 59 59 cd build</userinput></screen> 60 60 61 <para>Prepare Libstdc++ for compilation:</para>61 <para>Prepare libstdc++ for compilation:</para> 62 62 63 63 <screen><userinput remap="configure">../libstdc++-v3/configure \ … … 76 76 <term><parameter>--host=...</parameter></term> 77 77 <listitem> 78 <para> Indicates touse the cross compiler we have just built78 <para>Specifies the use the cross compiler we have just built 79 79 instead of the one in <filename>/usr/bin</filename>.</para> 80 80 </listitem> … … 92 92 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term> 93 93 <listitem> 94 <para>This is the location where the standard include files are95 s earched by the C++ compiler. In a normal build, this information96 is automatically passed to the Libstdc++ <command>configure</command>94 <para>This is the location where the C++ compiler should search for the 95 standard include files. In a normal build, this information 96 is automatically passed to the libstdc++ <command>configure</command> 97 97 options from the top level directory. In our case, this information 98 98 must be explicitly given.</para> -
chapter05/toolchaintechnotes.xml
ree714d3 r79524a0 17 17 to at any time during the process.</para> 18 18 19 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to 20 produce a temporary area that contains a known-good set of tools that can be 21 isolated from the host system. By using <command>chroot</command>, the 22 commands in the remaining chapters will be contained within that environment, 23 ensuring a clean, trouble-free build of the target LFS system. The build 24 process has been designed to minimize the risks for new readers and to provide 25 the most educational value at the same time.</para> 19 <para>The overall goal of this chapter and <xref 20 linkend="chapter-temporary-tools"/> is to produce a temporary area that 21 contains a known-good set of tools that can be isolated from the host system. 22 By using <command>chroot</command>, the commands in the remaining chapters 23 will be contained within that environment, ensuring a clean, trouble-free 24 build of the target LFS system. The build process has been designed to 25 minimize the risks for new readers and to provide the most educational value 26 at the same time.</para> 26 27 27 28 <para>The build process is based on the process of … … 144 145 remained. A simple way to determine your machine triplet is to run 145 146 the <command>config.guess</command> 146 script that comes with the source for many packages. Unpack the Binutils147 script that comes with the source for many packages. Unpack the binutils 147 148 sources and run the script: <userinput>./config.guess</userinput> and note 148 149 the output. For example, for a 32-bit Intel processor the … … 152 153 <para>Also be aware of the name of the platform's dynamic linker, often 153 154 referred to as the dynamic loader (not to be confused with the standard 154 linker <command>ld</command> that is part of Binutils). The dynamic linker155 linker <command>ld</command> that is part of binutils). The dynamic linker 155 156 provided by Glibc finds and loads the shared libraries needed by a 156 157 program, prepares the program to run, and then runs it. The name of the … … 169 170 is slightly adjusted by changing the "vendor" field in the 170 171 <envar>LFS_TGT</envar> variable. We also use the 171 <parameter>--with-sysroot</parameter> when building the cross linker and172 cross compiler ,to tell them where to find the needed host files. This173 ensures none of the other programs built in <xref172 <parameter>--with-sysroot</parameter> option when building the cross linker and 173 cross compiler to tell them where to find the needed host files. This 174 ensures that none of the other programs built in <xref 174 175 linkend="chapter-temporary-tools"/> can link to libraries on the build 175 176 machine. Only two stages are mandatory, and one more for tests:</para> … … 216 217 library to be fully functional! Furthermore, the standard library for 217 218 C++ (libstdc++) also needs being linked to glibc. The solution 218 to this chicken and egg problem is to first build a degraded cc1 +libgcc,219 to this chicken and egg problem is to first build a degraded cc1 based libgcc, 219 220 lacking some fuctionalities such as threads and exception handling, then 220 221 build glibc using this degraded compiler (glibc itself is not … … 226 227 this is the only compiler available for building the C/C++ libraries 227 228 during stage 2! Of course, the compiler built during stage 2, cc-lfs, 228 would be able to build those libraries, but ( i) the build system of229 gcc does not know that it is usable on pc, and ( ii) using it on pc229 would be able to build those libraries, but (1) the build system of 230 gcc does not know that it is usable on pc, and (2) using it on pc 230 231 would be at risk of linking to the pc libraries, since cc-lfs is a native 231 232 compiler. So we have to build libstdc++ later, in chroot.</para> … … 307 308 and generally does not rely on toolchain defaults.</para> 308 309 309 <para>As said above, the standard C++ library is compiled next, followed 310 by all the programs that need themselves to be built. The install step 311 uses the <envar>DESTDIR</envar> variable to have the programs land into 312 the LFS filesystem.</para> 313 314 <para>Then the native lfs compiler is built. First Binutils Pass 2, with 315 the same <envar>DESTDIR</envar> install as the other programs, then the 316 second pass of GCC, omitting libstdc++ and other non-important libraries. 317 Due to some weird logic in GCC's configure script, 318 <envar>CC_FOR_TARGET</envar> ends up as <command>cc</command> when host 319 is the same as target, but is different from build. This is why 310 <para>As said above, the standard C++ library is compiled next, followed in 311 Chapter 6 by all the programs that need themselves to be built. The install 312 step of libstdc++ uses the <envar>DESTDIR</envar> variable to have the 313 programs land into the LFS filesystem.</para> 314 315 <para>In Chapter 7 the native lfs compiler is built. First binutils-pass2, 316 with the same <envar>DESTDIR</envar> install as the other programs is 317 built, and then the second pass of GCC is constructed, omitting libstdc++ 318 and other non-important libraries. Due to some weird logic in GCC's 319 configure script, <envar>CC_FOR_TARGET</envar> ends up as 320 <command>cc</command> when the host is the same as the target, but is 321 different from the build system. This is why 320 322 <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into 321 323 the configure options.</para> -
stylesheets/lfs-xsl/lfs.css
ree714d3 r79524a0 343 343 } 344 344 345 .table table {345 .table table, .informaltable { 346 346 margin-left: auto; 347 347 margin-right: auto;
Note:
See TracChangeset
for help on using the changeset viewer.