source: BOOK/final-system/common/gcc.xml@ dab54f4

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since dab54f4 was 093d06d, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Command fixes.

  • Property mode set to 100644
File size: 7.9 KB
RevLine 
[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]39cd ../gcc-build</userinput></screen>
40
41 <para os="h">Prepare GCC for compilation:</para>
42
[093d06d]43<screen os="i"><userinput>CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include" \
44 CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
[8f513a6]45 ../gcc-&gcc-version;/configure --prefix=/usr \
[3f8be484]46 --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
47 --enable-__cxa_atexit --enable-c99 --enable-long-long \
[43f3140]48 --enable-clocale=gnu --enable-languages=c,c++ \
[a1a0762]49 --disable-multilib --disable-libstdcxx-pch</userinput></screen>
[3f8be484]50
[d55f00bc]51 <para os="j">Compile the package:</para>
[3f8be484]52
[f568131]53<screen os="k"><userinput>make</userinput></screen>
[3f8be484]54
[d55f00bc]55 <important os="l">
[121c48a]56 <para>The test suite for GCC is considered
[3f8be484]57 critical. Do not skip it under any circumstance.</para>
58 </important>
59
[d55f00bc]60 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]61
[d55f00bc]62<screen os="n"><userinput>make -k check</userinput></screen>
[3f8be484]63
[d55f00bc]64 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]65 run through to completion and not stop at the first failure. The GCC test
66 suite is very comprehensive and is almost guaranteed to generate a few
67 failures. To receive a summary of the test suite results, run:</para>
68
[d55f00bc]69<screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]70
[d55f00bc]71 <para os="q">For only the summaries, pipe the output through
[3f8be484]72 <userinput>grep -A7 Summ</userinput>.</para>
73
74 <para os="r">A few unexpected failures cannot always be avoided. The
75 GCC developers are usually aware of these issues, but have not
[d55f00bc]76 resolved them yet.</para>
[3f8be484]77
78 <para os="s">Install the package:</para>
79
80<screen os="t"><userinput>make install</userinput></screen>
81
82 <para os="u">Some packages expect the C preprocessor to be installed in the
83 <filename class="directory">/lib</filename> directory.
84 To support those packages, create this symlink:</para>
85
[94e6142]86<screen os="v"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]87
88 <para os="w">Many packages use the name <command>cc</command> to call the C
89 compiler. To satisfy those packages, create a symlink:</para>
90
[94e6142]91<screen os="x"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]92
93 </sect2>
94
95 <sect2 id="contents-gcc" role="content">
96 <title>Contents of GCC</title>
97
98 <segmentedlist>
99 <segtitle>Installed programs</segtitle>
100 <segtitle>Installed libraries</segtitle>
101
102 <seglistitem>
103 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
[9324199]104 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libgomp.[a,so], libmudflap.[a,so],
105 libmudflapth.[a,so], libssp.[a,so], libstdc++.[a,so], and
[3f8be484]106 libsupc++.a</seg>
107 </seglistitem>
108 </segmentedlist>
109
110 <variablelist>
111 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
112 <?dbfo list-presentation="list"?>
113 <?dbhtml list-presentation="table"?>
114
115 <varlistentry id="cc">
116 <term><command>cc</command></term>
117 <listitem>
118 <para>The C compiler</para>
119 <indexterm zone="ch-system-gcc cc">
120 <primary sortas="b-cc">cc</primary>
121 </indexterm>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry id="cpp">
126 <term><command>cpp</command></term>
127 <listitem>
128 <para>The C preprocessor; it is used by the compiler to expand the
129 #include, #define, and similar statements in the source files</para>
130 <indexterm zone="ch-system-gcc cpp">
131 <primary sortas="b-cpp">cpp</primary>
132 </indexterm>
133 </listitem>
134 </varlistentry>
135
136 <varlistentry id="c">
137 <term><command>c++</command></term>
138 <listitem>
139 <para>The C++ compiler</para>
140 <indexterm zone="ch-system-gcc c">
141 <primary sortas="b-c++">c++</primary>
142 </indexterm>
143 </listitem>
144 </varlistentry>
145
146 <varlistentry id="g">
147 <term><command>g++</command></term>
148 <listitem>
149 <para>The C++ compiler</para>
150 <indexterm zone="ch-system-gcc g">
151 <primary sortas="b-g++">g++</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="gcc">
157 <term><command>gcc</command></term>
158 <listitem>
159 <para>The C compiler</para>
160 <indexterm zone="ch-system-gcc gcc">
161 <primary sortas="b-gcc">gcc</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="gccbug">
167 <term><command>gccbug</command></term>
168 <listitem>
169 <para>A shell script used to help create useful bug reports</para>
170 <indexterm zone="ch-system-gcc gccbug">
171 <primary sortas="b-gccbug">gccbug</primary>
172 </indexterm>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry id="gcov">
177 <term><command>gcov</command></term>
178 <listitem>
179 <para>A coverage testing tool; it is used to analyze programs to
180 determine where optimizations will have the most effect</para>
181 <indexterm zone="ch-system-gcc gcov">
182 <primary sortas="b-gcov">gcov</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="libgcc">
188 <term><filename class="libraryfile">libgcc</filename></term>
189 <listitem>
190 <para>Contains run-time support for <command>gcc</command></para>
191 <indexterm zone="ch-system-gcc libgcc">
192 <primary sortas="c-libgcc*">libgcc*</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
[12a457e]197 <varlistentry id="libmudflap">
198 <term><filename class="libraryfile">libmudflap</filename></term>
199 <listitem>
200 <para>The libmudflap libraries are used by GCC for instrumenting
[3bec8f3]201 pointer and array dereferencing operations.</para>
[12a457e]202 <indexterm zone="ch-system-gcc libmudflap">
203 <primary sortas="c-libmudflap*">libmudflap*</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
[3f8be484]208 <varlistentry id="libstdc">
209 <term><filename class="libraryfile">libstdc++</filename></term>
210 <listitem>
211 <para>The standard C++ library</para>
212 <indexterm zone="ch-system-gcc libstdc">
213 <primary sortas="c-libstdc++">libstdc++</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="libsupc">
219 <term><filename class="libraryfile">libsupc++</filename></term>
220 <listitem>
221 <para>Provides supporting routines for the C++ programming
222 language</para>
223 <indexterm zone="ch-system-gcc libsupc">
224 <primary sortas="c-libsupc++">libsupc++</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 </variablelist>
230
231 </sect2>
232
233</sect1>
Note: See TracBrowser for help on using the repository browser.