Changeset ef13657 for chapter06/gcc.xml
- Timestamp:
- 08/08/2004 02:11:09 AM (20 years ago)
- Branches:
- 6.0
- Children:
- 5ba3d1d
- Parents:
- 6e41459
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/gcc.xml
r6e41459 ref13657 30 30 <title>Installation of GCC</title> 31 31 32 <para>This package is known to behave badly when you have changed its 33 default optimization flags (including the <parameter>-march</parameter> and <parameter>-mcpu</parameter> options). 34 Therefore, if you have defined any environment variables that override 35 default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting 36 or modifying them when building GCC.</para> 32 <para>This package is known to have issues when its default 33 optimization flags (including the <parameter>-march</parameter> and 34 <parameter>-mcpu</parameter> options) are changed. If any environment 35 variables that override default optimizations have been defined, such 36 as <emphasis>CFLAGS</emphasis> and <emphasis>CXXFLAGS</emphasis>, 37 unset or modifying them when building Binutils.</para> 37 38 38 <para>Unpack the GCC-core <emphasis>and</emphasis> the GCC-g++ tarball -- they39 will unfold into the same directory. You should likewise extract the40 GCC-testsuite package. The full GCC package contains even more 41 compilers. Instructions for building these can be found at 42 <ulinkurl="&blfs-root;view/stable/general/gcc.html"/>.</para>39 <para>Unpack both the gcc-core and the gcc-g++ tarballs -- they will 40 unpack into the same directory. Likewise, extract the gcc-testsuite 41 package. The full GCC package contains additional compilers. 42 Instructions for building these can be found at <ulink 43 url="&blfs-root;view/stable/general/gcc.html"/>.</para> 43 44 44 <para> First apply only the No-Fixincludes patch (and <emphasis>not</emphasis>45 the Specs patch) alsoused in the previous chapter:</para>45 <para>Apply only the No-Fixincludes patch (not the Specs patch) also 46 used in the previous chapter:</para> 46 47 47 48 <screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch</userinput></screen> 48 49 49 <para>Now apply a sed substitution that will suppress the installation of 50 <filename class="libraryfile">libiberty.a</filename>. We want to use the version of 51 <filename class="libraryfile">libiberty.a</filename> provided by Binutils:</para> 50 <para>Apply a sed substitution that will suppress the installation of 51 <filename class="libraryfile">libiberty.a</filename>. The version of 52 <filename class="libraryfile">libiberty.a</filename> provided by 53 Binutils will be used instead:</para> 52 54 53 55 <screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen> … … 70 72 71 73 <important><para>The test suite for GCC in this section is considered 72 <emphasis>critical</emphasis>. Our advice is to not skip it under any 73 circumstance.</para></important> 74 critical. Do not skip it under any circumstance.</para></important> 74 75 75 <para>Test the results, but don't stop at errors (you'll remember the few 76 known ones):</para> 76 <para>Test the results, but don't stop at errors:</para> 77 77 78 78 <screen><userinput>make -k check</userinput></screen> 79 79 80 <para>The test suite notes from <xref linkend="ch-tools-gcc-pass2"/> are still very 81 much appropriate here. Be sure to refer back there should you have any 82 doubts.</para> 80 <para>Some of the errors are known issues and were noted in the 81 previous chapter. The test suite notes from <xref 82 linkend="ch-tools-gcc-pass2"/> are still relevant here. Be sure to 83 refer back to them as necessary.</para> 83 84 84 <para> Nowinstall the package:</para>85 <para>Iinstall the package:</para> 85 86 86 87 <screen><userinput>make install</userinput></screen> … … 97 98 <screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen> 98 99 99 <note><para>At this point it is strongly recommended to repeat the sanity check 100 we performed earlier in this chapter. Refer back to 101 <xref linkend="ch-system-readjusting"/> and repeat the check. If the results 102 are wrong, then most likely you erroneously applied the GCC Specs patch from 103 <xref linkend="chapter-temporary-tools"/>.</para></note> 100 <note><para>At this point it is strongly recommended to repeat the 101 sanity check we performed earlier in this chapter. Refer back to <xref 102 linkend="ch-system-readjusting"/> and repeat the check. If the results 103 are in error, then the most likely reason is that the GCC Specs patch 104 from <xref linkend="chapter-temporary-tools"/> was erroneously applied 105 here.</para></note> 104 106 105 107 </sect2> … … 122 124 <listitem> 123 125 <indexterm zone="ch-system-gcc cpp"><primary sortas="b-cpp">cpp</primary></indexterm> 124 <para> is the C preprocessor. It is used by the compiler to have the #include and125 # define and such statements expandedin the source files.</para>126 <para>the C preprocessor. It is used by the compiler expand the 127 #include, #define, and similar statements in the source files.</para> 126 128 </listitem> 127 129 </varlistentry> … … 131 133 <listitem> 132 134 <indexterm zone="ch-system-gcc g"><primary sortas="b-g++">g++</primary></indexterm> 133 <para> isthe C++ compiler.</para>135 <para>the C++ compiler.</para> 134 136 </listitem> 135 137 </varlistentry> … … 139 141 <listitem> 140 142 <indexterm zone="ch-system-gcc gcc"><primary sortas="b-gcc">gcc</primary></indexterm> 141 <para>is the C compiler. It is used to translate 142 the source code of a program into assembly code.</para> 143 <para>the C compiler.</para> 143 144 </listitem> 144 145 </varlistentry> … … 148 149 <listitem> 149 150 <indexterm zone="ch-system-gcc gccbug"><primary sortas="b-gccbug">gccbug</primary></indexterm> 150 <para> is a shell script used to help create goodbug reports.</para>151 <para>a shell script used to help create useful bug reports.</para> 151 152 </listitem> 152 153 </varlistentry> … … 156 157 <listitem> 157 158 <indexterm zone="ch-system-gcc gcov"><primary sortas="b-gcov">gcov</primary></indexterm> 158 <para> is a coverage testing tool. It is usedto159 analyze programs to find outwhere optimizations will have the most effect.</para>159 <para>a coverage testing tool. It is used to analyze programs to 160 determine where optimizations will have the most effect.</para> 160 161 </listitem> 161 162 </varlistentry> … … 173 174 <listitem> 174 175 <indexterm zone="ch-system-gcc libstdc"><primary sortas="c-libstdc++">libstdc++</primary></indexterm> 175 <para> is the standard C++ library. It contains many frequently-used functions.</para>176 <para>the standard C++ library.</para> 176 177 </listitem> 177 178 </varlistentry> … … 189 190 190 191 </sect1> 192
Note:
See TracChangeset
for help on using the changeset viewer.