- Timestamp:
- 04/07/2019 09:47:30 AM (5 years ago)
- Branches:
- multilib-10.1
- Children:
- a23757b
- Parents:
- 7d9f881
- Location:
- chapter05
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/binutils-pass1.xml
r7d9f881 ree1a413 80 80 --disable-werror</userinput></screen> 81 81 82 <screen arch="multilib"><userinput remap="configure">../configure --prefix=/tools \ 82 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">lpath=/tools/lib</userinput> 83 <userinput remap="configure" arch="ml_32,ml_all">lpath="$lpath:/tools/lib32"</userinput> 84 <userinput remap="configure" arch="ml_x32,ml_all">lpath="$lpath:/tools/libx32"</userinput> 85 <userinput remap="configure">../configure --prefix=/tools \ 83 86 --with-sysroot=$LFS \ 84 --with-lib-path= /tools/lib:/tools/lib32:/tools/libx32\87 --with-lib-path=$lpath \ 85 88 --target=$LFS_TGT \ 86 89 --disable-nls \ … … 159 162 sanity of the toolchain:</para> 160 163 161 <para arch="m ultilib">Create a symlink to ensure the sanity of164 <para arch="ml_32,ml_x32,ml_all">Create a symlink to ensure the sanity of 162 165 the toolchain:</para> 163 166 … … 166 169 esac</userinput></screen> 167 170 168 <screen arch="m ultilib"><userinput remap="install">mkdir -v /tools/lib &&171 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="install">mkdir -v /tools/lib && 169 172 ln -sv lib /tools/lib64</userinput></screen> 170 173 -
chapter05/binutils-pass2.xml
r7d9f881 ree1a413 61 61 --with-sysroot</userinput></screen> 62 62 63 <screen arch="multilib"><userinput remap="configure">CC=$LFS_TGT-gcc \ 63 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">lpath=/tools/lib</userinput> 64 <userinput remap="configure" arch="ml_32,ml_all">lpath="$lpath:/tools/lib32"</userinput> 65 <userinput remap="configure" arch="ml_x32,ml_all">lpath="$lpath:/tools/libx32"</userinput> 66 <userinput remap="configure">CC=$LFS_TGT-gcc \ 64 67 AR=$LFS_TGT-ar \ 65 68 RANLIB=$LFS_TGT-ranlib \ … … 68 71 --disable-nls \ 69 72 --disable-werror \ 70 --with-lib-path= /tools/lib:/tools/lib32:/tools/libx32\73 --with-lib-path=$lpath \ 71 74 --with-sysroot \ 72 75 --enable-64-bit-bfd \ … … 96 99 </varlistentry> 97 100 98 <varlistentry arch="m ultilib">101 <varlistentry arch="ml_32,ml_x32,ml_all"> 99 102 <term><parameter>--with-lib-path=/tools/lib:...</parameter></term> 100 103 <listitem> … … 119 122 </varlistentry> 120 123 121 <varlistentry arch="m ultilib">124 <varlistentry arch="ml_32,ml_x32,ml_all"> 122 125 <term><parameter>--enable-64-bit-bfd</parameter></term> 123 126 <listitem> … … 126 129 </varlistentry> 127 130 128 <varlistentry arch="m ultilib">131 <varlistentry arch="ml_32,ml_x32,ml_all"> 129 132 <term><parameter>--enable-multilib</parameter></term> 130 133 <listitem> … … 150 153 cp -v ld/ld-new /tools/bin</userinput></screen> 151 154 152 <screen arch="m ultilib"><userinput remap="adjust">make -C ld clean155 <screen arch="ml_all"><userinput remap="adjust">make -C ld clean 153 156 make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32:/usr/libx32:/libx32 157 cp -v ld/ld-new /tools/bin</userinput></screen> 158 <screen arch="ml_32"><userinput remap="adjust">make -C ld clean 159 make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32 160 cp -v ld/ld-new /tools/bin</userinput></screen> 161 <screen arch="ml_x32"><userinput remap="adjust">make -C ld clean 162 make -C ld LIB_PATH=/usr/lib:/lib:/usr/libx32:/libx32 154 163 cp -v ld/ld-new /tools/bin</userinput></screen> 155 164 -
chapter05/gcc-pass1.xml
r7d9f881 ree1a413 50 50 automatically use them:</para> 51 51 52 <para arch="m ultilib">GCC now requires the GMP, ISL, MPFR, and MPC packages.52 <para arch="ml_32,ml_x32,ml_all">GCC now requires the GMP, ISL, MPFR, and MPC packages. 53 53 As these packages may not be included in your host distribution, they will 54 54 be built with GCC. Unpack each package into the GCC source directory and … … 68 68 tar -xf ../mpc-&mpc-version;.tar.gz 69 69 mv -v mpc-&mpc-version; mpc</userinput></screen> 70 <screen arch="m ultilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz70 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 71 71 mv -v mpfr-&mpfr-version; mpfr 72 72 tar -xf ../gmp-&gmp-version;.tar.xz … … 122 122 esac</userinput></screen> 123 123 124 <screen arch="m ultilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \124 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 125 125 -i.orig gcc/config/i386/t-linux64 126 126 cat > gcc/config/i386/t-linux64 <<"EOF" … … 150 150 <!-- see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 --> 151 151 <!-- Fix applied in ch5-gcc-pass{1,2}, ch6-gcc --> 152 <para arch="m ultilib">Fix an issue with isl-&isl-version;:</para>153 154 <screen arch="m ultilib"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \152 <para arch="ml_32,ml_x32,ml_all">Fix an issue with isl-&isl-version;:</para> 153 154 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 155 155 -i gcc/graphite.h</userinput></screen> 156 156 … … 186 186 --enable-languages=c,c++</userinput></screen> 187 187 188 <screen arch="multilib"><userinput remap="configure">../configure \ 188 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">mlist="m64"</userinput> 189 <userinput arch="ml_32,ml_all" remap="configure">mlist="$mlist,m32"</userinput> 190 <userinput arch="ml_x32,ml_all" remap="configure">mlist="$mlist,mx32"</userinput> 191 <userinput remap="configure">../configure \ 189 192 --target=$LFS_TGT \ 190 193 --prefix=/tools \ … … 198 201 --disable-shared \ 199 202 --enable-multilib \ 200 --with-multilib-list= m32,m64,mx32\203 --with-multilib-list=$mlist \ 201 204 --disable-decimal-float \ 202 205 --disable-threads \ … … 287 290 </varlistentry> 288 291 289 <varlistentry arch="m ultilib">292 <varlistentry arch="ml_32,ml_x32,ml_all"> 290 293 <term><parameter>--enable-multilib, 291 294 --with-multilib-list=m32,m64,mx32</parameter></term> -
chapter05/gcc-pass2.xml
r7d9f881 ree1a413 94 94 esac</userinput></screen> 95 95 96 <para arch="m ultilib">Change the default directory name for 64-bit96 <para arch="ml_32,ml_x32,ml_all">Change the default directory name for 64-bit 97 97 libraries to <quote>lib</quote>:</para> 98 98 99 <screen arch="m ultilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \99 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 100 100 -i.orig gcc/config/i386/t-linux64 101 101 cat > gcc/config/i386/t-linux64 <<"EOF" … … 112 112 required directory names:</para> 113 113 114 <para arch="m ultilib">As in the first build of GCC it requires the GMP,114 <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC it requires the GMP, 115 115 ISL, MPFR, and MPC packages. Unpack the tarballs and move them into the 116 116 required directory names:</para> … … 122 122 tar -xf ../mpc-&mpc-version;.tar.gz 123 123 mv -v mpc-&mpc-version; mpc</userinput></screen> 124 <screen arch="m ultilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz124 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 125 125 mv -v mpfr-&mpfr-version; mpfr 126 126 tar -xf ../gmp-&gmp-version;.tar.xz … … 132 132 133 133 <!-- Following patch might be obsolete with gcc >= 8.2.1 --> 134 <para arch="m ultilib">Fix an issue with isl-&isl-version;:</para>135 136 <screen arch="m ultilib"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \134 <para arch="ml_32,ml_x32,ml_all">Fix an issue with isl-&isl-version;:</para> 135 136 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 137 137 -i gcc/graphite.h</userinput></screen> 138 138 … … 161 161 --disable-libgomp</userinput></screen> 162 162 163 <screen arch="multilib"><userinput remap="configure">CC=$LFS_TGT-gcc \ 163 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">mlist="m64"</userinput> 164 <userinput arch="ml_32,ml_all" remap="configure">mlist="$mlist,m32"</userinput> 165 <userinput arch="ml_x32,ml_all" remap="configure">mlist="$mlist,mx32"</userinput> 166 <userinput remap="configure">CC=$LFS_TGT-gcc \ 164 167 CXX=$LFS_TGT-g++ \ 165 168 AR=$LFS_TGT-ar \ … … 172 175 --disable-libstdcxx-pch \ 173 176 --enable-multilib \ 174 --with-multilib-list= m32,m64,mx32\177 --with-multilib-list=$mlist \ 175 178 --with-system-zlib \ 176 179 --disable-bootstrap \ … … 245 248 246 249 247 <para arch="m ultilib">Repeat the test for 32-bit:</para>248 249 <screen arch="m ultilib"><userinput>cc -m32 dummy.c250 <para arch="ml_32,ml_all">Repeat the test for 32-bit:</para> 251 252 <screen arch="ml_32,ml_all"><userinput>cc -m32 dummy.c 250 253 readelf -l a.out | grep ': /tools'</userinput></screen> 251 254 252 <para arch="m ultilib">In this case, the output shoud be:</para>253 254 <screen arch="m ultilib"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen>255 256 <para arch="m ultilib">Repeat the test for x32-bit:</para>257 258 <screen arch="m ultilib"><userinput>cc -mx32 dummy.c255 <para arch="ml_32,ml_all">In this case, the output shoud be:</para> 256 257 <screen arch="ml_32,ml_all"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> 258 259 <para arch="ml_x32,ml_all">Repeat the test for x32-bit:</para> 260 261 <screen arch="ml_x32,ml_all"><userinput>cc -mx32 dummy.c 259 262 readelf -l a.out | grep ': /tools'</userinput></screen> 260 263 261 <para arch="m ultilib">In this case, the output shoud be:</para>262 263 <screen arch="m ultilib"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux-x32.so.2]</computeroutput></screen>264 <para arch="ml_x32,ml_all">In this case, the output shoud be:</para> 265 266 <screen arch="ml_x32,ml_all"><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux-x32.so.2]</computeroutput></screen> 264 267 265 268 <para arch="default">Note that the dynamic linker will be -
chapter05/glibc.xml
r7d9f881 ree1a413 83 83 </varlistentry> 84 84 85 <varlistentry arch="m ultilib">85 <varlistentry arch="ml_32,ml_x32,ml_all"> 86 86 <term><parameter>--enable-multi-arch</parameter></term> 87 87 <listitem> … … 192 192 </sect2> 193 193 194 <sect2 arch="m ultilib" role="installation">194 <sect2 arch="ml_32,ml_all" role="installation"> 195 195 <title>Installation of Glibc 32-bit</title> 196 196 … … 214 214 --libexecdir=/tools/lib32 \ 215 215 --with-headers=/tools/include \ 216 --with-binutils=/tools/bin \ 216 --with-binutils=/tools/bin</userinput></screen> 217 <!-- \ 217 218 libc_cv_forced_unwind=yes \ 218 libc_cv_c_cleanup=yes</userinput></screen> 219 libc_cv_c_cleanup=yes</userinput></screen> --> 219 220 220 221 <para>Now compile the 32-bit version of glibc:</para> … … 232 233 </sect2> 233 234 234 <sect2 arch="m ultilib" role="installation">235 <sect2 arch="ml_x32,ml_all" role="installation"> 235 236 <title>Installation of Glibc x32-bit</title> 236 237 … … 254 255 --libexecdir=/tools/libx32 \ 255 256 --with-headers=/tools/include \ 256 --with-binutils=/tools/bin \ 257 --with-binutils=/tools/bin</userinput></screen> 258 <!-- \ 257 259 libc_cv_forced_unwind=yes \ 258 libc_cv_c_cleanup=yes</userinput></screen> 260 libc_cv_c_cleanup=yes</userinput></screen> --> 259 261 260 262 <para>Now compile the x32-bit version of glibc:</para> -
chapter05/ncurses.xml
r7d9f881 ree1a413 113 113 </sect2> 114 114 115 <sect2 arch="m ultilib" role="installation">115 <sect2 arch="ml_32,ml_all" role="installation"> 116 116 <title>Installation of Ncurses - 32 bit</title> 117 117 … … 144 144 </sect2> 145 145 146 <sect2 arch="m ultilib" role="installation">146 <sect2 arch="ml_x32,ml_all" role="installation"> 147 147 <title>Installation of Ncurses - x32 bit</title> 148 148 -
chapter05/stripping.xml
r7d9f881 ree1a413 19 19 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 20 20 21 <screen arch="multilib"><userinput>strip --strip-debug /tools/lib{,{,x}32}/* 21 <screen arch="ml_32"><userinput>strip --strip-debug /tools/lib{,32}/* 22 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 23 <screen arch="ml_x32"><userinput>strip --strip-debug /tools/lib{,x32}/* 24 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 25 <screen arch="ml_all"><userinput>strip --strip-debug /tools/lib{,{,x}32}/* 22 26 /usr/bin/strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> 23 27 … … 39 43 <screen arch="default"><userinput>find /tools/{lib,libexec} -name \*.la -delete</userinput></screen> 40 44 41 <screen arch="multilib"><userinput>find /tools/{lib{,{,x}32},libexec} -name \*.la -delete</userinput></screen> 45 <screen arch="ml_32"><userinput>find /tools/{lib{,32},libexec} -name \*.la -delete</userinput></screen> 46 <screen arch="ml_x32"><userinput>find /tools/{lib{,x32},libexec} -name \*.la -delete</userinput></screen> 47 <screen arch="ml_all"><userinput>find /tools/{lib{,{,x}32},libexec} -name \*.la -delete</userinput></screen> 42 48 43 49 <para>At this point, you should have at least 3 GB of free space in -
chapter05/util-linux.xml
r7d9f881 ree1a413 122 122 </sect2> 123 123 124 <sect2 arch="m ultilib" role="installation">124 <sect2 arch="ml_32,ml_all" role="installation"> 125 125 <title>Installation of Util-Linux - 32 bit</title> 126 126 … … 154 154 </sect2> 155 155 156 <sect2 arch="m ultilib" role="installation">156 <sect2 arch="ml_x32,ml_all" role="installation"> 157 157 <title>Installation of Util-Linux - x32 bit</title> 158 158 -
chapter05/xz.xml
r7d9f881 ree1a413 64 64 </sect2> 65 65 66 <sect2 arch="m ultilib" role="installation">66 <sect2 arch="ml_32,ml_all" role="installation"> 67 67 <title>Installation of Xz - 32 bit</title> 68 68 … … 91 91 </sect2> 92 92 93 <sect2 arch="m ultilib" role="installation">93 <sect2 arch="ml_x32,ml_all" role="installation"> 94 94 <title>Installation of Xz - x32 bit</title> 95 95 -
chapter05/zlib.xml
r7d9f881 ree1a413 6 6 ]> 7 7 8 <sect1 arch="m ultilib" id="ch-tools-zlib" role="wrap">8 <sect1 arch="ml_32,ml_x32,ml_all" id="ch-tools-zlib" role="wrap"> 9 9 <?dbhtml filename="zlib.html"?> 10 10 … … 60 60 </sect2> 61 61 62 <sect2 arch="m ultilib" role="installation">62 <sect2 arch="ml_32,ml_all" role="installation"> 63 63 <title>Installation of Zlib - 32 bit</title> 64 64 … … 83 83 </sect2> 84 84 85 <sect2 arch="m ultilib" role="installation">85 <sect2 arch="ml_x32,ml_all" role="installation"> 86 86 <title>Installation of Zlib - x32 bit</title> 87 87
Note:
See TracChangeset
for help on using the changeset viewer.