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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6244322 was c8a83d8, checked in by Chris Staub <chris@…>, 11 years ago

More installed files updates

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