source: final-system/common/gcc.xml@ a0889df

Last change on this file since a0889df was ec33b65f, checked in by Jim Gifford <clfs@…>, 19 years ago

r2961@server: jim | 2006-04-19 00:06:33 -0700
Added: GCC Patch for PR20425, fixes multilib search for specs file

  • Property mode set to 100644
File size: 8.9 KB
RevLine 
[bf8c11f]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>
[0636f6c]27 <seg>Bash, Binutils, Coreutils, DejaGNU, Diffutils, Expect, Findutils,
28 Gawk, Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Tcl, and Texinfo</seg>
[bf8c11f]29 </seglistitem>
30 </segmentedlist>
31
32 </sect2>
33
34 <sect2 role="installation">
35 <title>Installation of GCC</title>
36
[a9fe0ce]37 <para os="p1">The following patch fixes an issue where gcc doesn't generate
[2ab0d61]38 some code properly:</para>
[a9fe0ce]39
[640831c]40<screen os="p2"><userinput>patch -Np1 -i ../&gcc-PR26763-patch;</userinput></screen>
[a9fe0ce]41
[ec33b65f]42 <para os="p3">The following patch fixes the searching of multilib dirs for
43 specs file:</para>
44
45<screen os="p4"><userinput>patch -Np1 -i ../&gcc-PR20425-patch;</userinput></screen>
46
[bf8c11f]47 <para os="d">Apply a <command>sed</command> substitution that will suppress the
48 installation of <filename class="libraryfile">libiberty.a</filename>. The
49 version of <filename class="libraryfile">libiberty.a</filename> provided by
50 Binutils will be used instead:</para>
51
52<screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
53
[9be8160]54 <para os="e1">GCC provides a <command>gccbug</command> script which detects at
55 compile time whether mktemp is present, and hardcodes the result in a test.
[2ab0d61]56 If mktemp is not found, the script will fall back to using less
57 random names for temporary files. We will be installing mktemp
58 later, so the following sed will simulate its presence:</para>
[9be8160]59
[62c1c5dd]60<screen os="e2"><userinput>sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in</userinput></screen>
[9be8160]61
[bf8c11f]62 <para os="f">The GCC documentation recommends building GCC outside of the source
63 directory in a dedicated build directory:</para>
64
[dd9906e]65<screen os="g"><userinput>mkdir -v ../gcc-build
[bf8c11f]66cd ../gcc-build</userinput></screen>
67
68 <para os="h">Prepare GCC for compilation:</para>
69
[1b823a37]70<screen os="i"><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
[bf8c11f]71 --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
72 --enable-__cxa_atexit --enable-c99 --enable-long-long \
[11a722f]73 --enable-clocale=gnu --enable-languages=c,c++ \
[adeb68a]74 --disable-multilib --disable-libstdcxx-pch</userinput></screen>
[bf8c11f]75
[1b823a37]76 <para os="j">Compile the package:</para>
[bf8c11f]77
[c5ff986]78<screen os="k"><userinput>make bootstrap</userinput></screen>
[bf8c11f]79
[1b823a37]80 <important os="l">
[bf8c11f]81 <para>In this section, the test suite for GCC is considered
82 critical. Do not skip it under any circumstance.</para>
83 </important>
84
[1b823a37]85 <para os="m">Test the results, but do not stop at errors:</para>
[bf8c11f]86
[1b823a37]87<screen os="n"><userinput>make -k check</userinput></screen>
[bf8c11f]88
[1b823a37]89 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[bf8c11f]90 run through to completion and not stop at the first failure. The GCC test
91 suite is very comprehensive and is almost guaranteed to generate a few
92 failures. To receive a summary of the test suite results, run:</para>
93
[1b823a37]94<screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[bf8c11f]95
[1b823a37]96 <para os="q">For only the summaries, pipe the output through
[bf8c11f]97 <userinput>grep -A7 Summ</userinput>.</para>
98
99 <para os="r">A few unexpected failures cannot always be avoided. The
100 GCC developers are usually aware of these issues, but have not
[1b823a37]101 resolved them yet.</para>
[bf8c11f]102
103 <para os="s">Install the package:</para>
104
105<screen os="t"><userinput>make install</userinput></screen>
106
107 <para os="u">Some packages expect the C preprocessor to be installed in the
108 <filename class="directory">/lib</filename> directory.
109 To support those packages, create this symlink:</para>
110
[dd9906e]111<screen os="v"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[bf8c11f]112
113 <para os="w">Many packages use the name <command>cc</command> to call the C
114 compiler. To satisfy those packages, create a symlink:</para>
115
[dd9906e]116<screen os="x"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[bf8c11f]117
118 </sect2>
119
120 <sect2 id="contents-gcc" role="content">
121 <title>Contents of GCC</title>
122
123 <segmentedlist>
124 <segtitle>Installed programs</segtitle>
125 <segtitle>Installed libraries</segtitle>
126
127 <seglistitem>
128 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
[1b823a37]129 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
130 libmudflapth.[a,so], libstdc++.[a,so], and
[bf8c11f]131 libsupc++.a</seg>
132 </seglistitem>
133 </segmentedlist>
134
135 <variablelist>
136 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
137 <?dbfo list-presentation="list"?>
138 <?dbhtml list-presentation="table"?>
139
140 <varlistentry id="cc">
141 <term><command>cc</command></term>
142 <listitem>
143 <para>The C compiler</para>
144 <indexterm zone="ch-system-gcc cc">
145 <primary sortas="b-cc">cc</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
150 <varlistentry id="cpp">
151 <term><command>cpp</command></term>
152 <listitem>
153 <para>The C preprocessor; it is used by the compiler to expand the
154 #include, #define, and similar statements in the source files</para>
155 <indexterm zone="ch-system-gcc cpp">
156 <primary sortas="b-cpp">cpp</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="c">
162 <term><command>c++</command></term>
163 <listitem>
164 <para>The C++ compiler</para>
165 <indexterm zone="ch-system-gcc c">
166 <primary sortas="b-c++">c++</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="g">
172 <term><command>g++</command></term>
173 <listitem>
174 <para>The C++ compiler</para>
175 <indexterm zone="ch-system-gcc g">
176 <primary sortas="b-g++">g++</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="gcc">
182 <term><command>gcc</command></term>
183 <listitem>
184 <para>The C compiler</para>
185 <indexterm zone="ch-system-gcc gcc">
186 <primary sortas="b-gcc">gcc</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="gccbug">
192 <term><command>gccbug</command></term>
193 <listitem>
194 <para>A shell script used to help create useful bug reports</para>
195 <indexterm zone="ch-system-gcc gccbug">
196 <primary sortas="b-gccbug">gccbug</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="gcov">
202 <term><command>gcov</command></term>
203 <listitem>
204 <para>A coverage testing tool; it is used to analyze programs to
205 determine where optimizations will have the most effect</para>
206 <indexterm zone="ch-system-gcc gcov">
207 <primary sortas="b-gcov">gcov</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
212 <varlistentry id="libgcc">
213 <term><filename class="libraryfile">libgcc</filename></term>
214 <listitem>
215 <para>Contains run-time support for <command>gcc</command></para>
216 <indexterm zone="ch-system-gcc libgcc">
217 <primary sortas="c-libgcc*">libgcc*</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
[4dea801f]222 <varlistentry id="libmudflap">
223 <term><filename class="libraryfile">libmudflap</filename></term>
224 <listitem>
225 <para>The libmudflap libraries are used by GCC for instrumenting
[155e089]226 pointer and array dereferencing operations.</para>
[4dea801f]227 <indexterm zone="ch-system-gcc libmudflap">
228 <primary sortas="c-libmudflap*">libmudflap*</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
[bf8c11f]233 <varlistentry id="libstdc">
234 <term><filename class="libraryfile">libstdc++</filename></term>
235 <listitem>
236 <para>The standard C++ library</para>
237 <indexterm zone="ch-system-gcc libstdc">
238 <primary sortas="c-libstdc++">libstdc++</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="libsupc">
244 <term><filename class="libraryfile">libsupc++</filename></term>
245 <listitem>
246 <para>Provides supporting routines for the C++ programming
247 language</para>
248 <indexterm zone="ch-system-gcc libsupc">
249 <primary sortas="c-libsupc++">libsupc++</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 </variablelist>
255
256 </sect2>
257
258</sect1>
Note: See TracBrowser for help on using the repository browser.