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

sysvinit
Last change on this file since 27597ad was c02c97a, checked in by Chris Staub <chris@…>, 10 years ago

Spelling fix

  • Property mode set to 100644
File size: 13.1 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
[24b004c]28 <para os="p1">The following patch contains a number of updates to the
[cc858ed]29 &gcc-version; branch by the GCC developers:</para>
30
31 <screen os="p2"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
32
[c02c97a]33 <para os="fix1">Apply a <command>sed</command> substitution that will
[7327f1f]34 suppress the execution of the <command>fixincludes</command> script:</para>
35
[aaa3150]36<screen os="fix2"><userinput>sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in</userinput></screen>
[7327f1f]37
[3f8be484]38 <para os="f">The GCC documentation recommends building GCC outside of the source
39 directory in a dedicated build directory:</para>
40
[94e6142]41<screen os="g"><userinput>mkdir -v ../gcc-build
[3f8be484]42cd ../gcc-build</userinput></screen>
43
44 <para os="h">Prepare GCC for compilation:</para>
45
[ab871d9]46<screen os="i"><userinput>SED=sed CC="gcc -isystem /usr/include" \
[b6831b6]47CXX="g++ -isystem /usr/include" \
48LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib" \
49 ../gcc-&gcc-version;/configure --prefix=/usr \
[1dcf44d]50 --libexecdir=/usr/lib --enable-threads=posix \
51 --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ \
[84b164e]52 --disable-multilib --disable-libstdcxx-pch \
[0b89da6]53 --with-system-zlib --enable-checking=release --enable-libstdcxx-time</userinput></screen>
[3f8be484]54
[9b4baca]55 <variablelist os="i1">
56 <title>The meaning of the new configure option:</title>
57
58 <varlistentry>
59 <term><parameter>SED=sed</parameter></term>
60 <listitem>
61 <para>This prevents a hard-coded path to
62 <filename>/tools/bin/sed</filename> in the <command>fixincl</command>
63 program.</para>
64 </listitem>
65 </varlistentry>
66
67 </variablelist>
68
[d55f00bc]69 <para os="j">Compile the package:</para>
[3f8be484]70
[f568131]71<screen os="k"><userinput>make</userinput></screen>
[3f8be484]72
[d55f00bc]73 <important os="l">
[eb21c92]74 <para>Due to GCC's critical role in a properly functioning system,
75 the CLFS developers strongly recommend running the testsuite.</para>
[3f8be484]76 </important>
77
[16fb2c3c]78 <para os="s1">Increase the stack size prior to running the tests:</para>
79
80<screen os="s2"><userinput remap="test">ulimit -s 32768</userinput></screen>
81
[d55f00bc]82 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]83
[686839b]84<screen os="n"><userinput remap="test">make -k check</userinput></screen>
[3f8be484]85
[d55f00bc]86 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]87 run through to completion and not stop at the first failure. The GCC test
88 suite is very comprehensive and is almost guaranteed to generate a few
89 failures. To receive a summary of the test suite results, run:</para>
90
[686839b]91<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]92
[d55f00bc]93 <para os="q">For only the summaries, pipe the output through
[3f8be484]94 <userinput>grep -A7 Summ</userinput>.</para>
95
96 <para os="r">A few unexpected failures cannot always be avoided. The
97 GCC developers are usually aware of these issues, but have not
[d55f00bc]98 resolved them yet.</para>
[3f8be484]99
100 <para os="s">Install the package:</para>
101
102<screen os="t"><userinput>make install</userinput></screen>
103
[3d66e17]104 <para os="u">Install the <filename class="headerfile">libiberty</filename> header
105 file that is needed by some packages:</para>
106
107<screen os="v"><userinput>cp -v ../gcc-&gcc-version;/include/libiberty.h /usr/include</userinput></screen>
108
109 <para os="w">Some packages expect the C preprocessor to be installed in the
[3f8be484]110 <filename class="directory">/lib</filename> directory.
111 To support those packages, create this symlink:</para>
112
[3d66e17]113<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]114
[3d66e17]115 <para os="y">Many packages use the name <command>cc</command> to call the C
[3f8be484]116 compiler. To satisfy those packages, create a symlink:</para>
117
[3d66e17]118<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]119
[55581cc]120 <para os="aa">Finally, move a misplaced file:</para>
121
[2fc521b]122<screen os="ab"><userinput>mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
[55581cc]123
[3f8be484]124 </sect2>
125
126 <sect2 id="contents-gcc" role="content">
127 <title>Contents of GCC</title>
128
129 <segmentedlist>
130 <segtitle>Installed programs</segtitle>
131 <segtitle>Installed libraries</segtitle>
[61ad0b7f]132 <segtitle>Installed directories</segtitle>
[3f8be484]133
134 <seglistitem>
[c2102b28]135 <seg>c++, cc (link to gcc), cpp, g++, gcc, gcov</seg>
[c8a83d8]136 <seg>libasan.[a,so], libatomic.[a,so], libgcc.a, libgcc_eh.a, libgcc_s.so, libgcov.a,
137 libgomp.[a,so], libiberty.a, libitm.[a,so], liblto_plugin.so, libmudflap.[a,so], libmudflapth.[a,so],
[c2102b28]138 libquadmath.[a,so], libssp.[a,so], libssp_nonshared.a, libstdc++.[a,so], libsupc++.a,
[3d66e17]139 libtsan.[a,so]</seg>
[2b220db9]140 <seg>/usr/include/c++, /usr/lib/gcc, /usr/share/gcc-&gcc-version;</seg>
[3f8be484]141 </seglistitem>
142 </segmentedlist>
143
144 <variablelist>
145 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
146 <?dbfo list-presentation="list"?>
147 <?dbhtml list-presentation="table"?>
148
149 <varlistentry id="cc">
150 <term><command>cc</command></term>
151 <listitem>
152 <para>The C compiler</para>
153 <indexterm zone="ch-system-gcc cc">
154 <primary sortas="b-cc">cc</primary>
155 </indexterm>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry id="cpp">
160 <term><command>cpp</command></term>
161 <listitem>
162 <para>The C preprocessor; it is used by the compiler to expand the
163 #include, #define, and similar statements in the source files</para>
164 <indexterm zone="ch-system-gcc cpp">
165 <primary sortas="b-cpp">cpp</primary>
166 </indexterm>
167 </listitem>
168 </varlistentry>
169
170 <varlistentry id="c">
171 <term><command>c++</command></term>
172 <listitem>
173 <para>The C++ compiler</para>
174 <indexterm zone="ch-system-gcc c">
175 <primary sortas="b-c++">c++</primary>
176 </indexterm>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry id="g">
181 <term><command>g++</command></term>
182 <listitem>
183 <para>The C++ compiler</para>
184 <indexterm zone="ch-system-gcc g">
185 <primary sortas="b-g++">g++</primary>
186 </indexterm>
187 </listitem>
188 </varlistentry>
189
190 <varlistentry id="gcc">
191 <term><command>gcc</command></term>
192 <listitem>
193 <para>The C compiler</para>
194 <indexterm zone="ch-system-gcc gcc">
195 <primary sortas="b-gcc">gcc</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="gcov">
201 <term><command>gcov</command></term>
202 <listitem>
203 <para>A coverage testing tool; it is used to analyze programs to
204 determine where optimizations will have the most effect</para>
205 <indexterm zone="ch-system-gcc gcov">
206 <primary sortas="b-gcov">gcov</primary>
207 </indexterm>
208 </listitem>
209 </varlistentry>
210
[01aa1cc]211 <varlistentry id="libasan">
212 <term><filename class="libraryfile">libasan</filename></term>
213 <listitem>
214 <para>The Address Sanitizer runtime library</para>
215 <indexterm zone="ch-system-gcc libasan">
216 <primary sortas="c-libasan">libasan</primary>
217 </indexterm>
218 </listitem>
219 </varlistentry>
220
[d1f79ab]221 <varlistentry id="libatomic">
222 <term><filename class="libraryfile">libatomic</filename></term>
223 <listitem>
224 <para>A GCC support runtime library for atomic operations not
225 supported by hardware</para>
226 <indexterm zone="ch-system-gcc libatomic">
227 <primary sortas="c-libatomic*">libatomic*</primary>
228 </indexterm>
229 </listitem>
230 </varlistentry>
231
[3f8be484]232 <varlistentry id="libgcc">
233 <term><filename class="libraryfile">libgcc</filename></term>
234 <listitem>
235 <para>Contains run-time support for <command>gcc</command></para>
236 <indexterm zone="ch-system-gcc libgcc">
237 <primary sortas="c-libgcc*">libgcc*</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
[2cca6fd]242 <varlistentry id="libgcov">
243 <term><filename class="libraryfile">libgcov</filename></term>
244 <listitem>
245 <para>Library that is linked into a program when
246 <command>gcc</command> is instructed to enable profiling</para>
247 <indexterm zone="ch-system-gcc libgcov">
248 <primary sortas="c-libgcov">libgcov</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
[188b6b2]253 <varlistentry id="libgomp">
254 <term><filename class="libraryfile">libgomp</filename></term>
255 <listitem>
256 <para>GNU implementation of the OpenMP API for multi-platform
257 shared-memory parallel programming in C/C++ and Fortran</para>
258 <indexterm zone="ch-system-gcc libgomp">
259 <primary sortas="c-libgomp">libgomp</primary>
260 </indexterm>
261 </listitem>
[3d66e17]262 </varlistentry>
263
264 <varlistentry id="libiberty">
265 <term><filename class="libraryfile">libiberty</filename></term>
266 <listitem>
267 <para>Contains routines used by various GNU programs, including
268 <command>getopt</command>, <command>obstack</command>,
269 <command>strerror</command>, <command>strtol</command>, and
270 <command>strtoul</command></para>
271 <indexterm zone="ch-system-gcc libiberty">
272 <primary sortas="c-libiberty">libiberty</primary>
273 </indexterm>
274 </listitem>
[188b6b2]275 </varlistentry>
276
[d1f79ab]277 <varlistentry id="libitm">
278 <term><filename class="libraryfile">libitm</filename></term>
279 <listitem>
280 <para>The GNU Transactional Memory Library, which provides
281 transaction support for accesses to a process's memory</para>
282 <indexterm zone="ch-system-gcc libitm">
283 <primary sortas="c-libitm*">libitm*</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="liblto_plugin">
289 <term><filename class="libraryfile">liblto_plugin</filename></term>
290 <listitem>
291 <para>Runtime library for GCC's link-time optimization plugin</para>
292 <indexterm zone="ch-system-gcc liblto_plugin">
293 <primary sortas="c-liblto_plugin">liblto_plugin</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
[12a457e]298 <varlistentry id="libmudflap">
299 <term><filename class="libraryfile">libmudflap</filename></term>
300 <listitem>
301 <para>The libmudflap libraries are used by GCC for instrumenting
[3bec8f3]302 pointer and array dereferencing operations.</para>
[12a457e]303 <indexterm zone="ch-system-gcc libmudflap">
304 <primary sortas="c-libmudflap*">libmudflap*</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
[d1f79ab]309 <varlistentry id="libquadmath">
310 <term><filename class="libraryfile">libquadmath</filename></term>
311 <listitem>
312 <para>The GCC Quad-Precision Math Libarary API</para>
313 <indexterm zone="ch-system-gcc libquadmath">
314 <primary sortas="c-libquadmath*">libquadmath*</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
[188b6b2]319 <varlistentry id="libssp">
320 <term><filename class="libraryfile">libssp</filename></term>
321 <listitem>
322 <para>Contains routines supporting GCC's stack-smashing protection
323 functionality</para>
324 <indexterm zone="ch-system-gcc libssp">
325 <primary sortas="c-libssp*">libssp*</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
[3f8be484]330 <varlistentry id="libstdc">
331 <term><filename class="libraryfile">libstdc++</filename></term>
332 <listitem>
333 <para>The standard C++ library</para>
334 <indexterm zone="ch-system-gcc libstdc">
335 <primary sortas="c-libstdc++">libstdc++</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="libsupc">
341 <term><filename class="libraryfile">libsupc++</filename></term>
342 <listitem>
343 <para>Provides supporting routines for the C++ programming
344 language</para>
345 <indexterm zone="ch-system-gcc libsupc">
346 <primary sortas="c-libsupc++">libsupc++</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
[8c09b88]351 <varlistentry id="libtsan">
352 <term><filename class="libraryfile">libtsan</filename></term>
353 <listitem>
354 <para>The Thread Sanitizer runtime library</para>
355 <indexterm zone="ch-system-gcc libtsan">
356 <primary sortas="c-libtsan">libtsan</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
[3f8be484]361 </variablelist>
362
363 </sect2>
364
365</sect1>
Note: See TracBrowser for help on using the repository browser.