Ignore:
Timestamp:
05/03/2020 09:02:51 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
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:
a715dec
Parents:
9d719e2
Message:

Make the new book

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/binutils-pass2.xml

    r9d719e2 refcb393  
    5151    <para>Prepare Binutils for compilation:</para>
    5252
    53 <screen><userinput remap="configure">CC=$LFS_TGT-gcc                \
    54 AR=$LFS_TGT-ar                 \
    55 RANLIB=$LFS_TGT-ranlib         \
    56 ../configure                   \
    57     --prefix=/tools            \
     53<screen><userinput remap="configure">../configure                   \
     54    --prefix=/usr              \
     55    --build=$(../config.guess) \
     56    --host=$LFS_TGT            \
    5857    --disable-nls              \
    59     --disable-werror           \
    60     --with-lib-path=/tools/lib \
    61     --with-sysroot</userinput></screen>
     58    --enable-shared            \
     59    --disable-werror</userinput></screen>
    6260
    6361    <variablelist>
     
    6563
    6664      <varlistentry>
    67         <term><parameter>CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</parameter></term>
     65        <term><parameter>--host=$LFS_TGT</parameter></term>
    6866        <listitem>
    69           <para>Because this is really a native build of Binutils, setting these
    70           variables ensures that the build system uses the cross-compiler and
    71           associated tools instead of the ones on the host system.</para>
    72         </listitem>
    73       </varlistentry>
    74 
    75       <varlistentry>
    76         <term><parameter>--with-lib-path=/tools/lib</parameter></term>
    77         <listitem>
    78           <para>This tells the configure script to specify the library
    79           search path during the compilation of Binutils, resulting in
    80           <filename class="directory">/tools/lib</filename> being passed
    81           to the linker. This prevents the linker from searching through
    82           library directories on the host.</para>
    83         </listitem>
    84       </varlistentry>
    85 
    86       <varlistentry>
    87         <term><parameter>--with-sysroot</parameter></term>
    88         <listitem>
    89           <para>This defines a default (non-existent) sysroot directory
    90           <filename class="directory">/tools/$LFS_TGT/sys-root</filename>.
    91           It is useful when looking for shared objects which are required by
    92           other shared objects explicitly included on the linker's command
    93           line. Those objects are searched into the directories listed in
    94           <filename>&lt;sysroot&gt;/etc/ld.so.conf</filename>, and failing
    95           that, into the linker search path, which is right. If this switch
    96           is not given, <filename>/etc/ld.so.conf</filename> on the host
    97           is used, that is, programs may be linked to libraries on
    98           the host, which we want to avoid.</para>
     67          <para>This tells the configure script that we want to build
     68          this pass of binutils for the $LFS_TGT machine, using our just
     69          built cross-compiler.  This prevents the linker from searching
     70          through library directories on the host.</para>
    9971        </listitem>
    10072      </varlistentry>
     
    10880    <para>Install the package:</para>
    10981
    110 <screen><userinput remap="install">make install</userinput></screen>
    111 
    112     <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
    113     the next chapter:</para>
    114 
    115 <screen><userinput remap="adjust">make -C ld clean
    116 make -C ld LIB_PATH=/usr/lib:/lib
    117 cp -v ld/ld-new /tools/bin</userinput></screen>
    118 
    119     <variablelist>
    120       <title>The meaning of the make parameters:</title>
    121 
    122       <varlistentry>
    123         <term><parameter>-C ld clean</parameter></term>
    124         <listitem>
    125           <para>This tells the make program to remove all compiled
    126           files in the <filename class="directory">ld</filename>
    127           subdirectory.</para>
    128         </listitem>
    129       </varlistentry>
    130 
    131       <varlistentry>
    132         <term><parameter>-C ld LIB_PATH=/usr/lib:/lib</parameter></term>
    133         <listitem>
    134           <para>This option rebuilds everything in the <filename
    135           class="directory">ld</filename> subdirectory. Specifying the
    136           <envar>LIB_PATH</envar> Makefile variable on the command line
    137           allows us to override the default value of the temporary tools
    138           and point it to the proper final path. The value of this variable
    139           specifies the linker's default library search path. This
    140           preparation is used in the next chapter.</para>
    141         </listitem>
    142       </varlistentry>
    143 
    144     </variablelist>
     82<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    14583
    14684  </sect2>
Note: See TracChangeset for help on using the changeset viewer.