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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 834aff7 was 12a457e, checked in by Jim Gifford <clfs@…>, 19 years ago

r761@server (orig r759): jim | 2005-11-27 16:20:49 -0800

r797@server: jim | 2005-11-27 16:20:01 -0800
More Text Updates to binutils and gcc


  • Property mode set to 100644
File size: 8.0 KB
RevLine 
[3f8be484]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
[d55f00bc]52<screen os="i"><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
[3f8be484]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
[d55f00bc]57 <para os="j">Compile the package:</para>
[3f8be484]58
[d55f00bc]59<screen os="k"><userinput>make</userinput></screen>
[3f8be484]60
[d55f00bc]61 <important os="l">
[3f8be484]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
[d55f00bc]66 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]67
[d55f00bc]68<screen os="n"><userinput>make -k check</userinput></screen>
[3f8be484]69
[d55f00bc]70 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]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
[d55f00bc]75<screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]76
[d55f00bc]77 <para os="q">For only the summaries, pipe the output through
[3f8be484]78 <userinput>grep -A7 Summ</userinput>.</para>
79
80 <para os="r">A few unexpected failures cannot always be avoided. The
81 GCC developers are usually aware of these issues, but have not
[d55f00bc]82 resolved them yet.</para>
[3f8be484]83
84 <para os="s">Install the package:</para>
85
86<screen os="t"><userinput>make install</userinput></screen>
87
88 <para os="u">Some packages expect the C preprocessor to be installed in the
89 <filename class="directory">/lib</filename> directory.
90 To support those packages, create this symlink:</para>
91
92<screen os="v"><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
93
94 <para os="w">Many packages use the name <command>cc</command> to call the C
95 compiler. To satisfy those packages, create a symlink:</para>
96
97<screen os="x"><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
98
99 </sect2>
100
101 <sect2 id="contents-gcc" role="content">
102 <title>Contents of GCC</title>
103
104 <segmentedlist>
105 <segtitle>Installed programs</segtitle>
106 <segtitle>Installed libraries</segtitle>
107
108 <seglistitem>
109 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
[d55f00bc]110 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
111 libmudflapth.[a,so], libstdc++.[a,so], and
[3f8be484]112 libsupc++.a</seg>
113 </seglistitem>
114 </segmentedlist>
115
116 <variablelist>
117 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
118 <?dbfo list-presentation="list"?>
119 <?dbhtml list-presentation="table"?>
120
121 <varlistentry id="cc">
122 <term><command>cc</command></term>
123 <listitem>
124 <para>The C compiler</para>
125 <indexterm zone="ch-system-gcc cc">
126 <primary sortas="b-cc">cc</primary>
127 </indexterm>
128 </listitem>
129 </varlistentry>
130
131 <varlistentry id="cpp">
132 <term><command>cpp</command></term>
133 <listitem>
134 <para>The C preprocessor; it is used by the compiler to expand the
135 #include, #define, and similar statements in the source files</para>
136 <indexterm zone="ch-system-gcc cpp">
137 <primary sortas="b-cpp">cpp</primary>
138 </indexterm>
139 </listitem>
140 </varlistentry>
141
142 <varlistentry id="c">
143 <term><command>c++</command></term>
144 <listitem>
145 <para>The C++ compiler</para>
146 <indexterm zone="ch-system-gcc c">
147 <primary sortas="b-c++">c++</primary>
148 </indexterm>
149 </listitem>
150 </varlistentry>
151
152 <varlistentry id="g">
153 <term><command>g++</command></term>
154 <listitem>
155 <para>The C++ compiler</para>
156 <indexterm zone="ch-system-gcc g">
157 <primary sortas="b-g++">g++</primary>
158 </indexterm>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry id="gcc">
163 <term><command>gcc</command></term>
164 <listitem>
165 <para>The C compiler</para>
166 <indexterm zone="ch-system-gcc gcc">
167 <primary sortas="b-gcc">gcc</primary>
168 </indexterm>
169 </listitem>
170 </varlistentry>
171
172 <varlistentry id="gccbug">
173 <term><command>gccbug</command></term>
174 <listitem>
175 <para>A shell script used to help create useful bug reports</para>
176 <indexterm zone="ch-system-gcc gccbug">
177 <primary sortas="b-gccbug">gccbug</primary>
178 </indexterm>
179 </listitem>
180 </varlistentry>
181
182 <varlistentry id="gcov">
183 <term><command>gcov</command></term>
184 <listitem>
185 <para>A coverage testing tool; it is used to analyze programs to
186 determine where optimizations will have the most effect</para>
187 <indexterm zone="ch-system-gcc gcov">
188 <primary sortas="b-gcov">gcov</primary>
189 </indexterm>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry id="libgcc">
194 <term><filename class="libraryfile">libgcc</filename></term>
195 <listitem>
196 <para>Contains run-time support for <command>gcc</command></para>
197 <indexterm zone="ch-system-gcc libgcc">
198 <primary sortas="c-libgcc*">libgcc*</primary>
199 </indexterm>
200 </listitem>
201 </varlistentry>
202
[12a457e]203 <varlistentry id="libmudflap">
204 <term><filename class="libraryfile">libmudflap</filename></term>
205 <listitem>
206 <para>The libmudflap libraries are used by GCC for instrumenting
207 pointer and array defreferncing operations.</para>
208 <indexterm zone="ch-system-gcc libmudflap">
209 <primary sortas="c-libmudflap*">libmudflap*</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
[3f8be484]214 <varlistentry id="libstdc">
215 <term><filename class="libraryfile">libstdc++</filename></term>
216 <listitem>
217 <para>The standard C++ library</para>
218 <indexterm zone="ch-system-gcc libstdc">
219 <primary sortas="c-libstdc++">libstdc++</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="libsupc">
225 <term><filename class="libraryfile">libsupc++</filename></term>
226 <listitem>
227 <para>Provides supporting routines for the C++ programming
228 language</para>
229 <indexterm zone="ch-system-gcc libsupc">
230 <primary sortas="c-libsupc++">libsupc++</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 </variablelist>
236
237 </sect2>
238
239</sect1>
Note: See TracBrowser for help on using the repository browser.