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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 79536fe 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
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 \
[0b89da6]54 --with-system-zlib --enable-checking=release --enable-libstdcxx-time</userinput></screen>
[3f8be484]55
[d55f00bc]56 <para os="j">Compile the package:</para>
[3f8be484]57
[f568131]58<screen os="k"><userinput>make</userinput></screen>
[3f8be484]59
[d55f00bc]60 <important os="l">
[121c48a]61 <para>The test suite for GCC is considered
[3f8be484]62 critical. Do not skip it under any circumstance.</para>
63 </important>
64
[16fb2c3c]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
[d55f00bc]69 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]70
[686839b]71<screen os="n"><userinput remap="test">make -k check</userinput></screen>
[3f8be484]72
[d55f00bc]73 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]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
[686839b]78<screen os="p"><userinput remap="test">../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]79
[d55f00bc]80 <para os="q">For only the summaries, pipe the output through
[3f8be484]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
[d55f00bc]85 resolved them yet.</para>
[3f8be484]86
87 <para os="s">Install the package:</para>
88
89<screen os="t"><userinput>make install</userinput></screen>
90
[3d66e17]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
[3f8be484]97 <filename class="directory">/lib</filename> directory.
98 To support those packages, create this symlink:</para>
99
[3d66e17]100<screen os="x"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]101
[3d66e17]102 <para os="y">Many packages use the name <command>cc</command> to call the C
[3f8be484]103 compiler. To satisfy those packages, create a symlink:</para>
104
[3d66e17]105<screen os="z"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]106
[55581cc]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
[3f8be484]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>
[61ad0b7f]119 <segtitle>Installed directories</segtitle>
[3f8be484]120
121 <seglistitem>
[2b220db9]122 <seg>c++, cc (link to gcc), cpp, g++, gcc, and gcov</seg>
[c8a83d8]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
[3d66e17]126 libtsan.[a,so]</seg>
[2b220db9]127 <seg>/usr/include/c++, /usr/lib/gcc, /usr/share/gcc-&gcc-version;</seg>
[3f8be484]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
[01aa1cc]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
[3f8be484]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
[2cca6fd]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
[188b6b2]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>
[3d66e17]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>
[188b6b2]251 </varlistentry>
252
[12a457e]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
[3bec8f3]257 pointer and array dereferencing operations.</para>
[12a457e]258 <indexterm zone="ch-system-gcc libmudflap">
259 <primary sortas="c-libmudflap*">libmudflap*</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
[188b6b2]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
[3f8be484]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
[8c09b88]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
[3f8be484]306 </variablelist>
307
308 </sect2>
309
310</sect1>
Note: See TracBrowser for help on using the repository browser.