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

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

32bit and Pure-64bit books didn't get the mv command for the gdb.py files during final system gcc copied over from master branch. This is now fixed. Noticed when building ppc and inspecting ldconfig -v output.

  • Property mode set to 100644
File size: 11.1 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
[55581cc]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
[3f8be484]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>
[61ad0b7f]120 <segtitle>Installed directories</segtitle>
[3f8be484]121
122 <seglistitem>
[2b220db9]123 <seg>c++, cc (link to gcc), cpp, g++, gcc, and gcov</seg>
[01aa1cc]124 <seg>libasan.[a,so], libgcc.a, libgcc_eh.a, libgcc_s.so, libgcov.a,
[3d66e17]125 libgomp.[a,so], libiberty.a, libmudflap.[a,so], libmudflapth.[a,so],
126 libssp.[a,so], libssp_nonshared.a, libstdc++.[a,so], libsupc++.a, and
127 libtsan.[a,so]</seg>
[2b220db9]128 <seg>/usr/include/c++, /usr/lib/gcc, /usr/share/gcc-&gcc-version;</seg>
[3f8be484]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
[01aa1cc]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
[3f8be484]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
[2cca6fd]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
[188b6b2]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>
[3d66e17]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>
[188b6b2]252 </varlistentry>
253
[12a457e]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
[3bec8f3]258 pointer and array dereferencing operations.</para>
[12a457e]259 <indexterm zone="ch-system-gcc libmudflap">
260 <primary sortas="c-libmudflap*">libmudflap*</primary>
261 </indexterm>
262 </listitem>
263 </varlistentry>
264
[188b6b2]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
[3f8be484]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
[8c09b88]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
[3f8be484]307 </variablelist>
308
309 </sect2>
310
311</sect1>
Note: See TracBrowser for help on using the repository browser.