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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8eacec6 was 686839b, checked in by William Harrington <kb0iic@…>, 11 years ago

Add screen tags around userinput test commands and remap userinput for test commands as remap="test".

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