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

sysvinit
Last change on this file since b5657b7 was b27081c4, checked in by Chris Staub <chris@…>, 9 years ago

Put one configure option per line

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