Changeset 1a76da0


Ignore:
Timestamp:
10/30/2022 11:30:10 PM (18 months ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
f8e4cf6
Parents:
07fd8bf8 (diff), decf315 (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:

Automatic merge of trunk into multilib

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • chapter05/binutils-pass1.xml

    r07fd8bf8 r1a76da0  
    9292        <listitem>
    9393          <para>This tells the configure script to prepare to install the
    94           binutils programs in the <filename
     94          Binutils programs in the <filename
    9595          class="directory">$LFS/tools</filename> directory.</para>
    9696        </listitem>
  • chapter05/gcc-pass1.xml

    r07fd8bf8 r1a76da0  
    5151
    5252    <note><para>There are frequent misunderstandings about this chapter.  The
    53     procedures are the same as every other chapter as explained earlier (<xref
    54     linkend='buildinstr'/>).  First extract the gcc tarball from the sources
    55     directory and then change to the directory created.  Only then should you
     53    procedures are the same as every other chapter, as explained earlier (<xref
     54    linkend='buildinstr'/>).  First, extract the gcc-&gcc-version; tarball from the sources
     55    directory, and then change to the directory created.  Only then should you
    5656    proceed with the instructions below.</para></note>
    5757
     
    143143        <term><parameter>--with-glibc-version=&glibc-version;</parameter></term>
    144144        <listitem>
    145           <para>This option specifies the version of glibc which will be
     145          <para>This option specifies the version of Glibc which will be
    146146          used on the target. It is not relevant to the libc of the host
    147           distro because everything compiled by pass1 gcc will run in the
     147          distro because everything compiled by pass1 GCC will run in the
    148148          chroot environment, which is isolated from libc of the host
    149149          distro.</para>
     
    188188        <listitem>
    189189          <para>This switch forces GCC to link its internal libraries
    190           statically. We need this because the shared libraries require glibc,
     190          statically. We need this because the shared libraries require Glibc,
    191191          which is not yet installed on the target system.</para>
    192192        </listitem>
     
    247247    does not exist, so the internal header that has just been installed is a
    248248    partial, self-contained file and does not include the extended features of
    249     the system header. This is adequate for building glibc, but the full
     249    the system header. This is adequate for building Glibc, but the full
    250250    internal header will be needed later.  Create a full version of the internal
    251251    header using a command that is identical to what the GCC build system does
  • chapter05/glibc.xml

    r07fd8bf8 r1a76da0  
    6262      <para>
    6363        The above command is correct.  The <command>ln</command> command has
    64         a few syntactic versions, so be sure to check
     64        several syntactic versions, so be sure to check
    6565        <command>info coreutils ln</command> and <filename>ln(1)</filename>
    66         before reporting what you may think is an error.
     66        before reporting what may appear to be an error.
    6767      </para>
    6868    </note>
    6969
    70     <para>Some of the Glibc programs use the non-FHS compliant
     70    <para>Some of the Glibc programs use the non-FHS-compliant
    7171    <filename class="directory">/var/db</filename> directory to store their
    7272    runtime data. Apply the following patch to make such programs store their
     
    140140        <listitem>
    141141          <para>This ensures that the library is installed in /usr/lib instead
    142           of the default /lib64 on 64 bit machines.</para>
     142          of the default /lib64 on 64-bit machines.</para>
    143143        </listitem>
    144144      </varlistentry>
     
    158158    <para>The missing or incompatible <command>msgfmt</command> program is
    159159    generally harmless. This <command>msgfmt</command> program is part of the
    160     Gettext package which the host distribution should provide.</para>
     160    Gettext package, which the host distribution should provide.</para>
    161161
    162162    <note><para>There have been reports that this package may fail when
    163     building as a "parallel make".  If this occurs, rerun the make command
    164     with a "-j1" option.</para></note>
     163    building as a "parallel make".  If that occurs, rerun the make command
     164    with the "-j1" option.</para></note>
    165165
    166166    <para>Compile the package:</para>
     
    173173    recommendations, you are building as
    174174    <systemitem class="username">root</systemitem>, the next command will
    175     install the newly built glibc to your host system, which most likely
    176     will render it unusable. So double check that the environment is
    177     correctly set, before running the following command.</para></warning>
     175    install the newly built Glibc to your host system, which will almost
     176    certainly render it unusable. So double-check that the environment is
     177    correctly set, and that you are not &root;, before running the following command.</para></warning>
    178178
    179179<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
     
    189189          installed. If it is not set, it defaults to the root (<filename
    190190          class="directory">/</filename>) directory. Here we specify that
    191           the package be installed in <filename class="directory">$LFS
    192           </filename>, which will become the root after <xref linkend=
     191          the package is installed in <filename class="directory">$LFS
     192          </filename>, which will become the root directory in <xref linkend=
    193193          "ch-tools-chroot"/>.</para>
    194194        </listitem>
     
    197197    </variablelist>
    198198
    199     <para>Fix hardcoded path to the executable loader in
     199    <para>Fix a hard coded path to the executable loader in the
    200200    <command>ldd</command> script:</para>
    201201
     
    218218      <filename>/lib/ld-linux.so.2</filename>.</para>
    219219
    220       <para>If the output is not shown as above or there was no output at all,
     220      <para>If the output is not as shown above, or there is no output at all,
    221221      then something is wrong. Investigate and retrace the steps to find out
    222222      where the problem is and correct it. This issue must be resolved before
    223       continuing on.</para>
     223      continuing.</para>
    224224
    225225      <para>Once all is well, clean up the test file:</para>
     
    229229    </caution>
    230230
    231     <note><para>Building packages in the next chapter will serve as an
     231    <note><para>Building the packages in the next chapter will serve as an
    232232    additional check that the toolchain has been built properly. If some
    233     package, especially binutils-pass2 or gcc-pass2, fails to build, it is
     233    package, especially Binutils-pass2 or GCC-pass2, fails to build, it is
    234234    an indication that something has gone wrong with the
    235     previous Binutils, GCC, or Glibc installations.</para></note>
     235    preceding Binutils, GCC, or Glibc installations.</para></note>
    236236
    237237    <para>Now that our cross-toolchain is complete, finalize the installation
    238     of the limits.h header. For doing so, run a utility provided by the GCC
     238    of the limits.h header. To do this, run a utility provided by the GCC
    239239    developers:</para>
    240240
  • chapter05/libstdc++.xml

    r07fd8bf8 r1a76da0  
    2929    (part of GCC is written in C++), but we had to defer its installation
    3030    when we built <xref linkend="ch-tools-gcc-pass1"/>
    31     because it depends on glibc, which was not yet available in the target
     31    because Libstdc++ depends on Glibc, which was not yet available in the target
    3232    directory.
    3333    </para>
     
    5454    </note>
    5555
    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>
    5757
    5858<screen><userinput remap="pre">mkdir -v build
    5959cd       build</userinput></screen>
    6060
    61     <para>Prepare libstdc++ for compilation:</para>
     61    <para>Prepare Libstdc++ for compilation:</para>
    6262
    6363<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../libstdc++-v3/configure           \
     
    8484        <term><parameter>--host=...</parameter></term>
    8585        <listitem>
    86           <para>Specifies that the cross compiler we have just built
     86          <para>Specifies that the cross-compiler we have just built
    8787          should be used instead of the one in
    8888          <filename>/usr/bin</filename>.</para>
     
    109109        <listitem>
    110110          <para>This specifies the installation directory for include files.
    111           Because libstdc++ is the standard C++ library for LFS, this
     111          Because Libstdc++ is the standard C++ library for LFS, this
    112112          directory should match the location where the C++ compiler
    113113          (<command>$LFS_TGT-g++</command>) would search for the
    114114          standard C++ include files. In a normal build, this information
    115           is automatically passed to the libstdc++ <command>configure</command>
     115          is automatically passed to the Libstdc++ <command>configure</command>
    116116          options from the top level directory. In our case, this information
    117117          must be explicitly given.
    118118          The C++ compiler will prepend the sysroot path
    119           <filename class="directory">$LFS</filename> (specified building
    120           GCC pass 1) to the include file search path, so it will actually
     119          <filename class="directory">$LFS</filename> (specified when building
     120          GCC-pass1) to the include file search path, so it will actually
    121121          search in
    122122          <filename class="directory">$LFS/tools/$LFS_TGT/include/c++/&gcc-version;</filename>.
    123123          The combination of the <parameter>DESTDIR</parameter>
    124124          variable (in the <command>make install</command> command below)
    125           and this switch ensures to install the headers there.</para>
     125          and this switch causes the headers to be installed there.</para>
    126126        </listitem>
    127127      </varlistentry>
     
    129129    </variablelist>
    130130
    131     <para>Compile libstdc++ by running:</para>
     131    <para>Compile Libstdc++ by running:</para>
    132132
    133133<screen><userinput remap="make">make</userinput></screen>
     
    138138
    139139    <para>Remove the libtool archive files because they are harmful for
    140     cross compilation:</para>
     140    cross-compilation:</para>
    141141
    142142<screen><userinput remap="install">rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la</userinput></screen>
  • part3intro/toolchaintechnotes.xml

    r07fd8bf8 r1a76da0  
    146146
    147147    <note>
    148       <para>All the packages involved with cross-compilation use an
     148      <para>All the cross-compiled packages in this book use an
    149149      autoconf-based building system.  The autoconf-based building system
    150150      accepts system types in the form cpu-vendor-kernel-os,
     
    258258    this is the only compiler available for building the C/C++ libraries
    259259    during stage 2. Of course, the compiler built by stage 2, cc-lfs,
    260     would be able to build those libraries, but (1) the build system of
    261     gcc does not know cc-lfs can run on pc, and (2) using cc-lfs on pc
    262     would create a risk of linking to the pc libraries, since cc-lfs is a native
    263     compiler. So we have to re-build libstdc++ later as a part of
    264     gcc stage 2.</para>
     260    would be able to build those libraries, but:</para>
     261
     262    <itemizedlist>
     263      <listitem>
     264        <para>
     265          Generally cc-lfs cannot run on pc (the host distro).  Despite the
     266          triplets of pc and lfs are compatible to each other, an executable
     267          for lfs will depend on glibc-&glibc-version; while the host distro
     268          may utilize a different libc implementation (for example, musl) or
     269          a previous release of glibc (for example, glibc-2.13).
     270        </para>
     271      </listitem>
     272      <listitem>
     273        <para>
     274          Even if cc-lfs happens to run on pc, using it on pc would create
     275          a risk of linking to the pc libraries, since cc-lfs is a native
     276          compiler.
     277        </para>
     278      </listitem>
     279    </itemizedlist>
     280
     281    <para>So we have to re-build libstdc++ later as a part of gcc stage 2.</para>
    265282
    266283    <para>In &ch-final; (or <quote>stage 3</quote>), all the packages needed for
Note: See TracChangeset for help on using the changeset viewer.