Index: chapter05/glibc.xml
===================================================================
--- chapter05/glibc.xml	(revision ea93c117f2971ed269d3a7d39999d8b16b6f2b7e)
+++ chapter05/glibc.xml	(revision 31a18d02262a0196d902d006284d8147f7c4e338)
@@ -48,5 +48,5 @@
     operation of the dynamic library loader:</para>
 
-<screen><userinput remap="pre">case $(uname -m) in
+<screen arch="default"><userinput remap="pre">case $(uname -m) in
     i?86)   ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
     ;;
@@ -55,4 +55,7 @@
     ;;
 esac</userinput></screen>
+<!-- no ld-linux.so.2 here as multilib is based on x86_64, not on i686 -->
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
+ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3</userinput></screen>
 
     <note>
@@ -87,5 +90,5 @@
     <para>Next, prepare Glibc for compilation:</para>
 
-<screen><userinput remap="configure">../configure                             \
+<screen arch="default"><userinput remap="configure">../configure                             \
       --prefix=/usr                      \
       --host=$LFS_TGT                    \
@@ -95,4 +98,12 @@
       --disable-nscd                     \
       libc_cv_slibdir=/usr/lib</userinput></screen>
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure                             \
+      --prefix=/usr                      \
+      --host=$LFS_TGT                    \
+      --build=$(../scripts/config.guess) \
+      --enable-kernel=&min-kernel;                \
+      --with-headers=$LFS/usr/include    \
+      --enable-multi-arch                \
+      libc_cv_slibdir=/usr/lib</userinput></screen>
 
     <variablelist>
@@ -214,5 +225,5 @@
 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
 
-      <para>Note that for 32-bit machines, the interpreter name will be
+      <para arch="default">Note that for 32-bit machines, the interpreter name will be
       <filename>/lib/ld-linux.so.2</filename>.</para>
 
@@ -242,4 +253,146 @@
   </sect2>
 
+  <!-- - - - - - - - - - -->
+  <!-- Multilib - 32bit  -->
+  <!-- - - - - - - - - - -->
+  <sect2 arch="ml_32,ml_all">
+    <title>Building Glibc - 32bit</title>
+
+    <para>Now recompile for m32. The extracted source can be
+    reused but needs to be cleaned before installing the m32
+    version of Glibc.</para>
+
+    <para>Clear the build directory and remove artefacts from
+    previous build:</para>
+      
+<screen><userinput remap="pre">make clean
+find .. -name "*.a" -delete</userinput></screen>
+
+    <para>Configure Glibc for m32 with the following commands:</para>
+
+<screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \
+CXX="$LFS_TGT-g++ -m32" \
+../configure                             \
+      --prefix=/usr                      \
+      --host=$LFS_TGT32                  \
+      --build=$(../scripts/config.guess) \
+      --enable-kernel=&min-kernel;                \
+      --with-headers=$LFS/usr/include    \
+      --enable-multi-arch                \
+      --libdir=/usr/lib32                \
+      --libexecdir=/usr/lib32            \
+      libc_cv_slibdir=/usr/lib32</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
+cp -a DESTDIR/usr/lib32 $LFS/usr/
+install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \
+               $LFS/usr/include/gnu/
+ln -svf ../lib32/ld-linux.so.2 $LFS/lib/ld-linux.so.2</userinput></screen>
+
+
+    <caution>
+      <para>At this point, it is imperative to stop and ensure that the basic
+      functions (compiling and linking) of the new toolchain are working as
+      expected. To perform a sanity check, run the following commands:</para>
+
+<screen><userinput>echo 'int main(){}' &gt; dummy.c
+$LFS_TGT-gcc -m32 dummy.c
+readelf -l a.out | grep '/ld-linux'</userinput></screen>
+
+      <para>If everything is working correctly, there should be no errors,
+      and the output of the last command will be of the form:</para>
+
+<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
+
+      <para>If the output is not shown as above or there was no output at all,
+      then something is wrong. Investigate and retrace the steps to find out
+      where the problem is and correct it. This issue must be resolved before
+      continuing on.</para>
+
+      <para>Once all is well, clean up the test files:</para>
+
+<screen><userinput>rm -v dummy.c a.out</userinput></screen>
+
+    </caution>
+
+  </sect2><!-- m32 -->
+
+  <!-- - - - - - - - - - -->
+  <!-- Multilib - x32bit -->
+  <!-- - - - - - - - - - -->
+  
+  <sect2 arch="ml_x32,ml_all">
+    <title>Building Glibc - x32bit</title>
+
+    <para>Now recompile for mx32. The extracted source can be
+    reused but needs to be cleaned before installing the mx32
+    version of Glibc.</para>
+
+    <para>Clear the build directory and remove artefacts from
+    previous build:</para>
+      
+<screen><userinput remap="pre">make clean
+find .. -name "*.a" -delete</userinput></screen>
+
+    <para>Configure Glibc for mx32 with the following commands:</para>
+
+<screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \
+CXX="$LFS_TGT-g++ -mx32" \
+../configure                             \
+      --prefix=/usr                      \
+      --host=$LFS_TGTX32                 \
+      --build=$(../scripts/config.guess) \
+      --enable-kernel=&min-kernel;                \
+      --with-headers=$LFS/usr/include    \
+      --enable-multi-arch                \
+      --libdir=/usr/libx32               \
+      --libexecdir=/usr/libx32           \
+      libc_cv_slibdir=/usr/libx32</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
+cp -a DESTDIR/usr/libx32 $LFS/usr/
+install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \
+               $LFS/usr/include/gnu/
+ln -svf ../libx32/ld-linux-x32.so.2 $LFS/lib/ld-linux-x32.so.2</userinput></screen>
+
+    <caution>
+      <para>At this point, it is imperative to stop and ensure that the basic
+      functions (compiling and linking) of the new toolchain are working as
+      expected. To perform a sanity check, run the following commands:</para>
+
+<screen><userinput>echo 'int main(){}' &gt; dummy.c
+$LFS_TGT-gcc -mx32 dummy.c
+readelf -l a.out | grep '/ld-linux-x32'</userinput></screen>
+
+      <para>If everything is working correctly, there should be no errors,
+      and the output of the last command will be of the form:</para>
+
+<screen><computeroutput>[Requesting program interpreter: /libx32/ld-linux-x32.so.2]</computeroutput></screen>
+
+      <para>If the output is not shown as above or there was no output at all,
+      then something is wrong. Investigate and retrace the steps to find out
+      where the problem is and correct it. This issue must be resolved before
+      continuing on.</para>
+
+      <para>Once all is well, clean up the test files:</para>
+
+<screen><userinput>rm -v dummy.c a.out</userinput></screen>
+
+    </caution>
+
+  </sect2><!-- mx32 -->
+
   <sect2 role="content">
     <title/>
