Changeset 8eb3fe4 for chapter05/gcc-pass1.xml
- Timestamp:
- 04/01/2019 05:00:45 PM (5 years ago)
- Branches:
- multilib-10.1
- Children:
- 7d9f881
- Parents:
- 1fa2099
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/gcc-pass1.xml
r1fa2099 r8eb3fe4 44 44 <title>Installation of Cross GCC</title> 45 45 46 <para>GCC now requires the GMP, MPFR and MPC packages. As these packages may 47 not be included in your host distribution, they will be built with 48 GCC. Unpack each package into the GCC source directory and rename the 49 resulting directories so the GCC build procedures will automatically 50 use them:</para> 46 <para arch="default">GCC now requires the GMP, MPFR, and MPC packages. As 47 these packages may not be included in your host distribution, they will be 48 built with GCC. Unpack each package into the GCC source directory and 49 rename the resulting directories so the GCC build procedures will 50 automatically use them:</para> 51 52 <para arch="multilib">GCC now requires the GMP, ISL, MPFR, and MPC packages. 53 As these packages may not be included in your host distribution, they will 54 be built with GCC. Unpack each package into the GCC source directory and 55 rename the resulting directories so the GCC build procedures will 56 automatically use them:</para> 51 57 52 58 <note><para>There are frequent misunderstandings about this chapter. The … … 56 62 proceed with the instructions below.</para></note> 57 63 58 <screen ><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz64 <screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 59 65 mv -v mpfr-&mpfr-version; mpfr 60 66 tar -xf ../gmp-&gmp-version;.tar.xz … … 62 68 tar -xf ../mpc-&mpc-version;.tar.gz 63 69 mv -v mpc-&mpc-version; mpc</userinput></screen> 70 <screen arch="multilib"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz 71 mv -v mpfr-&mpfr-version; mpfr 72 tar -xf ../gmp-&gmp-version;.tar.xz 73 mv -v gmp-&gmp-version; gmp 74 tar -xf ../mpc-&mpc-version;.tar.gz 75 mv -v mpc-&mpc-version; mpc 76 tar -xf ../isl-&isl-version;.tar.xz 77 mv -v isl-&isl-version; isl</userinput></screen> 64 78 65 79 <para>The following command will change the location of GCC's default … … 72 86 do 73 87 cp -uv $file{,.orig} 74 sed -e 's@/lib\(64\)\?\(32\)\? /ld@/tools&@g' \88 sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&@g' \ 75 89 -e 's@/usr@/tools@g' $file.orig > $file 76 90 echo ' … … 98 112 inadvertently run twice.</para> 99 113 100 <para >Finally, on x86_64 hosts, set the default directory name for101 64-bit libraries to <quote>lib</quote>:</para>102 103 <screen ><userinput remap="pre">case $(uname -m) in114 <para arch="default">Finally, on x86_64 hosts, set the default directory 115 name for 64-bit libraries to <quote>lib</quote>:</para> 116 117 <screen arch="default"><userinput remap="pre">case $(uname -m) in 104 118 x86_64) 105 119 sed -e '/m64=/s/lib64/lib/' \ … … 108 122 esac</userinput></screen> 109 123 124 <screen arch="multilib"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 125 -i.orig gcc/config/i386/t-linux64 126 cat > gcc/config/i386/t-linux64 <<"EOF" 127 comma=, 128 MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) 129 MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) 130 MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) 131 MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) 132 MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) 133 EOF</userinput></screen> 134 110 135 <!-- 111 136 <para>GCC doesn't detect stack protection correctly, which causes problems … … 121 146 <screen><userinput remap="pre">sed -i 's/if \((code.*))\)/if (\1 \&\& \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen> 122 147 --> 148 149 <!-- Following patch might be obsolete with gcc >= 8.2.1 --> 150 <!-- see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 --> 151 <!-- Fix applied in ch5-gcc-pass{1,2}, ch6-gcc --> 152 <para arch="multilib">Fix an issue with isl-&isl-version;:</para> 153 154 <screen arch="multilib"><userinput remap="pre">sed -e "/#include <isl\/schedule_node.h>/ a#include <isl/id.h>\n#include <isl/space.h>" \ 155 -i gcc/graphite.h</userinput></screen> 156 123 157 <para>The GCC documentation recommends building GCC 124 158 in a dedicated build directory:</para> … … 129 163 <para>Prepare GCC for compilation:</para> 130 164 131 <screen ><userinput remap="configure">../configure \165 <screen arch="default"><userinput remap="configure">../configure \ 132 166 --target=$LFS_TGT \ 133 167 --prefix=/tools \ … … 151 185 --disable-libstdcxx \ 152 186 --enable-languages=c,c++</userinput></screen> 187 188 <screen arch="multilib"><userinput remap="configure">../configure \ 189 --target=$LFS_TGT \ 190 --prefix=/tools \ 191 --with-glibc-version=2.11 \ 192 --with-sysroot=$LFS \ 193 --with-newlib \ 194 --without-headers \ 195 --with-local-prefix=/tools \ 196 --with-native-system-header-dir=/tools/include \ 197 --disable-nls \ 198 --disable-shared \ 199 --enable-multilib \ 200 --with-multilib-list=m32,m64,mx32 \ 201 --disable-decimal-float \ 202 --disable-threads \ 203 --disable-libatomic \ 204 --disable-libgomp \ 205 --disable-libmpx \ 206 --disable-libquadmath \ 207 --disable-libssp \ 208 --disable-libvtv \ 209 --disable-libstdcxx \ 210 --enable-languages=c,c++</userinput></screen> 211 153 212 <variablelist> 154 213 <title>The meaning of the configure options:</title> … … 220 279 </varlistentry> 221 280 222 <varlistentry >281 <varlistentry arch="default"> 223 282 <term><parameter>--disable-multilib</parameter></term> 224 283 <listitem> 225 284 <para>On x86_64, LFS does not yet support a multilib configuration. 226 285 This switch is harmless for x86.</para> 286 </listitem> 287 </varlistentry> 288 289 <varlistentry arch="multilib"> 290 <term><parameter>--enable-multilib, 291 --with-multilib-list=m32,m64,mx32</parameter></term> 292 <listitem> 293 <para>LFS now supports a multilib configuration. Enable it for the 294 32bit, the 64-bit, and the mixed mode.</para> 227 295 </listitem> 228 296 </varlistentry>
Note:
See TracChangeset
for help on using the changeset viewer.