Changeset 37e35d2 for chapter08/gcc.xml
- Timestamp:
- 06/29/2020 07:55:01 AM (4 years ago)
- Branches:
- multilib-10.1
- Children:
- c4804e8
- Parents:
- d4fdde6
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
chapter08/gcc.xml
rd4fdde6 r37e35d2 32 32 33 33 <seglistitem> 34 <seg>&gcc- ch6-sbu;</seg>35 <seg>&gcc- ch6-du;</seg>34 <seg>&gcc-fin-sbu;</seg> 35 <seg>&gcc-fin-du;</seg> 36 36 </seglistitem> 37 37 </segmentedlist> … … 42 42 <title>Installation of GCC</title> 43 43 44 <para arch="default">If building on x86_64, change the default directory 45 name for 64-bitlibraries to <quote>lib</quote>:</para>44 <para arch="default">If building on x86_64, change the default directory name for 64-bit 45 libraries to <quote>lib</quote>:</para> 46 46 47 47 <screen arch="default"><userinput remap="pre">case $(uname -m) in … … 55 55 libraries to <quote>lib</quote>:</para> 56 56 57 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' 58 -e '/m32=/s/m32=.*/m32=..\ /lib32$(call if_multiarch,:i386-linux-gnu)/' \57 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 58 -e '/m32=/s/m32=.*/m32=..\&lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \ 59 59 -i.orig gcc/config/i386/t-linux64</userinput></screen> 60 60 … … 66 66 <para>Prepare GCC for compilation:</para> 67 67 68 <screen><userinput arch="default" remap="configure">mloptions="--disable-multilib"</userinput> 69 <userinput arch="ml_32,ml_x32,ml_all" remap="configure">mloptions="--enable-multilib --with-multilib-list=m64"</userinput> 70 <userinput arch="ml_32,ml_all" remap="configure">mloptions="$mloptions,m32"</userinput> 71 <userinput arch="ml_x32,ml_all" remap="configure">mloptions="$mloptions,mx32"</userinput> 72 <userinput remap="configure">SED=sed \ 73 ../configure --prefix=/usr \ 68 <screen arch="default"><userinput remap="configure">../configure --prefix=/usr \ 69 LD=ld \ 74 70 --enable-languages=c,c++ \ 71 --disable-multilib \ 75 72 --disable-bootstrap \ 76 --with-system-zlib \ 77 $mloptions</userinput></screen> 78 79 <para>Note that for other languages, there are some prerequisites that 73 --with-system-zlib</userinput></screen> 74 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure" 75 arch="ml_32" >mlist=m64,m32</userinput><userinput remap="configure" 76 arch="ml_x32">mlist=m64,mx32</userinput><userinput remap="configure" 77 arch="ml_all">mlist=m64,m32,mx32</userinput> 78 <userinput remap="configure">../configure --prefix=/usr \ 79 LD=ld \ 80 --enable-languages=c,c++ \ 81 --enable-multilib \ 82 --with-multilib-list=$mlist \ 83 --disable-bootstrap \ 84 --with-system-zlib</userinput></screen> 85 86 <para>Note that for other programming languages there are some prerequisites that 80 87 are not yet available. See the 81 <ulink url="&blfs-book;general/gcc.html">BLFS Book </ulink>88 <ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink> 82 89 for instructions on how to build all of GCC's supported languages.</para> 83 90 … … 86 93 87 94 <varlistentry> 88 <term><envar>SED=sed</envar></term> 89 <listitem> 90 <para>Setting this environment variable prevents a hard-coded 91 path to /tools/bin/sed.</para> 92 </listitem> 93 </varlistentry> 94 <!-- 95 <varlistentry> 96 <term><parameter>- -disable-libmpx</parameter></term> 97 <listitem> 98 <para>This switch tells GCC to not build mpx (Memory Protection 99 Extensions) that can cause problems on some processors. It has 100 been removed from the next version of gcc.</para> 101 </listitem> 102 </varlistentry> 103 --> 95 <term><parameter>LD=ld</parameter></term> 96 <listitem> 97 <para>This parameter makes the configure script use the ld installed 98 by the binutils built earlier in this chapter, rather than 99 the cross-built version which would otherwise be used.</para> 100 </listitem> 101 </varlistentry> 102 104 103 <varlistentry> 105 104 <term><parameter>--with-system-zlib</parameter></term> 106 105 <listitem> 107 106 <para>This switch tells GCC to link to the system installed copy of 108 the Zlib library, rather than its own internal copy.</para>107 the zlib library, rather than its own internal copy.</para> 109 108 </listitem> 110 109 </varlistentry> … … 120 119 </important> 121 120 122 <para>One set of tests in the GCC test suite is known to exhaust the stack,123 s o increase the stack size prior to running the tests:</para>121 <para>One set of tests in the GCC test suite is known to exhaust the default 122 stack, so increase the stack size prior to running the tests:</para> 124 123 125 124 <screen><userinput remap="test">ulimit -s 32768</userinput></screen> … … 144 143 apparently related to the en_HK locale.</para> 145 144 145 <!-- don't fail anymore after the move of iana-etc and /etc/hosts 146 146 <para>Two tests named lookup.cc and reverse.cc in experimental/net 147 147 are known to fail in LFS chroot environment because they require 148 148 /etc/hosts and iana-etc.</para> 149 149 --> 150 150 <para>A few unexpected failures cannot always be avoided. The GCC developers 151 151 are usually aware of these issues, but have not resolved them yet. … … 173 173 174 174 <screen><userinput remap="install">chown -v -R root:root \ 175 /usr/lib/gcc/ $(gcc -dumpmachine)/&gcc-version;/include{,-fixed}</userinput></screen>175 /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen> 176 176 177 177 <para>Create a symlink required by the <ulink … … 180 180 181 181 <screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen> 182 182 <!-- already done earlier 183 183 <para>Many packages use the name <command>cc</command> to call the C 184 184 compiler. To satisfy those packages, create a symlink:</para> 185 185 186 186 <screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen> 187 187 --> 188 188 <para>Add a compatibility symlink to enable building programs with 189 189 Link Time Optimization (LTO):</para> … … 195 195 <para>Now that our final toolchain is in place, it is important to again ensure 196 196 that compiling and linking will work as expected. We do this by performing 197 the same sanity checks as we did earlier in the chapter:</para>197 some sanity checks:</para> 198 198 199 199 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" … … 225 225 /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> 226 226 227 <para>Depending on your machine architecture, the above may differ slightly ,228 the difference usually beingthe name of the directory227 <para>Depending on your machine architecture, the above may differ slightly. 228 The difference will be the name of the directory 229 229 after <filename class="directory">/usr/lib/gcc</filename>. The important 230 230 thing to look for here is that <command>gcc</command> has found all three … … 248 248 /usr/include</computeroutput></screen> 249 249 250 <para>Again, note that the directory named after your target triplet may be 251 different than the above, depending on your architecture.</para> 252 253 <!-- This appears to be obsolete 254 255 <note><para>As of version 4.3.0, GCC now unconditionally installs the 256 <filename>limits.h</filename> file into the private 257 <filename class="directory">include-fixed</filename> directory, and that 258 directory is required to be in place.</para></note> 259 --> 250 <para>Again, the directory named after your target triplet may be 251 different than the above, depending on your system architecture.</para> 260 252 261 253 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" … … 280 272 SEARCH_DIR("/usr/lib");</computeroutput></screen> 281 273 282 <para arch="default">A 32-bit system may see a few different directories. 283 For example, here is the output from an i686 machine:</para> 284 274 <para arch="default">A 32-bit system may see a few different directories. For example, here 275 is the output from an i686 machine:</para> 276 277 <!-- not using entities here as the dir names has nothing to do with multilib --> 285 278 <screen arch="default"><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") 286 279 SEARCH_DIR("/usr/local/lib32") … … 339 332 340 333 <screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib 341 mv -v /usr/lib/ libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>334 mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> 342 335 343 336 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.