[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3f8be484] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-gcc" role="wrap">
|
---|
| 9 | <?dbhtml filename="gcc.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>GCC-&gcc-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-gcc">
|
---|
| 14 | <primary sortas="a-GCC">GCC</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The GCC package contains the GNU compiler collection, which includes
|
---|
| 21 | the C and C++ compilers.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="installation">
|
---|
| 26 | <title>Installation of GCC</title>
|
---|
| 27 |
|
---|
| 28 | <para os="d">Apply a <command>sed</command> substitution that will suppress the
|
---|
| 29 | installation of <filename class="libraryfile">libiberty.a</filename>. The
|
---|
| 30 | version of <filename class="libraryfile">libiberty.a</filename> provided by
|
---|
| 31 | Binutils will be used instead:</para>
|
---|
| 32 |
|
---|
| 33 | <screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
|
---|
| 34 |
|
---|
| 35 | <para os="f">The GCC documentation recommends building GCC outside of the source
|
---|
| 36 | directory in a dedicated build directory:</para>
|
---|
| 37 |
|
---|
[94e6142] | 38 | <screen os="g"><userinput>mkdir -v ../gcc-build
|
---|
[3f8be484] | 39 | cd ../gcc-build</userinput></screen>
|
---|
| 40 |
|
---|
| 41 | <para os="h">Prepare GCC for compilation:</para>
|
---|
| 42 |
|
---|
[d55f00bc] | 43 | <screen os="i"><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
|
---|
[3f8be484] | 44 | --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
|
---|
| 45 | --enable-__cxa_atexit --enable-c99 --enable-long-long \
|
---|
[43f3140] | 46 | --enable-clocale=gnu --enable-languages=c,c++ \
|
---|
[a1a0762] | 47 | --disable-multilib --disable-libstdcxx-pch</userinput></screen>
|
---|
[3f8be484] | 48 |
|
---|
[d55f00bc] | 49 | <para os="j">Compile the package:</para>
|
---|
[3f8be484] | 50 |
|
---|
[f568131] | 51 | <screen os="k"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 52 |
|
---|
[d55f00bc] | 53 | <important os="l">
|
---|
[121c48a] | 54 | <para>The test suite for GCC is considered
|
---|
[3f8be484] | 55 | critical. Do not skip it under any circumstance.</para>
|
---|
| 56 | </important>
|
---|
| 57 |
|
---|
[d55f00bc] | 58 | <para os="m">Test the results, but do not stop at errors:</para>
|
---|
[3f8be484] | 59 |
|
---|
[d55f00bc] | 60 | <screen os="n"><userinput>make -k check</userinput></screen>
|
---|
[3f8be484] | 61 |
|
---|
[d55f00bc] | 62 | <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
|
---|
[3f8be484] | 63 | run through to completion and not stop at the first failure. The GCC test
|
---|
| 64 | suite is very comprehensive and is almost guaranteed to generate a few
|
---|
| 65 | failures. To receive a summary of the test suite results, run:</para>
|
---|
| 66 |
|
---|
[d55f00bc] | 67 | <screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
|
---|
[3f8be484] | 68 |
|
---|
[d55f00bc] | 69 | <para os="q">For only the summaries, pipe the output through
|
---|
[3f8be484] | 70 | <userinput>grep -A7 Summ</userinput>.</para>
|
---|
| 71 |
|
---|
| 72 | <para os="r">A few unexpected failures cannot always be avoided. The
|
---|
| 73 | GCC developers are usually aware of these issues, but have not
|
---|
[d55f00bc] | 74 | resolved them yet.</para>
|
---|
[3f8be484] | 75 |
|
---|
| 76 | <para os="s">Install the package:</para>
|
---|
| 77 |
|
---|
| 78 | <screen os="t"><userinput>make install</userinput></screen>
|
---|
| 79 |
|
---|
| 80 | <para os="u">Some packages expect the C preprocessor to be installed in the
|
---|
| 81 | <filename class="directory">/lib</filename> directory.
|
---|
| 82 | To support those packages, create this symlink:</para>
|
---|
| 83 |
|
---|
[94e6142] | 84 | <screen os="v"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
|
---|
[3f8be484] | 85 |
|
---|
| 86 | <para os="w">Many packages use the name <command>cc</command> to call the C
|
---|
| 87 | compiler. To satisfy those packages, create a symlink:</para>
|
---|
| 88 |
|
---|
[94e6142] | 89 | <screen os="x"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
|
---|
[3f8be484] | 90 |
|
---|
| 91 | </sect2>
|
---|
| 92 |
|
---|
| 93 | <sect2 id="contents-gcc" role="content">
|
---|
| 94 | <title>Contents of GCC</title>
|
---|
| 95 |
|
---|
| 96 | <segmentedlist>
|
---|
| 97 | <segtitle>Installed programs</segtitle>
|
---|
| 98 | <segtitle>Installed libraries</segtitle>
|
---|
| 99 |
|
---|
| 100 | <seglistitem>
|
---|
| 101 | <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
|
---|
[9324199] | 102 | <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libgomp.[a,so], libmudflap.[a,so],
|
---|
| 103 | libmudflapth.[a,so], libssp.[a,so], libstdc++.[a,so], and
|
---|
[3f8be484] | 104 | libsupc++.a</seg>
|
---|
| 105 | </seglistitem>
|
---|
| 106 | </segmentedlist>
|
---|
| 107 |
|
---|
| 108 | <variablelist>
|
---|
| 109 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 110 | <?dbfo list-presentation="list"?>
|
---|
| 111 | <?dbhtml list-presentation="table"?>
|
---|
| 112 |
|
---|
| 113 | <varlistentry id="cc">
|
---|
| 114 | <term><command>cc</command></term>
|
---|
| 115 | <listitem>
|
---|
| 116 | <para>The C compiler</para>
|
---|
| 117 | <indexterm zone="ch-system-gcc cc">
|
---|
| 118 | <primary sortas="b-cc">cc</primary>
|
---|
| 119 | </indexterm>
|
---|
| 120 | </listitem>
|
---|
| 121 | </varlistentry>
|
---|
| 122 |
|
---|
| 123 | <varlistentry id="cpp">
|
---|
| 124 | <term><command>cpp</command></term>
|
---|
| 125 | <listitem>
|
---|
| 126 | <para>The C preprocessor; it is used by the compiler to expand the
|
---|
| 127 | #include, #define, and similar statements in the source files</para>
|
---|
| 128 | <indexterm zone="ch-system-gcc cpp">
|
---|
| 129 | <primary sortas="b-cpp">cpp</primary>
|
---|
| 130 | </indexterm>
|
---|
| 131 | </listitem>
|
---|
| 132 | </varlistentry>
|
---|
| 133 |
|
---|
| 134 | <varlistentry id="c">
|
---|
| 135 | <term><command>c++</command></term>
|
---|
| 136 | <listitem>
|
---|
| 137 | <para>The C++ compiler</para>
|
---|
| 138 | <indexterm zone="ch-system-gcc c">
|
---|
| 139 | <primary sortas="b-c++">c++</primary>
|
---|
| 140 | </indexterm>
|
---|
| 141 | </listitem>
|
---|
| 142 | </varlistentry>
|
---|
| 143 |
|
---|
| 144 | <varlistentry id="g">
|
---|
| 145 | <term><command>g++</command></term>
|
---|
| 146 | <listitem>
|
---|
| 147 | <para>The C++ compiler</para>
|
---|
| 148 | <indexterm zone="ch-system-gcc g">
|
---|
| 149 | <primary sortas="b-g++">g++</primary>
|
---|
| 150 | </indexterm>
|
---|
| 151 | </listitem>
|
---|
| 152 | </varlistentry>
|
---|
| 153 |
|
---|
| 154 | <varlistentry id="gcc">
|
---|
| 155 | <term><command>gcc</command></term>
|
---|
| 156 | <listitem>
|
---|
| 157 | <para>The C compiler</para>
|
---|
| 158 | <indexterm zone="ch-system-gcc gcc">
|
---|
| 159 | <primary sortas="b-gcc">gcc</primary>
|
---|
| 160 | </indexterm>
|
---|
| 161 | </listitem>
|
---|
| 162 | </varlistentry>
|
---|
| 163 |
|
---|
| 164 | <varlistentry id="gccbug">
|
---|
| 165 | <term><command>gccbug</command></term>
|
---|
| 166 | <listitem>
|
---|
| 167 | <para>A shell script used to help create useful bug reports</para>
|
---|
| 168 | <indexterm zone="ch-system-gcc gccbug">
|
---|
| 169 | <primary sortas="b-gccbug">gccbug</primary>
|
---|
| 170 | </indexterm>
|
---|
| 171 | </listitem>
|
---|
| 172 | </varlistentry>
|
---|
| 173 |
|
---|
| 174 | <varlistentry id="gcov">
|
---|
| 175 | <term><command>gcov</command></term>
|
---|
| 176 | <listitem>
|
---|
| 177 | <para>A coverage testing tool; it is used to analyze programs to
|
---|
| 178 | determine where optimizations will have the most effect</para>
|
---|
| 179 | <indexterm zone="ch-system-gcc gcov">
|
---|
| 180 | <primary sortas="b-gcov">gcov</primary>
|
---|
| 181 | </indexterm>
|
---|
| 182 | </listitem>
|
---|
| 183 | </varlistentry>
|
---|
| 184 |
|
---|
| 185 | <varlistentry id="libgcc">
|
---|
| 186 | <term><filename class="libraryfile">libgcc</filename></term>
|
---|
| 187 | <listitem>
|
---|
| 188 | <para>Contains run-time support for <command>gcc</command></para>
|
---|
| 189 | <indexterm zone="ch-system-gcc libgcc">
|
---|
| 190 | <primary sortas="c-libgcc*">libgcc*</primary>
|
---|
| 191 | </indexterm>
|
---|
| 192 | </listitem>
|
---|
| 193 | </varlistentry>
|
---|
| 194 |
|
---|
[12a457e] | 195 | <varlistentry id="libmudflap">
|
---|
| 196 | <term><filename class="libraryfile">libmudflap</filename></term>
|
---|
| 197 | <listitem>
|
---|
| 198 | <para>The libmudflap libraries are used by GCC for instrumenting
|
---|
[3bec8f3] | 199 | pointer and array dereferencing operations.</para>
|
---|
[12a457e] | 200 | <indexterm zone="ch-system-gcc libmudflap">
|
---|
| 201 | <primary sortas="c-libmudflap*">libmudflap*</primary>
|
---|
| 202 | </indexterm>
|
---|
| 203 | </listitem>
|
---|
| 204 | </varlistentry>
|
---|
| 205 |
|
---|
[3f8be484] | 206 | <varlistentry id="libstdc">
|
---|
| 207 | <term><filename class="libraryfile">libstdc++</filename></term>
|
---|
| 208 | <listitem>
|
---|
| 209 | <para>The standard C++ library</para>
|
---|
| 210 | <indexterm zone="ch-system-gcc libstdc">
|
---|
| 211 | <primary sortas="c-libstdc++">libstdc++</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
| 215 |
|
---|
| 216 | <varlistentry id="libsupc">
|
---|
| 217 | <term><filename class="libraryfile">libsupc++</filename></term>
|
---|
| 218 | <listitem>
|
---|
| 219 | <para>Provides supporting routines for the C++ programming
|
---|
| 220 | language</para>
|
---|
| 221 | <indexterm zone="ch-system-gcc libsupc">
|
---|
| 222 | <primary sortas="c-libsupc++">libsupc++</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | </variablelist>
|
---|
| 228 |
|
---|
| 229 | </sect2>
|
---|
| 230 |
|
---|
| 231 | </sect1>
|
---|