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

sysvinit
Last change on this file since 715d370d was cc49a21, checked in by William Harrington <kb0iic@…>, 9 years ago

Update GCC 5.2.0 from GCC 4.8.0.

  • Property mode set to 100644
File size: 14.4 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 \
[cc49a21]50 --libexecdir=/usr/lib --enable-languages=c,c++ \
51 --disable-multilib --disable-libstdcxx-pch --with-system-zlib \
52 --enable-install-libiberty --disable-bootstrap</userinput></screen>
[3f8be484]53
[9b4baca]54 <variablelist os="i1">
55 <title>The meaning of the new configure option:</title>
56
57 <varlistentry>
58 <term><parameter>SED=sed</parameter></term>
59 <listitem>
60 <para>This prevents a hard-coded path to
61 <filename>/tools/bin/sed</filename> in the <command>fixincl</command>
62 program.</para>
63 </listitem>
64 </varlistentry>
65
66 </variablelist>
67
[d55f00bc]68 <para os="j">Compile the package:</para>
[3f8be484]69
[f568131]70<screen os="k"><userinput>make</userinput></screen>
[3f8be484]71
[d55f00bc]72 <important os="l">
[eb21c92]73 <para>Due to GCC's critical role in a properly functioning system,
74 the CLFS developers strongly recommend running the testsuite.</para>
[3f8be484]75 </important>
76
[16fb2c3c]77 <para os="s1">Increase the stack size prior to running the tests:</para>
78
79<screen os="s2"><userinput remap="test">ulimit -s 32768</userinput></screen>
80
[d55f00bc]81 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]82
[686839b]83<screen os="n"><userinput remap="test">make -k check</userinput></screen>
[3f8be484]84
[d55f00bc]85 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]86 run through to completion and not stop at the first failure. The GCC test
87 suite is very comprehensive and is almost guaranteed to generate a few
88 failures. To receive a summary of the test suite results, run:</para>
89
[686839b]90<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]91
[d55f00bc]92 <para os="q">For only the summaries, pipe the output through
[3f8be484]93 <userinput>grep -A7 Summ</userinput>.</para>
94
95 <para os="r">A few unexpected failures cannot always be avoided. The
96 GCC developers are usually aware of these issues, but have not
[d55f00bc]97 resolved them yet.</para>
[3f8be484]98
99 <para os="s">Install the package:</para>
100
101<screen os="t"><userinput>make install</userinput></screen>
102
[cc49a21]103 <para os="w">Create a link to satisfy FHS requirements:</para>
[3f8be484]104
[3d66e17]105<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]106
[3d66e17]107 <para os="y">Many packages use the name <command>cc</command> to call the C
[3f8be484]108 compiler. To satisfy those packages, create a symlink:</para>
109
[3d66e17]110<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]111
[55581cc]112 <para os="aa">Finally, move a misplaced file:</para>
113
[2fc521b]114<screen os="ab"><userinput>mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
[55581cc]115
[3f8be484]116 </sect2>
117
118 <sect2 id="contents-gcc" role="content">
119 <title>Contents of GCC</title>
120
121 <segmentedlist>
122 <segtitle>Installed programs</segtitle>
123 <segtitle>Installed libraries</segtitle>
[61ad0b7f]124 <segtitle>Installed directories</segtitle>
[3f8be484]125
126 <seglistitem>
[cc49a21]127 <seg>c++, cc (link to gcc), cpp, g++, gcc, gcov, gcov-tool</seg>
128 <seg>libasan.[a,so], libatomic.[a,so], libcc1.so, libcilkrts.[a,so],
129 libgcc.a, libgcc_eh.a, libgcc_s.so, libgcov.a, libgomp.[a,so],
130 libiberty.a, libitm.[a,so], liblsan.[a,so], liblto_plugin.so,
131 libquadmath.[a,so], libssp.[a,so], libssp_nonshared.a,
132 libstdc++.[a,so], libsupc++.a, libtsan.[a,so], libubsan.[a,so],
133 libvtv.[a,so]</seg>
134 <seg>/usr/include/[c++,libiberty], /usr/lib/gcc,
135 /usr/share/gcc-&gcc-version;</seg>
[3f8be484]136 </seglistitem>
137 </segmentedlist>
138
139 <variablelist>
140 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
141 <?dbfo list-presentation="list"?>
142 <?dbhtml list-presentation="table"?>
143
144 <varlistentry id="cc">
145 <term><command>cc</command></term>
146 <listitem>
147 <para>The C compiler</para>
148 <indexterm zone="ch-system-gcc cc">
149 <primary sortas="b-cc">cc</primary>
150 </indexterm>
151 </listitem>
152 </varlistentry>
153
154 <varlistentry id="cpp">
155 <term><command>cpp</command></term>
156 <listitem>
157 <para>The C preprocessor; it is used by the compiler to expand the
158 #include, #define, and similar statements in the source files</para>
159 <indexterm zone="ch-system-gcc cpp">
160 <primary sortas="b-cpp">cpp</primary>
161 </indexterm>
162 </listitem>
163 </varlistentry>
164
165 <varlistentry id="c">
166 <term><command>c++</command></term>
167 <listitem>
168 <para>The C++ compiler</para>
169 <indexterm zone="ch-system-gcc c">
170 <primary sortas="b-c++">c++</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="g">
176 <term><command>g++</command></term>
177 <listitem>
178 <para>The C++ compiler</para>
179 <indexterm zone="ch-system-gcc g">
180 <primary sortas="b-g++">g++</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="gcc">
186 <term><command>gcc</command></term>
187 <listitem>
188 <para>The C compiler</para>
189 <indexterm zone="ch-system-gcc gcc">
190 <primary sortas="b-gcc">gcc</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="gcov">
196 <term><command>gcov</command></term>
197 <listitem>
198 <para>A coverage testing tool; it is used to analyze programs to
199 determine where optimizations will have the most effect</para>
200 <indexterm zone="ch-system-gcc gcov">
201 <primary sortas="b-gcov">gcov</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
[cc49a21]206 <varlistentry id="gcovtool">
207 <term><command>gcov-tool</command></term>
208 <listitem>
209 <para>An offline tool to handle gcda counts</para>
210 <indexterm zone="ch-system-gcc gcovtool">
211 <primary sortas="b-gcov-tool">gcov-tool</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
[01aa1cc]216 <varlistentry id="libasan">
217 <term><filename class="libraryfile">libasan</filename></term>
218 <listitem>
219 <para>The Address Sanitizer runtime library</para>
220 <indexterm zone="ch-system-gcc libasan">
221 <primary sortas="c-libasan">libasan</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
[d1f79ab]226 <varlistentry id="libatomic">
227 <term><filename class="libraryfile">libatomic</filename></term>
228 <listitem>
229 <para>A GCC support runtime library for atomic operations not
230 supported by hardware</para>
231 <indexterm zone="ch-system-gcc libatomic">
[cc49a21]232 <primary sortas="c-libatomic">libatomic</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="libcc1">
238 <term><filename class="libraryfile">libcc1</filename></term>
239 <listitem>
240 <para>Translates API into RPC calls</para>
241 <indexterm zone="ch-system-gcc libcc1">
242 <primary sortas="c-libcc1">libcc1</primary>
243 </indexterm>
244 </listitem>
245 </varlistentry>
246
247 <varlistentry id="libcilkrts">
248 <term><filename class="libraryfile">libcilkrts</filename></term>
249 <listitem>
250 <para>Intel&reg; Cilk&trade; Plus runtime library</para>
251 <indexterm zone="ch-system-gcc libcilkrts">
252 <primary sortas="c-libcilkrts">libcilkrts</primary>
[d1f79ab]253 </indexterm>
254 </listitem>
255 </varlistentry>
256
[3f8be484]257 <varlistentry id="libgcc">
258 <term><filename class="libraryfile">libgcc</filename></term>
259 <listitem>
260 <para>Contains run-time support for <command>gcc</command></para>
261 <indexterm zone="ch-system-gcc libgcc">
262 <primary sortas="c-libgcc*">libgcc*</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
[2cca6fd]267 <varlistentry id="libgcov">
268 <term><filename class="libraryfile">libgcov</filename></term>
269 <listitem>
270 <para>Library that is linked into a program when
271 <command>gcc</command> is instructed to enable profiling</para>
272 <indexterm zone="ch-system-gcc libgcov">
273 <primary sortas="c-libgcov">libgcov</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
[188b6b2]278 <varlistentry id="libgomp">
279 <term><filename class="libraryfile">libgomp</filename></term>
280 <listitem>
281 <para>GNU implementation of the OpenMP API for multi-platform
282 shared-memory parallel programming in C/C++ and Fortran</para>
283 <indexterm zone="ch-system-gcc libgomp">
284 <primary sortas="c-libgomp">libgomp</primary>
285 </indexterm>
286 </listitem>
[3d66e17]287 </varlistentry>
288
289 <varlistentry id="libiberty">
290 <term><filename class="libraryfile">libiberty</filename></term>
291 <listitem>
292 <para>Contains routines used by various GNU programs, including
293 <command>getopt</command>, <command>obstack</command>,
294 <command>strerror</command>, <command>strtol</command>, and
295 <command>strtoul</command></para>
296 <indexterm zone="ch-system-gcc libiberty">
297 <primary sortas="c-libiberty">libiberty</primary>
298 </indexterm>
299 </listitem>
[188b6b2]300 </varlistentry>
301
[d1f79ab]302 <varlistentry id="libitm">
303 <term><filename class="libraryfile">libitm</filename></term>
304 <listitem>
305 <para>The GNU Transactional Memory Library, which provides
306 transaction support for accesses to a process's memory</para>
307 <indexterm zone="ch-system-gcc libitm">
308 <primary sortas="c-libitm*">libitm*</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
[cc49a21]313 <varlistentry id="liblsan">
314 <term><filename class="libraryfile">liblsan</filename></term>
[d1f79ab]315 <listitem>
[cc49a21]316 <para>The Leak Sanitizer runtime library</para>
317 <indexterm zone="ch-system-gcc liblsan">
318 <primary sortas="c-liblsan">liblsan</primary>
[d1f79ab]319 </indexterm>
320 </listitem>
321 </varlistentry>
322
[cc49a21]323 <varlistentry id="liblto_plugin">
324 <term><filename class="libraryfile">liblto_plugin</filename></term>
[12a457e]325 <listitem>
[cc49a21]326 <para>Runtime library for GCC's link-time optimization plugin</para>
327 <indexterm zone="ch-system-gcc liblto_plugin">
328 <primary sortas="c-liblto_plugin">liblto_plugin</primary>
[12a457e]329 </indexterm>
330 </listitem>
331 </varlistentry>
332
[d1f79ab]333 <varlistentry id="libquadmath">
334 <term><filename class="libraryfile">libquadmath</filename></term>
335 <listitem>
336 <para>The GCC Quad-Precision Math Libarary API</para>
337 <indexterm zone="ch-system-gcc libquadmath">
338 <primary sortas="c-libquadmath*">libquadmath*</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
[188b6b2]343 <varlistentry id="libssp">
344 <term><filename class="libraryfile">libssp</filename></term>
345 <listitem>
346 <para>Contains routines supporting GCC's stack-smashing protection
347 functionality</para>
348 <indexterm zone="ch-system-gcc libssp">
349 <primary sortas="c-libssp*">libssp*</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
[3f8be484]354 <varlistentry id="libstdc">
355 <term><filename class="libraryfile">libstdc++</filename></term>
356 <listitem>
357 <para>The standard C++ library</para>
358 <indexterm zone="ch-system-gcc libstdc">
359 <primary sortas="c-libstdc++">libstdc++</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 <varlistentry id="libsupc">
365 <term><filename class="libraryfile">libsupc++</filename></term>
366 <listitem>
367 <para>Provides supporting routines for the C++ programming
368 language</para>
369 <indexterm zone="ch-system-gcc libsupc">
370 <primary sortas="c-libsupc++">libsupc++</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
[8c09b88]375 <varlistentry id="libtsan">
376 <term><filename class="libraryfile">libtsan</filename></term>
377 <listitem>
378 <para>The Thread Sanitizer runtime library</para>
379 <indexterm zone="ch-system-gcc libtsan">
380 <primary sortas="c-libtsan">libtsan</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[cc49a21]385 <varlistentry id="libubsan">
386 <term><filename class="libraryfile">libubsan</filename></term>
387 <listitem>
388 <para>The Undefined Beahvior Sanitizer runtime library</para>
389 <indexterm zone="ch-system-gcc libubsan">
390 <primary sortas="c-libubsan">libubsan</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="libvtv">
396 <term><filename class="libraryfile">libvtv</filename></term>
397 <listitem>
398 <para>The Virtual Table Verification runtime library</para>
399 <indexterm zone="ch-system-gcc libvtv">
400 <primary sortas="c-libvtv">libvtv</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
[3f8be484]405 </variablelist>
406
407 </sect2>
408
409</sect1>
Note: See TracBrowser for help on using the repository browser.