Ignore:
Timestamp:
04/01/2019 05:00:45 PM (5 years ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib-10.1
Children:
7d9f881
Parents:
1fa2099
Message:

First apply of multilib-patch of April 1st, 2019

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/gcc-pass1.xml

    r1fa2099 r8eb3fe4  
    4444    <title>Installation of Cross GCC</title>
    4545
    46     <para>GCC now requires the GMP, MPFR and MPC packages. As these packages may
    47     not be included in your host distribution, they will be built with
    48     GCC.  Unpack each package into the GCC source directory and rename the
    49     resulting directories so the GCC build procedures will automatically
    50     use them:</para>
     46    <para arch="default">GCC now requires the GMP, MPFR, and MPC packages. As
     47    these packages may not be included in your host distribution, they will be
     48    built with GCC.  Unpack each package into the GCC source directory and
     49    rename the resulting directories so the GCC build procedures will
     50    automatically use them:</para>
     51
     52    <para arch="multilib">GCC now requires the GMP, ISL, MPFR, and MPC packages.
     53    As these packages may not be included in your host distribution, they will
     54    be built with GCC.  Unpack each package into the GCC source directory and
     55    rename the resulting directories so the GCC build procedures will
     56    automatically use them:</para>
    5157
    5258    <note><para>There are frequent misunderstandings about this chapter.  The
     
    5662    proceed with the instructions below.</para></note>
    5763
    58 <screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
     64<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
    5965mv -v mpfr-&mpfr-version; mpfr
    6066tar -xf ../gmp-&gmp-version;.tar.xz
     
    6268tar -xf ../mpc-&mpc-version;.tar.gz
    6369mv -v mpc-&mpc-version; mpc</userinput></screen>
     70<screen arch="multilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
     71mv -v mpfr-&mpfr-version; mpfr
     72tar -xf ../gmp-&gmp-version;.tar.xz
     73mv -v gmp-&gmp-version; gmp
     74tar -xf ../mpc-&mpc-version;.tar.gz
     75mv -v mpc-&mpc-version; mpc
     76tar -xf ../isl-&isl-version;.tar.xz
     77mv -v isl-&isl-version; isl</userinput></screen>
    6478
    6579    <para>The following command will change the location of GCC's default
     
    7286do
    7387  cp -uv $file{,.orig}
    74   sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&amp;@g' \
     88  sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&amp;@g' \
    7589      -e 's@/usr@/tools@g' $file.orig &gt; $file
    7690  echo '
     
    98112    inadvertently run twice.</para>
    99113
    100     <para>Finally, on x86_64 hosts, set the default directory name for
    101     64-bit libraries to <quote>lib</quote>:</para>
    102 
    103 <screen><userinput remap="pre">case $(uname -m) in
     114    <para arch="default">Finally, on x86_64 hosts, set the default directory
     115    name for 64-bit libraries to <quote>lib</quote>:</para>
     116
     117<screen arch="default"><userinput remap="pre">case $(uname -m) in
    104118  x86_64)
    105119    sed -e '/m64=/s/lib64/lib/' \
     
    108122esac</userinput></screen>
    109123
     124<screen arch="multilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \
     125    -i.orig gcc/config/i386/t-linux64
     126cat > gcc/config/i386/t-linux64 &lt;&lt;"EOF"
     127comma=,
     128MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
     129MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
     130MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
     131MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu)
     132MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
     133EOF</userinput></screen>
     134
    110135<!--
    111136    <para>GCC doesn't detect stack protection correctly, which causes problems
     
    121146<screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&amp;\&amp; \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>
    122147-->
     148
     149    <!-- Following patch might be obsolete with gcc >= 8.2.1 -->
     150    <!-- see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 -->
     151    <!-- Fix applied in ch5-gcc-pass{1,2}, ch6-gcc -->
     152    <para arch="multilib">Fix an issue with isl-&isl-version;:</para>
     153
     154<screen arch="multilib"><userinput remap="pre">sed -e "/#include &lt;isl\/schedule_node.h&gt;/ a#include &lt;isl/id.h&gt;\n#include &lt;isl/space.h&gt;" \
     155    -i gcc/graphite.h</userinput></screen>
     156
    123157    <para>The GCC documentation recommends building GCC
    124158    in a dedicated build directory:</para>
     
    129163    <para>Prepare GCC for compilation:</para>
    130164
    131 <screen><userinput remap="configure">../configure                                       \
     165<screen arch="default"><userinput remap="configure">../configure                                       \
    132166    --target=$LFS_TGT                              \
    133167    --prefix=/tools                                \
     
    151185    --disable-libstdcxx                            \
    152186    --enable-languages=c,c++</userinput></screen>
     187
     188<screen arch="multilib"><userinput remap="configure">../configure                                       \
     189    --target=$LFS_TGT                              \
     190    --prefix=/tools                                \
     191    --with-glibc-version=2.11                      \
     192    --with-sysroot=$LFS                            \
     193    --with-newlib                                  \
     194    --without-headers                              \
     195    --with-local-prefix=/tools                     \
     196    --with-native-system-header-dir=/tools/include \
     197    --disable-nls                                  \
     198    --disable-shared                               \
     199    --enable-multilib                              \
     200    --with-multilib-list=m32,m64,mx32              \
     201    --disable-decimal-float                        \
     202    --disable-threads                              \
     203    --disable-libatomic                            \
     204    --disable-libgomp                              \
     205    --disable-libmpx                               \
     206    --disable-libquadmath                          \
     207    --disable-libssp                               \
     208    --disable-libvtv                               \
     209    --disable-libstdcxx                            \
     210    --enable-languages=c,c++</userinput></screen>
     211
    153212    <variablelist>
    154213      <title>The meaning of the configure options:</title>
     
    220279      </varlistentry>
    221280
    222       <varlistentry>
     281      <varlistentry arch="default">
    223282        <term><parameter>--disable-multilib</parameter></term>
    224283        <listitem>
    225284          <para>On x86_64, LFS does not yet support a multilib configuration.
    226285          This switch is harmless for x86.</para>
     286        </listitem>
     287      </varlistentry>
     288
     289      <varlistentry arch="multilib">
     290        <term><parameter>--enable-multilib,
     291                         --with-multilib-list=m32,m64,mx32</parameter></term>
     292        <listitem>
     293          <para>LFS now supports a multilib configuration. Enable it for the
     294          32bit, the 64-bit, and the mixed mode.</para>
    227295        </listitem>
    228296      </varlistentry>
Note: See TracChangeset for help on using the changeset viewer.