Ignore:
Timestamp:
12/05/2008 08:46:02 PM (15 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
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.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, 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:
6f2cc22
Parents:
6e88633
Message:

Bring in DIY's next generation build method. Move GRUB to chapter 8.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8755 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/gcc-pass1.xml

    r6e88633 r4e82d47  
    4242
    4343  <sect2 role="installation">
    44     <title>Installation of GCC</title>
     44    <title>Installation of Cross GCC</title>
    4545
    4646    <para>GCC now requires the GMP and MPFR packages. As these packages may
     
    6161    <para>Prepare GCC for compilation:</para>
    6262
    63 <screen><userinput remap="configure">CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \
    64     --with-local-prefix=/tools --disable-nls --disable-shared --disable-libssp \
    65     --disable-multilib --enable-languages=c</userinput></screen>
     63<screen><userinput remap="configure">../gcc-&gcc-version;/configure \
     64    --target=$LFS_TGT --prefix=/tools \
     65    --disable-nls --disable-shared --disable-multilib \
     66    --disable-decimal-float --disable-threads \
     67    --disable-libmudflap --disable-libssp \
     68    --disable-libgomp --enable-languages=c</userinput></screen>
    6669
    6770    <variablelist>
    6871      <title>The meaning of the configure options:</title>
    69 
    70       <varlistentry>
    71         <term><envar>CC="gcc -B/usr/bin/"</envar></term>
    72         <listitem>
    73           <para>This forces <command>gcc</command> to prefer the linker from
    74           the host in <filename class="directory">/usr/bin</filename>. This
    75           is necessary on some hosts where the new <command>ld</command>
    76           built in the previous section is not compatible with the host's
    77           <command>gcc</command>.</para>
    78         </listitem>
    79       </varlistentry>
    80 
    81       <varlistentry>
    82         <term><parameter>--with-local-prefix=/tools</parameter></term>
    83         <listitem>
    84           <para>The purpose of this switch is to remove <filename
    85           class="directory">/usr/local/include</filename> from
    86           <command>gcc</command>'s include search path. This is not
    87           absolutely essential, however, it helps to minimize the
    88           influence of the host system.</para>
    89         </listitem>
    90       </varlistentry>
    9172
    9273      <varlistentry>
     
    10081
    10182      <varlistentry>
    102         <term><parameter>--disable-libssp</parameter></term>
     83        <term><parameter>--disable-decimal-float, --disable-threads, --disable-libmudflap, --disable-libssp, --disable-libgomp</parameter></term>
    10384        <listitem>
    104           <para>This switch prevents a conflict with older versions of
    105           glibc which can cause the build to fail.</para>
     85          <para>These switches disable support for the decimal floating point extension,
     86          threading, libmudflap, libssp and libgomp respectively. These features will fail
     87          to compile when building a cross-compiler and are not necessary for the task of
     88          cross-compiling the temporary libc.</para>
     89        </listitem>
     90      </varlistentry>
     91
     92      <varlistentry>
     93        <term><parameter>--disable-multilib</parameter></term>
     94        <listitem>
     95          <para>On x86_64, LFS does not yet support a multilib configuration.
     96          This switch is harmless for x86.</para>
    10697        </listitem>
    10798      </varlistentry>
     
    115106      </varlistentry>
    116107
    117       <varlistentry>
    118         <term><parameter>--disable-multilib</parameter></term>
    119         <listitem>
    120           <para>We currently only want to build support for 64-bit libraries.</para>
    121         </listitem>
    122       </varlistentry>
    123 
    124108    </variablelist>
    125109
    126     <para>The following command will compile GCC not once, but several times. It
    127     uses the programs compiled in a first round to compile itself a second time,
    128     and then again a third time. It then compares these second and third compiles
    129     to make sure it can reproduce itself flawlessly. This is called
    130     <quote>bootstrapping</quote>. Building GCC in this way ensures that it was
    131     compiled correctly and is now the default configuration for the released
    132     package. Continue with compiling by running:</para>
     110    <para>Compile GCC by running:</para>
    133111
    134112<screen><userinput remap="make">make</userinput></screen>
     
    147125    <filename>libgcc_eh.a</filename> file isn't created and installed. The
    148126    Glibc package depends on this library as it uses
    149     <parameter>-lgcc_eh</parameter> within its build system. We can satisfy
    150     that dependency by creating a symlink to <filename>libgcc.a</filename>,
     127    <parameter>-lgcc_eh</parameter> within its build system. This dependency
     128    can be satisfied by creating a symlink to <filename>libgcc.a</filename>,
    151129    since that file will end up containing the objects normally contained in
    152130    <filename>libgcc_eh.a</filename>.</para>
    153131
    154 <screen><userinput remap="install">ln -vs libgcc.a `gcc -print-libgcc-file-name | \
     132<screen><userinput remap="install">ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \
    155133    sed 's/libgcc/&amp;_eh/'`</userinput></screen>
    156 
    157     <para>As a finishing touch, create a symlink. Many programs and scripts
    158     run <command>cc</command> instead of <command>gcc</command>, which is
    159     used to keep programs generic and therefore usable on all kinds of UNIX
    160     systems where the GNU C compiler is not always installed. Running
    161     <command>cc</command> leaves the system administrator free to decide
    162     which C compiler to install:</para>
    163 
    164 <screen><userinput remap="install">ln -vs gcc /tools/bin/cc</userinput></screen>
    165134
    166135  </sect2>
Note: See TracChangeset for help on using the changeset viewer.