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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8545c9aa was 84b164e, checked in by Jonathan Norman <jon@…>, 13 years ago

Replaced ClooG-PPL with ClooG

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