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

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

Make filename in GCC instructions more specific

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