aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/gcc.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter08/gcc.xml')
-rw-r--r--chapter08/gcc.xml30
1 files changed, 26 insertions, 4 deletions
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 693d6e975..644e84339 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -57,13 +57,20 @@
<para>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 64-bit
+ libraries to <quote>lib</quote>:</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>
<screen><userinput remap="pre">mkdir -v build
@@ -71,7 +78,7 @@ cd build</userinput></screen>
<para>Prepare GCC for compilation:</para>
-<screen><userinput remap="configure">../configure --prefix=/usr \
+<screen arch="default"><userinput remap="configure">../configure --prefix=/usr \
LD=ld \
--enable-languages=c,c++ \
--enable-default-pie \
@@ -80,6 +87,20 @@ cd build</userinput></screen>
--disable-bootstrap \
--disable-fixincludes \
--with-system-zlib</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 --prefix=/usr \
+ LD=ld \
+ --enable-languages=c,c++ \
+ --enable-default-pie \
+ --enable-default-ssp \
+ --enable-multilib \
+ --with-multilib-list=$mlist \
+ --disable-bootstrap \
+ --disable-fixincludes \
+ --with-system-zlib</userinput></screen>
<para>GCC supports seven different computer languages, but the
prerequisites for most of them have not yet been installed. See the
@@ -303,10 +324,11 @@ SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
- <para>A 32-bit system may use a few other directories. For example, here
+ <para arch="default">A 32-bit system may use a few other directories. For example, here
is the output from an i686 machine:</para>
-<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
+<!-- not using entities here as the dir names has nothing to do with multilib -->
+<screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/local/lib32")
SEARCH_DIR("/lib32")
SEARCH_DIR("/usr/lib32")