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

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

Remove --disable-isl-version-check configure option from all gcc sections. The build system detects the proper ISL version.

  • 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 --with-system-zlib --enable-checking=release --enable-libstdcxx-time</userinput></screen>
55
56 <para os="j">Compile the package:</para>
57
58<screen os="k"><userinput>make</userinput></screen>
59
60 <important os="l">
61 <para>The test suite for GCC is considered
62 critical. Do not skip it under any circumstance.</para>
63 </important>
64
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
69 <para os="m">Test the results, but do not stop at errors:</para>
70
71<screen os="n"><userinput remap="test">make -k check</userinput></screen>
72
73 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
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
78<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
79
80 <para os="q">For only the summaries, pipe the output through
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
85 resolved them yet.</para>
86
87 <para os="s">Install the package:</para>
88
89<screen os="t"><userinput>make install</userinput></screen>
90
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
97 <filename class="directory">/lib</filename> directory.
98 To support those packages, create this symlink:</para>
99
100<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
101
102 <para os="y">Many packages use the name <command>cc</command> to call the C
103 compiler. To satisfy those packages, create a symlink:</para>
104
105<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
106
107 <para os="aa">Finally, move a misplaced file:</para>
108
109<screen os="ab"><userinput>mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
110
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>
119 <segtitle>Installed directories</segtitle>
120
121 <seglistitem>
122 <seg>c++, cc (link to gcc), cpp, g++, gcc, and gcov</seg>
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
126 libtsan.[a,so]</seg>
127 <seg>/usr/include/c++, /usr/lib/gcc, /usr/share/gcc-&gcc-version;</seg>
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
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
208 <varlistentry id="libgcc">
209 <term><filename class="libraryfile">libgcc</filename></term>
210 <listitem>
211 <para>Contains run-time support for <command>gcc</command></para>
212 <indexterm zone="ch-system-gcc libgcc">
213 <primary sortas="c-libgcc*">libgcc*</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="libgcov">
219 <term><filename class="libraryfile">libgcov</filename></term>
220 <listitem>
221 <para>Library that is linked into a program when
222 <command>gcc</command> is instructed to enable profiling</para>
223 <indexterm zone="ch-system-gcc libgcov">
224 <primary sortas="c-libgcov">libgcov</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="libgomp">
230 <term><filename class="libraryfile">libgomp</filename></term>
231 <listitem>
232 <para>GNU implementation of the OpenMP API for multi-platform
233 shared-memory parallel programming in C/C++ and Fortran</para>
234 <indexterm zone="ch-system-gcc libgomp">
235 <primary sortas="c-libgomp">libgomp</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="libiberty">
241 <term><filename class="libraryfile">libiberty</filename></term>
242 <listitem>
243 <para>Contains routines used by various GNU programs, including
244 <command>getopt</command>, <command>obstack</command>,
245 <command>strerror</command>, <command>strtol</command>, and
246 <command>strtoul</command></para>
247 <indexterm zone="ch-system-gcc libiberty">
248 <primary sortas="c-libiberty">libiberty</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="libmudflap">
254 <term><filename class="libraryfile">libmudflap</filename></term>
255 <listitem>
256 <para>The libmudflap libraries are used by GCC for instrumenting
257 pointer and array dereferencing operations.</para>
258 <indexterm zone="ch-system-gcc libmudflap">
259 <primary sortas="c-libmudflap*">libmudflap*</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="libssp">
265 <term><filename class="libraryfile">libssp</filename></term>
266 <listitem>
267 <para>Contains routines supporting GCC's stack-smashing protection
268 functionality</para>
269 <indexterm zone="ch-system-gcc libssp">
270 <primary sortas="c-libssp*">libssp*</primary>
271 </indexterm>
272 </listitem>
273 </varlistentry>
274
275 <varlistentry id="libstdc">
276 <term><filename class="libraryfile">libstdc++</filename></term>
277 <listitem>
278 <para>The standard C++ library</para>
279 <indexterm zone="ch-system-gcc libstdc">
280 <primary sortas="c-libstdc++">libstdc++</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="libsupc">
286 <term><filename class="libraryfile">libsupc++</filename></term>
287 <listitem>
288 <para>Provides supporting routines for the C++ programming
289 language</para>
290 <indexterm zone="ch-system-gcc libsupc">
291 <primary sortas="c-libsupc++">libsupc++</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="libtsan">
297 <term><filename class="libraryfile">libtsan</filename></term>
298 <listitem>
299 <para>The Thread Sanitizer runtime library</para>
300 <indexterm zone="ch-system-gcc libtsan">
301 <primary sortas="c-libtsan">libtsan</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 </variablelist>
307
308 </sect2>
309
310</sect1>
Note: See TracBrowser for help on using the repository browser.