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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6e2c4a4 was 2b220db9, checked in by Chris Staub <chris@…>, 12 years ago

Updates to installed programs lists

  • Property mode set to 100644
File size: 9.2 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, 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, /usr/share/gcc-&gcc-version;</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="gcov">
177 <term><command>gcov</command></term>
178 <listitem>
179 <para>A coverage testing tool; it is used to analyze programs to
180 determine where optimizations will have the most effect</para>
181 <indexterm zone="ch-system-gcc gcov">
182 <primary sortas="b-gcov">gcov</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="libgcc">
188 <term><filename class="libraryfile">libgcc</filename></term>
189 <listitem>
190 <para>Contains run-time support for <command>gcc</command></para>
191 <indexterm zone="ch-system-gcc libgcc">
192 <primary sortas="c-libgcc*">libgcc*</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="libgcov">
198 <term><filename class="libraryfile">libgcov</filename></term>
199 <listitem>
200 <para>Library that is linked into a program when
201 <command>gcc</command> is instructed to enable profiling</para>
202 <indexterm zone="ch-system-gcc libgcov">
203 <primary sortas="c-libgcov">libgcov</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="libgomp">
209 <term><filename class="libraryfile">libgomp</filename></term>
210 <listitem>
211 <para>GNU implementation of the OpenMP API for multi-platform
212 shared-memory parallel programming in C/C++ and Fortran</para>
213 <indexterm zone="ch-system-gcc libgomp">
214 <primary sortas="c-libgomp">libgomp</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="libmudflap">
220 <term><filename class="libraryfile">libmudflap</filename></term>
221 <listitem>
222 <para>The libmudflap libraries are used by GCC for instrumenting
223 pointer and array dereferencing operations.</para>
224 <indexterm zone="ch-system-gcc libmudflap">
225 <primary sortas="c-libmudflap*">libmudflap*</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="libssp">
231 <term><filename class="libraryfile">libssp</filename></term>
232 <listitem>
233 <para>Contains routines supporting GCC's stack-smashing protection
234 functionality</para>
235 <indexterm zone="ch-system-gcc libssp">
236 <primary sortas="c-libssp*">libssp*</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="libstdc">
242 <term><filename class="libraryfile">libstdc++</filename></term>
243 <listitem>
244 <para>The standard C++ library</para>
245 <indexterm zone="ch-system-gcc libstdc">
246 <primary sortas="c-libstdc++">libstdc++</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry id="libsupc">
252 <term><filename class="libraryfile">libsupc++</filename></term>
253 <listitem>
254 <para>Provides supporting routines for the C++ programming
255 language</para>
256 <indexterm zone="ch-system-gcc libsupc">
257 <primary sortas="c-libsupc++">libsupc++</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 </variablelist>
263
264 </sect2>
265
266</sect1>
Note: See TracBrowser for help on using the repository browser.