aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/gcc-pass2.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/gcc-pass2.xml')
-rw-r--r--chapter06/gcc-pass2.xml39
1 files changed, 35 insertions, 4 deletions
diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml
index ef2eff517..9d3b60184 100644
--- a/chapter06/gcc-pass2.xml
+++ b/chapter06/gcc-pass2.xml
@@ -54,15 +54,23 @@ mv -v gmp-&gmp-version; gmp
tar -xf ../mpc-&mpc-version;.tar.gz
mv -v mpc-&mpc-version; mpc</userinput></screen>
- <para>If building on x86_64, change the default directory name for 64-bit
+
+ <para arch="default">If building on x86_64, change 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 the
+ 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>Override the building rule of libgcc and libstdc++ headers, to
allow building these libraries with POSIX threads support:</para>
@@ -79,7 +87,7 @@ cd build</userinput></screen>
<para>Now prepare GCC for compilation:</para>
-<screen><userinput remap="configure">../configure \
+<screen arch="default"><userinput remap="configure">../configure \
--build=$(../config.guess) \
--host=$LFS_TGT \
--target=$LFS_TGT \
@@ -96,7 +104,30 @@ cd build</userinput></screen>
--disable-libssp \
--disable-libvtv \
--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 \
+ --build=$(../config.guess) \
+ --host=$LFS_TGT \
+ --target=$LFS_TGT \
+ LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \
+ --prefix=/usr \
+ --with-build-sysroot=$LFS \
+ --enable-initfini-array \
+ --disable-nls \
+ --enable-multilib --with-multilib-list=$mlist \
+ --disable-decimal-float \
+ --disable-libatomic \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --disable-libssp \
+ --disable-libvtv \
+ --enable-languages=c,c++</userinput></screen>
+<!--
+ LDFLAGS_FOR_TARGET="-L$PWD/$LFS_TGT/libgcc -L$PWD/$LFS_TGT/32/libgcc -L$PWD/$LFS_TGT/x32/libgcc" \
+-->
<variablelist>
<title>The meaning of the new configure options:</title><!-- WIP -->