Changeset 6dfcfecc for chapter08/gcc.xml


Ignore:
Timestamp:
03/31/2021 10:41:39 AM (3 years ago)
Author:
Xℹ Ruoyao <xry111@…>
Branches:
ml-11.0, multilib
Children:
7610848
Parents:
811b5a39
git-author:
Thomas Trepl <thomas@…> (06/29/2020 07:55:01 AM)
git-committer:
Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:39 AM)
Message:

Update to new lfs structure

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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • chapter08/gcc.xml

    r811b5a39 r6dfcfecc  
    3232
    3333      <seglistitem>
    34         <seg>&gcc-ch6-sbu;</seg>
    35         <seg>&gcc-ch6-du;</seg>
     34        <seg>&gcc-fin-sbu;</seg>
     35        <seg>&gcc-fin-du;</seg>
    3636      </seglistitem>
    3737    </segmentedlist>
     
    4242    <title>Installation of GCC</title>
    4343
    44     <para arch="default">If building on x86_64, change the default directory
    45     name for 64-bit libraries to <quote>lib</quote>:</para>
     44    <para arch="default">If building on x86_64, change the default directory name for 64-bit
     45    libraries to <quote>lib</quote>:</para>
    4646
    4747<screen arch="default"><userinput remap="pre">case $(uname -m) in
     
    5555    libraries to <quote>lib</quote>:</para>
    5656
    57 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/'  \
    58     -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \
     57<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \
     58    -e '/m32=/s/m32=.*/m32=..\&lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \
    5959    -i.orig gcc/config/i386/t-linux64</userinput></screen>
    6060
     
    6666    <para>Prepare GCC for compilation:</para>
    6767
    68 <screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput>
    69 <userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--enable-multilib --with-multilib-list=m64"</userinput>
    70 <userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput>
    71 <userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput>
    72 <userinput remap="configure">SED=sed                               \
    73 ../configure --prefix=/usr            \
     68<screen arch="default"><userinput remap="configure">../configure --prefix=/usr            \
     69             LD=ld                    \
    7470             --enable-languages=c,c++ \
     71             --disable-multilib       \
    7572             --disable-bootstrap      \
    76              --with-system-zlib       \
    77              $mloptions</userinput></screen>
    78 
    79     <para>Note that for other languages, there are some prerequisites that
     73             --with-system-zlib</userinput></screen>
     74<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure"
     75  arch="ml_32" >mlist=m64,m32</userinput><userinput remap="configure"
     76  arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure"
     77  arch="ml_all">mlist=m64,m32,mx32</userinput>
     78<userinput remap="configure">../configure --prefix=/usr               \
     79             LD=ld                       \
     80             --enable-languages=c,c++    \
     81             --enable-multilib           \
     82             --with-multilib-list=$mlist \
     83             --disable-bootstrap         \
     84             --with-system-zlib</userinput></screen>
     85
     86    <para>Note that for other programming languages there are some prerequisites that
    8087    are not yet available. See the
    81     <ulink url="&blfs-book;general/gcc.html">BLFS Book</ulink>
     88    <ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink>
    8289    for instructions on how to build all of GCC's supported languages.</para>
    8390
     
    8693
    8794      <varlistentry>
    88         <term><envar>SED=sed</envar></term>
    89         <listitem>
    90           <para>Setting this environment variable prevents a hard-coded
    91           path to /tools/bin/sed.</para>
    92         </listitem>
    93       </varlistentry>
    94       <!--
    95       <varlistentry>
    96         <term><parameter>- -disable-libmpx</parameter></term>
    97         <listitem>
    98           <para>This switch tells GCC to not build mpx (Memory Protection
    99           Extensions) that can cause problems on some processors. It has
    100           been removed from the next version of gcc.</para>
    101         </listitem>
    102       </varlistentry>
    103       -->
     95        <term><parameter>LD=ld</parameter></term>
     96        <listitem>
     97          <para>This parameter makes the configure script use the ld installed
     98          by the binutils built earlier in this chapter, rather than
     99          the cross-built version which would otherwise be used.</para>
     100        </listitem>
     101      </varlistentry>
     102
    104103      <varlistentry>
    105104        <term><parameter>--with-system-zlib</parameter></term>
    106105        <listitem>
    107106          <para>This switch tells GCC to link to the system installed copy of
    108           the Zlib library, rather than its own internal copy.</para>
     107          the zlib library, rather than its own internal copy.</para>
    109108        </listitem>
    110109      </varlistentry>
     
    120119    </important>
    121120
    122    <para>One set of tests in the GCC test suite is known to exhaust the stack,
    123    so increase the stack size prior to running the tests:</para>
     121   <para>One set of tests in the GCC test suite is known to exhaust the default
     122   stack, so increase the stack size prior to running the tests:</para>
    124123
    125124<screen><userinput remap="test">ulimit -s 32768</userinput></screen>
     
    144143    apparently related to the en_HK locale.</para>
    145144
     145<!-- don't fail anymore after the move of iana-etc and /etc/hosts
    146146    <para>Two tests named lookup.cc and reverse.cc in experimental/net
    147147    are known to fail in LFS chroot environment because they require
    148148    /etc/hosts and iana-etc.</para>
    149 
     149-->
    150150    <para>A few unexpected failures cannot always be avoided. The GCC developers
    151151    are usually aware of these issues, but have not resolved them yet.
     
    173173
    174174<screen><userinput remap="install">chown -v -R root:root \
    175     /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include{,-fixed}</userinput></screen>
     175    /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen>
    176176
    177177    <para>Create a symlink required by the <ulink
     
    180180
    181181<screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen>
    182 
     182  <!-- already done earlier
    183183    <para>Many packages use the name <command>cc</command> to call the C
    184184    compiler. To satisfy those packages, create a symlink:</para>
    185185
    186186<screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
    187 
     187  -->
    188188    <para>Add a compatibility symlink to enable building programs with
    189189    Link Time Optimization (LTO):</para>
     
    195195    <para>Now that our final toolchain is in place, it is important to again ensure
    196196    that compiling and linking will work as expected. We do this by performing
    197     the same sanity checks as we did earlier in the chapter:</para>
     197    some sanity checks:</para>
    198198
    199199    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     
    225225/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
    226226
    227   <para>Depending on your machine architecture, the above may differ slightly,
    228   the difference usually being the name of the directory
     227  <para>Depending on your machine architecture, the above may differ slightly.
     228  The difference will be the name of the directory
    229229  after <filename class="directory">/usr/lib/gcc</filename>. The important
    230230  thing to look for here is that <command>gcc</command> has found all three
     
    248248 /usr/include</computeroutput></screen>
    249249
    250    <para>Again, note that the directory named after your target triplet may be
    251    different than the above, depending on your architecture.</para>
    252 
    253 <!--  This appears to be obsolete
    254 
    255     <note><para>As of version 4.3.0, GCC now unconditionally installs the
    256     <filename>limits.h</filename> file into the private
    257     <filename class="directory">include-fixed</filename> directory, and that
    258     directory is required to be in place.</para></note>
    259 -->
     250   <para>Again, the directory named after your target triplet may be
     251   different than the above, depending on your system architecture.</para>
    260252
    261253    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     
    280272SEARCH_DIR("/usr/lib");</computeroutput></screen>
    281273
    282    <para arch="default">A 32-bit system may see a few different directories.
    283    For example, here is the output from an i686 machine:</para>
    284 
     274   <para arch="default">A 32-bit system may see a few different directories. For example, here
     275   is the output from an i686 machine:</para>
     276
     277<!-- not using entities here as the dir names has nothing to do with multilib -->
    285278<screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
    286279SEARCH_DIR("/usr/local/lib32")
     
    339332
    340333<screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib
    341 mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
     334mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
    342335
    343336  </sect2>
Note: See TracChangeset for help on using the changeset viewer.