Changeset 73aedd1d for chapter06/gcc.xml
- Timestamp:
- 11/01/2003 10:31:50 PM (21 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 49f4dd5
- Parents:
- 0b400add
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/gcc.xml
r0b400add r73aedd1d 8 8 &aa-gcc-shortdesc; 9 9 &aa-gcc-dep; 10 &c6-gcc-inst; 10 11 <sect2><title> </title><para> </para></sect2> 12 13 <sect2> 14 <title>Installation of GCC</title> 15 16 <note><para>The test suite for GCC in this section is considered 17 <emphasis>critical</emphasis>. Our advice is to not skip it under any 18 circumstance.</para></note> 19 20 <para>This package is known to behave badly when you have changed its 21 default optimization flags (including the -march and -mcpu options). 22 Therefore, if you have defined any environment variables that override 23 default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting 24 or modifying them when building GCC.</para> 25 26 <para>This time we will build both the C and the C++ compiler, so you'll have 27 to unpack the GCC-core <emphasis>and</emphasis> the GCC-g++ tarball -- they 28 will unfold into the same directory. You should likewise extract the 29 GCC-testsuite package. The full GCC package contains even more 30 compilers. Instructions for building these can be found at 31 <ulink url="&blfs-root;view/stable/general/gcc.html"/>.</para> 32 33 <screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch; 34 patch -Np1 -i ../&gcc-suppress-libiberty-patch;</userinput></screen> 35 36 <para>The second patch here suppresses the installation of libiberty from GCC, 37 as we will use the one provided by binutils instead. Be careful 38 <emphasis>not</emphasis> to apply the GCC specs patch from Chapter 5 39 here.</para> 40 41 <para>The GCC documentation recommends building GCC outside of the source 42 directory in a dedicated build directory:</para> 43 44 <screen><userinput>mkdir ../gcc-build 45 cd ../gcc-build</userinput></screen> 46 47 <para>Now prepare GCC for compilation:</para> 48 49 <screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \ 50 --enable-shared --enable-threads=posix \ 51 --enable-__cxa_atexit --enable-clocale=gnu \ 52 --enable-languages=c,c++</userinput></screen> 53 54 <para>Compile the package:</para> 55 56 <screen><userinput>make</userinput></screen> 57 58 <para>Test the results, but don't stop at errors (you'll remember the few 59 known ones):</para> 60 61 <screen><userinput>make -k check</userinput></screen> 62 63 <para>The test suite notes from <xref linkend="ch05-gcc-pass2"/> are still very 64 much appropriate here. Be sure to refer back there should you have any 65 doubts.</para> 66 67 <para>And install the package:</para> 68 69 <screen><userinput>make install</userinput></screen> 70 71 <para>Some packages expect the C PreProcessor to be installed in the 72 <filename>/lib</filename> directory. 73 To honor those packages, create this symlink:</para> 74 75 <screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen> 76 77 <para>Many packages use the name <userinput>cc</userinput> to call the C 78 compiler. To satisfy those packages, create a symlink:</para> 79 80 <screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen> 81 82 <note><para>At this point it is strongly recommended to repeat the sanity check 83 we performed earlier in this chapter. Refer back to 84 <xref linkend="ch06-adjustingtoolchain"/> and repeat the check. If the results 85 are wrong, then most likely you erroneously applied the GCC Specs patch from 86 Chapter 5.</para></note> 87 88 </sect2> 11 89 12 90 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.