Ignore:
Timestamp:
09/20/2021 07:37:34 AM (3 years ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
60870bc
Parents:
e680022 (diff), 7e62bbc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge upstream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • part3intro/toolchaintechnotes.xml

    re680022 r716db1f  
    3939
    4040    <para>Cross-compilation involves some concepts that deserve a section on
    41     their own. Although this section may be omitted in a first reading, it
    42     is strongly suggested to come back to it later in order to get a full
    43     grasp of the build process.</para>
     41    their own. Although this section may be omitted in a first reading,
     42    coming back to it later will be beneficial to your full understanding of
     43    the process.</para>
    4444
    4545    <para>Let us first define some terms used in this context:</para>
     
    6868    <para>As an example, let us imagine the following scenario (sometimes
    6969    referred to as <quote>Canadian Cross</quote>): we may have a
    70     compiler on a slow machine only, let's call the machine A, and the compiler
     70    compiler on a slow machine only, let's call it machine A, and the compiler
    7171    ccA. We may have also a fast machine (B), but with no compiler, and we may
    7272    want to produce code for another slow machine (C). To build a
     
    142142      reader may wonder why a <quote>triplet</quote> refers to a four component
    143143      name. The reason is history: initially, three component names were enough
    144       to designate unambiguously a machine, but with new machines and systems
     144      to designate a machine unambiguously, but with new machines and systems
    145145      appearing, that proved insufficient. The word <quote>triplet</quote>
    146146      remained. A simple way to determine your machine triplet is to run
     
    157157      provided by Glibc finds and loads the shared libraries needed by a
    158158      program, prepares the program to run, and then runs it. The name of the
    159       dynamic linker for a 32-bit Intel machine will be <filename
    160       class="libraryfile">ld-linux.so.2</filename> (<filename
    161       class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A
     159      dynamic linker for a 32-bit Intel machine is <filename
     160      class="libraryfile">ld-linux.so.2</filename> and is<filename
     161      class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems. A
    162162      sure-fire way to determine the name of the dynamic linker is to inspect a
    163163      random binary from the host system by running: <userinput>readelf -l
     
    168168    </note>
    169169
    170     <para>In order to fake a cross compilation, the name of the host triplet
     170    <para>In order to fake a cross compilation in LFS, the name of the host triplet
    171171    is slightly adjusted by changing the &quot;vendor&quot; field in the
    172172    <envar>LFS_TGT</envar> variable. We also use the
     
    212212    just a compiler, but also defines a standard library. In this book, the
    213213    GNU C library, named glibc, is used. This library must
    214     be compiled for the lfs machine, that is, using the cross compiler cc1. 
     214    be compiled for the lfs machine, that is, using the cross compiler cc1.
    215215    But the compiler itself uses an internal library implementing complex
    216216    instructions not available in the assembler instruction set. This
     
    296296    parameter passed to its configure script; e.g. in our case, the compiler
    297297    will be <command>$LFS_TGT-gcc</command>. The binary tools and kernel
    298     headers can be a bit more complicated. Therefore, take no risks and use
     298    headers can be a bit more complicated. Therefore, we take no risks and use
    299299    the available configure switches to enforce the correct selections. After
    300300    the run of <command>configure</command>, check the contents of the
     
    330330    libstdc++. Then temporary installations of programs needed for the proper
    331331    operation of the toolchain are performed. From this point onwards, the
    332     core toolchain is self-contained and self-hosted.  In
     332    core toolchain is self-contained and self-hosted. In
    333333    <xref linkend="chapter-building-system"/>, final versions of all the
    334334    packages needed for a fully functional system are built, tested and
Note: See TracChangeset for help on using the changeset viewer.