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

systemd
Last change on this file since f6853e3 was f6853e3, checked in by William Harrington <kb0iic@…>, 5 years ago

Update GCC 5.2.0 from GCC 4.8.0.

  • Property mode set to 100644
File size: 14.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
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="p1">The following patch contains a number of updates to the
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
33    <para os="fix1">Apply a <command>sed</command> substitution that will
34    suppress the execution of the <command>fixincludes</command> script:</para>
35
36<screen os="fix2"><userinput>sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in</userinput></screen>
37
38    <para os="f">The GCC documentation recommends building GCC outside of the source
39    directory in a dedicated build directory:</para>
40
41<screen os="g"><userinput>mkdir -v ../gcc-build
42cd ../gcc-build</userinput></screen>
43
44    <para os="h">Prepare GCC for compilation:</para>
45
46<screen os="i"><userinput>SED=sed CC="gcc -isystem /usr/include" \
47CXX="g++ -isystem /usr/include" \
48LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib" \
49  ../gcc-&gcc-version;/configure --prefix=/usr \
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>
53
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
68    <para os="j">Compile the package:</para>
69
70<screen os="k"><userinput>make</userinput></screen>
71
72    <important os="l">
73      <para>Due to GCC's critical role in a properly functioning system,
74      the CLFS developers strongly recommend running the testsuite.</para>
75    </important>
76
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
81    <para os="m">Test the results, but do not stop at errors:</para>
82
83<screen os="n"><userinput remap="test">make -k check</userinput></screen>
84
85    <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
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
90<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
91
92    <para os="q">For only the summaries, pipe the output through
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
97    resolved them yet.</para>
98
99    <para os="s">Install the package:</para>
100
101<screen os="t"><userinput>make install</userinput></screen>
102
103    <para os="w">Create a link to satisfy FHS requirements:</para>
104
105<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
106
107    <para os="y">Many packages use the name <command>cc</command> to call the C
108    compiler. To satisfy those packages, create a symlink:</para>
109
110<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
111
112    <para os="aa">Finally, move a misplaced file:</para>
113
114<screen os="ab"><userinput>mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
115
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>
124      <segtitle>Installed directories</segtitle>
125
126      <seglistitem>
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>
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
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
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
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">
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>
253          </indexterm>
254        </listitem>
255      </varlistentry>
256
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
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
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>
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>
300      </varlistentry>
301
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
313      <varlistentry id="liblsan">
314        <term><filename class="libraryfile">liblsan</filename></term>
315        <listitem>
316          <para>The Leak Sanitizer runtime library</para>
317          <indexterm zone="ch-system-gcc liblsan">
318            <primary sortas="c-liblsan">liblsan</primary>
319          </indexterm>
320        </listitem>
321      </varlistentry>
322
323      <varlistentry id="liblto_plugin">
324        <term><filename class="libraryfile">liblto_plugin</filename></term>
325        <listitem>
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>
329          </indexterm>
330        </listitem>
331      </varlistentry>
332
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
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
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
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
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
405    </variablelist>
406
407  </sect2>
408
409</sect1>
Note: See TracBrowser for help on using the repository browser.