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

clfs-3.0.0-sysvinit sysvinit
Last change on this file since d625fca was c2102b28, checked in by Chris Staub <chris@…>, 10 years ago

Improve consistency in package installation lists, mainly removing 'and'

Conflicts:

BOOK/final-system/common/attr.xml

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