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

sysvinit
Last change on this file since 5ef098d 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
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
[b27081c4]31<screen os="p2"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
[cc858ed]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" \
[b27081c4]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>
[3f8be484]57
[9b4baca]58 <variablelist os="i1">
[428d8a4]59 <title>The meaning of the new configure options:</title>
[9b4baca]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
[428d8a4]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
[9b4baca]83 </variablelist>
84
[d55f00bc]85 <para os="j">Compile the package:</para>
[3f8be484]86
[f568131]87<screen os="k"><userinput>make</userinput></screen>
[3f8be484]88
[d55f00bc]89 <important os="l">
[eb21c92]90 <para>Due to GCC's critical role in a properly functioning system,
91 the CLFS developers strongly recommend running the testsuite.</para>
[3f8be484]92 </important>
93
[16fb2c3c]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
[d55f00bc]98 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]99
[686839b]100<screen os="n"><userinput remap="test">make -k check</userinput></screen>
[3f8be484]101
[d55f00bc]102 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]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
[686839b]107<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]108
[d55f00bc]109 <para os="q">For only the summaries, pipe the output through
[3f8be484]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
[d55f00bc]114 resolved them yet.</para>
[3f8be484]115
116 <para os="s">Install the package:</para>
117
118<screen os="t"><userinput>make install</userinput></screen>
119
[cc49a21]120 <para os="w">Create a link to satisfy FHS requirements:</para>
[3f8be484]121
[3d66e17]122<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]123
[3d66e17]124 <para os="y">Many packages use the name <command>cc</command> to call the C
[3f8be484]125 compiler. To satisfy those packages, create a symlink:</para>
126
[3d66e17]127<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]128
[55581cc]129 <para os="aa">Finally, move a misplaced file:</para>
130
[2fc521b]131<screen os="ab"><userinput>mv -v /usr/lib/libstdc++*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
[55581cc]132
[3f8be484]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>
[61ad0b7f]141 <segtitle>Installed directories</segtitle>
[3f8be484]142
143 <seglistitem>
[cc49a21]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>
[3f8be484]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
[cc49a21]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
[01aa1cc]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
[d1f79ab]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">
[cc49a21]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>
[d1f79ab]270 </indexterm>
271 </listitem>
272 </varlistentry>
273
[3f8be484]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
[2cca6fd]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
[188b6b2]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>
[3d66e17]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>
[188b6b2]317 </varlistentry>
318
[d1f79ab]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
[cc49a21]330 <varlistentry id="liblsan">
331 <term><filename class="libraryfile">liblsan</filename></term>
[d1f79ab]332 <listitem>
[cc49a21]333 <para>The Leak Sanitizer runtime library</para>
334 <indexterm zone="ch-system-gcc liblsan">
335 <primary sortas="c-liblsan">liblsan</primary>
[d1f79ab]336 </indexterm>
337 </listitem>
338 </varlistentry>
339
[cc49a21]340 <varlistentry id="liblto_plugin">
341 <term><filename class="libraryfile">liblto_plugin</filename></term>
[12a457e]342 <listitem>
[cc49a21]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>
[12a457e]346 </indexterm>
347 </listitem>
348 </varlistentry>
349
[d1f79ab]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
[188b6b2]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
[3f8be484]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
[8c09b88]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
[cc49a21]402 <varlistentry id="libubsan">
403 <term><filename class="libraryfile">libubsan</filename></term>
404 <listitem>
[48d041f]405 <para>The Undefined Behavior Sanitizer runtime library</para>
[cc49a21]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
[3f8be484]422 </variablelist>
423
424 </sect2>
425
426</sect1>
Note: See TracBrowser for help on using the repository browser.