aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/gcc-pass1.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/gcc-pass1.xml')
-rw-r--r--chapter05/gcc-pass1.xml52
1 files changed, 47 insertions, 5 deletions
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 0cd852ee6..f686e6ea5 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -60,18 +60,28 @@ mv -v mpfr-&mpfr-version; mpfr
tar -xf ../gmp-&gmp-version;.tar.xz
mv -v gmp-&gmp-version; gmp
tar -xf ../mpc-&mpc-version;.tar.gz
-mv -v mpc-&mpc-version; mpc</userinput></screen>
+mv -v mpc-&mpc-version; mpc</userinput>
+<userinput remap="pre" arch="ml_32,ml_x32,ml_all">tar -xf ../isl-&isl-version;.tar.xz
+mv -v isl-&isl-version; isl</userinput></screen>
- <para>On x86_64 hosts, set the default directory name for
+ <para arch="default">On x86_64 hosts, set the default directory name for
64-bit libraries to <quote>lib</quote>:</para>
-<screen><userinput remap="pre">case $(uname -m) in
+<screen arch="default"><userinput remap="pre">case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
;;
esac</userinput></screen>
+ <para arch="ml_32,ml_x32,ml_all">Change the default directory name for
+ libraries:</para>
+
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \
+ -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \
+ -i.orig gcc/config/i386/t-linux64
+</userinput></screen>
+
<para>The GCC documentation recommends building GCC
in a dedicated build directory:</para>
@@ -80,7 +90,7 @@ cd build</userinput></screen>
<para>Prepare GCC for compilation:</para>
-<screen><userinput remap="configure">../configure \
+<screen arch="default"><userinput remap="configure">../configure \
--target=$LFS_TGT \
--prefix=$LFS/tools \
--with-glibc-version=2.11 \
@@ -100,6 +110,31 @@ cd build</userinput></screen>
--disable-libvtv \
--disable-libstdcxx \
--enable-languages=c,c++</userinput></screen>
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure"
+ arch="ml_32">mlist=m64,m32</userinput><userinput remap="configure"
+ arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure"
+ arch="ml_all">mlist=m64,m32,mx32</userinput>
+<userinput remap="configure">../configure \
+ --target=$LFS_TGT \
+ --prefix=$LFS/tools \
+ --with-glibc-version=2.11 \
+ --with-sysroot=$LFS \
+ --with-newlib \
+ --without-headers \
+ --enable-initfini-array \
+ --disable-nls \
+ --disable-shared \
+ --enable-multilib --with-multilib-list=$mlist \
+ --disable-decimal-float \
+ --disable-threads \
+ --disable-libatomic \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --disable-libssp \
+ --disable-libvtv \
+ --disable-libstdcxx \
+ --enable-languages=c,c++</userinput></screen>
+
<variablelist>
<title>The meaning of the configure options:</title>
@@ -149,13 +184,20 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry arch="default">
<term><parameter>--disable-multilib</parameter></term>
<listitem>
<para>On x86_64, LFS does not support a multilib configuration.
This switch is harmless for x86.</para>
</listitem>
</varlistentry>
+ <varlistentry arch="ml_32,ml_x32,ml_all">
+ <term><parameter>--enable-multilib --with-multilib-list=...</parameter></term>
+ <listitem>
+ <para>LFS canbe used to support multilib. Which they are is
+ specified in the multilib list.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><parameter>--disable-decimal-float, --disable-threads,