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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 929e716f was d34aacf9, checked in by William Harrington <kb0iic@…>, 11 years ago

Remove a stray command of moving libstdc++ gdb py files and make sure all books move the gdb py files to their proper location.

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