source: final-system/common/gcc.xml@ 2f6e84a

Last change on this file since 2f6e84a was 2659c74, checked in by Jim Gifford <clfs@…>, 19 years ago

r677@server (orig r675): manuel | 2005-11-10 03:13:57 -0800
Including patches.ent from general.ent

  • Property mode set to 100644
File size: 7.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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 <segmentedlist>
24 <segtitle>&dependencies;</segtitle>
25
26 <seglistitem>
27 <seg>Bash, Binutils, Coreutils, Diffutils, Findutils,
28 Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo</seg>
29 </seglistitem>
30 </segmentedlist>
31
32 </sect2>
33
34 <sect2 role="installation">
35 <title>Installation of GCC</title>
36
37 <para os="d">Apply a <command>sed</command> substitution that will suppress the
38 installation of <filename class="libraryfile">libiberty.a</filename>. The
39 version of <filename class="libraryfile">libiberty.a</filename> provided by
40 Binutils will be used instead:</para>
41
42<screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
43
44 <para os="f">The GCC documentation recommends building GCC outside of the source
45 directory in a dedicated build directory:</para>
46
47<screen os="g"><userinput>mkdir ../gcc-build
48cd ../gcc-build</userinput></screen>
49
50 <para os="h">Prepare GCC for compilation:</para>
51
52<screen><userinput>../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++ --disable-libstdcxx-pch</userinput></screen>
56
57 <para os="i">Compile the package:</para>
58
59<screen os="j"><userinput>make</userinput></screen>
60
61 <important os="k">
62 <para>In this section, the test suite for GCC is considered
63 critical. Do not skip it under any circumstance.</para>
64 </important>
65
66 <para os="l">Test the results, but do not stop at errors:</para>
67
68<screen os="m"><userinput>make -k check</userinput></screen>
69
70 <para os="n">The <parameter>-k</parameter> flag is used to make the test suite
71 run through to completion and not stop at the first failure. The GCC test
72 suite is very comprehensive and is almost guaranteed to generate a few
73 failures. To receive a summary of the test suite results, run:</para>
74
75<screen os="o"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
76
77 <para os="p">For only the summaries, pipe the output through
78 <userinput>grep -A7 Summ</userinput>.</para>
79
80 <para os="q">Results can be compared with those located at <ulink
81 url="&test-results;"/>.</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. Unless the test results are vastly different from
86 those at the above URL, it is safe to continue.</para>
87
88 <para os="s">Install the package:</para>
89
90<screen os="t"><userinput>make install</userinput></screen>
91
92 <para os="u">Some packages expect the C preprocessor to be installed in the
93 <filename class="directory">/lib</filename> directory.
94 To support those packages, create this symlink:</para>
95
96<screen os="v"><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
97
98 <para os="w">Many packages use the name <command>cc</command> to call the C
99 compiler. To satisfy those packages, create a symlink:</para>
100
101<screen os="x"><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
102
103 </sect2>
104
105 <sect2 id="contents-gcc" role="content">
106 <title>Contents of GCC</title>
107
108 <segmentedlist>
109 <segtitle>Installed programs</segtitle>
110 <segtitle>Installed libraries</segtitle>
111
112 <seglistitem>
113 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
114 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and
115 libsupc++.a</seg>
116 </seglistitem>
117 </segmentedlist>
118
119 <variablelist>
120 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
121 <?dbfo list-presentation="list"?>
122 <?dbhtml list-presentation="table"?>
123
124 <varlistentry id="cc">
125 <term><command>cc</command></term>
126 <listitem>
127 <para>The C compiler</para>
128 <indexterm zone="ch-system-gcc cc">
129 <primary sortas="b-cc">cc</primary>
130 </indexterm>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry id="cpp">
135 <term><command>cpp</command></term>
136 <listitem>
137 <para>The C preprocessor; it is used by the compiler to expand the
138 #include, #define, and similar statements in the source files</para>
139 <indexterm zone="ch-system-gcc cpp">
140 <primary sortas="b-cpp">cpp</primary>
141 </indexterm>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry id="c">
146 <term><command>c++</command></term>
147 <listitem>
148 <para>The C++ compiler</para>
149 <indexterm zone="ch-system-gcc c">
150 <primary sortas="b-c++">c++</primary>
151 </indexterm>
152 </listitem>
153 </varlistentry>
154
155 <varlistentry id="g">
156 <term><command>g++</command></term>
157 <listitem>
158 <para>The C++ compiler</para>
159 <indexterm zone="ch-system-gcc g">
160 <primary sortas="b-g++">g++</primary>
161 </indexterm>
162 </listitem>
163 </varlistentry>
164
165 <varlistentry id="gcc">
166 <term><command>gcc</command></term>
167 <listitem>
168 <para>The C compiler</para>
169 <indexterm zone="ch-system-gcc gcc">
170 <primary sortas="b-gcc">gcc</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="gccbug">
176 <term><command>gccbug</command></term>
177 <listitem>
178 <para>A shell script used to help create useful bug reports</para>
179 <indexterm zone="ch-system-gcc gccbug">
180 <primary sortas="b-gccbug">gccbug</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="gcov">
186 <term><command>gcov</command></term>
187 <listitem>
188 <para>A coverage testing tool; it is used to analyze programs to
189 determine where optimizations will have the most effect</para>
190 <indexterm zone="ch-system-gcc gcov">
191 <primary sortas="b-gcov">gcov</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="libgcc">
197 <term><filename class="libraryfile">libgcc</filename></term>
198 <listitem>
199 <para>Contains run-time support for <command>gcc</command></para>
200 <indexterm zone="ch-system-gcc libgcc">
201 <primary sortas="c-libgcc*">libgcc*</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="libstdc">
207 <term><filename class="libraryfile">libstdc++</filename></term>
208 <listitem>
209 <para>The standard C++ library</para>
210 <indexterm zone="ch-system-gcc libstdc">
211 <primary sortas="c-libstdc++">libstdc++</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry id="libsupc">
217 <term><filename class="libraryfile">libsupc++</filename></term>
218 <listitem>
219 <para>Provides supporting routines for the C++ programming
220 language</para>
221 <indexterm zone="ch-system-gcc libsupc">
222 <primary sortas="c-libsupc++">libsupc++</primary>
223 </indexterm>
224 </listitem>
225 </varlistentry>
226
227 </variablelist>
228
229 </sect2>
230
231</sect1>
Note: See TracBrowser for help on using the repository browser.