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 | <!-- Inserted as a reminder to do this. The mention of a test suite
|
---|
8 | is usually right before the root user installation commands. Please
|
---|
9 | delete these 12 (including one blank) lines after you are done.-->
|
---|
10 |
|
---|
11 | <!-- Use one of the two mentions below about a test suite,
|
---|
12 | delete the line that is not applicable. Of course, if the
|
---|
13 | test suite uses syntax other than "make check", revise the
|
---|
14 | line to reflect the actual syntax to run the test suite -->
|
---|
15 |
|
---|
16 | <!-- <para>This package does not come with a test suite.</para> -->
|
---|
17 | <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
|
---|
18 |
|
---|
19 | <!ENTITY gcc3-download-http "http://ftp.gnu.org/gnu/gcc/gcc-&gcc3-version;/gcc-&gcc3-version;.tar.bz2">
|
---|
20 | <!ENTITY gcc3-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc3-version;/gcc-&gcc3-version;.tar.bz2">
|
---|
21 | <!ENTITY gcc3-md5sum "6936616a967da5a0b46f1e7424a06414">
|
---|
22 | <!ENTITY gcc3-size "24 MB">
|
---|
23 | <!ENTITY gcc3-buildsize "433 MB (includes running the test suite)">
|
---|
24 | <!ENTITY gcc3-time "5.2 SBU (additional 11.2 SBU to run the test suite)">
|
---|
25 | ]>
|
---|
26 |
|
---|
27 | <sect1 id="gcc3" xreflabel="GCC-&gcc3-version;">
|
---|
28 | <?dbhtml filename="gcc3.html" ?>
|
---|
29 |
|
---|
30 | <sect1info>
|
---|
31 | <othername>$LastChangedBy$</othername>
|
---|
32 | <date>$Date$</date>
|
---|
33 | <keywordset>
|
---|
34 | <keyword role="package">gcc-&gcc3-version;.tar</keyword>
|
---|
35 | <keyword role="ftpdir">gcc</keyword>
|
---|
36 | </keywordset>
|
---|
37 | </sect1info>
|
---|
38 |
|
---|
39 | <title>GCC-&gcc3-version;</title>
|
---|
40 |
|
---|
41 | <indexterm zone="gcc3">
|
---|
42 | <primary sortas="a-GCC-3-3">GCC-&gcc3-version;</primary>
|
---|
43 | </indexterm>
|
---|
44 |
|
---|
45 | <sect2 role="package">
|
---|
46 | <title>Introduction to GCC-&gcc3-version;</title>
|
---|
47 |
|
---|
48 | <para>There are several reasons why you may wish to install
|
---|
49 | <application>GCC</application>-&gcc3-version;. Some packages have not been
|
---|
50 | updated so they can be successfully compiled by
|
---|
51 | <application>GCC</application>-&gcc-version; as
|
---|
52 | version 4.x.x of <application>GCC</application> is much stricter in
|
---|
53 | enforcing coding standards. Additionally, some pre-compiled packages may
|
---|
54 | require the <application>GCC</application>-&gcc3-version; libraries at
|
---|
55 | run-time. Another reason you may need to install
|
---|
56 | <application>GCC</application>-&gcc3-version; is to use the
|
---|
57 | <command>g77</command> Fortran 77 compiler provided by pre-4.x.x versions
|
---|
58 | of <application>GCC</application>. <application>GCC</application>-4.x.x
|
---|
59 | only includes <command>gfortran</command>, a Fortran 95 compatible compiler
|
---|
60 | that is not yet ready to be used in a production environment.</para>
|
---|
61 |
|
---|
62 | <para>If all you need is a working <command>{f,g}77</command> Fortran 77
|
---|
63 | compiler, you may wish to use the one provided by
|
---|
64 | <application>GCC</application>-3.4.x. This is what the
|
---|
65 | <application>GCC</application> developers recommend. Instructions for
|
---|
66 | building the <application>GCC</application>-3.4.x Fortran compiler can be
|
---|
67 | found on the
|
---|
68 | <ulink url="http://wiki.linuxfromscratch.org/blfs/wiki/gcc3">BLFS
|
---|
69 | Wiki</ulink>.</para>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
72 | <itemizedlist spacing="compact">
|
---|
73 | <listitem>
|
---|
74 | <para>Download (HTTP): <ulink url="&gcc3-download-http;"/></para>
|
---|
75 | </listitem>
|
---|
76 | <listitem>
|
---|
77 | <para>Download (FTP): <ulink url="&gcc3-download-ftp;"/></para>
|
---|
78 | </listitem>
|
---|
79 | <listitem>
|
---|
80 | <para>Download MD5 sum: &gcc3-md5sum;</para>
|
---|
81 | </listitem>
|
---|
82 | <listitem>
|
---|
83 | <para>Download size: &gcc3-size;</para>
|
---|
84 | </listitem>
|
---|
85 | <listitem>
|
---|
86 | <para>Estimated disk space required: &gcc3-buildsize;</para>
|
---|
87 | </listitem>
|
---|
88 | <listitem>
|
---|
89 | <para>Estimated build time: &gcc3-time;</para>
|
---|
90 | </listitem>
|
---|
91 | </itemizedlist>
|
---|
92 |
|
---|
93 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
94 | <itemizedlist spacing='compact'>
|
---|
95 | <listitem>
|
---|
96 | <para>Required patch: <ulink
|
---|
97 | url="&patch-root;/gcc-&gcc3-version;-no_fixincludes-1.patch"/></para>
|
---|
98 | </listitem>
|
---|
99 | <listitem>
|
---|
100 | <para>Required patch: <ulink
|
---|
101 | url="&patch-root;/gcc-&gcc3-version;-linkonce-1.patch"/></para>
|
---|
102 | </listitem>
|
---|
103 | </itemizedlist>
|
---|
104 |
|
---|
105 | <bridgehead renderas="sect3">GCC-&gcc3-version; Dependencies</bridgehead>
|
---|
106 |
|
---|
107 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
108 | <para role="optional"><xref linkend="dejagnu"/> (required to run the full test suite)</para>
|
---|
109 |
|
---|
110 | <para condition="html" role="usernotes">User Notes:
|
---|
111 | <ulink url="&blfs-wiki;/gcc3"/></para>
|
---|
112 |
|
---|
113 | </sect2>
|
---|
114 |
|
---|
115 | <sect2 role="installation">
|
---|
116 | <title>Installation of GCC-&gcc3-version;</title>
|
---|
117 |
|
---|
118 | <para>Install <application>GCC</application>-&gcc3-version; by running
|
---|
119 | the following commands:</para>
|
---|
120 |
|
---|
121 | <screen><userinput>patch -Np1 -i ../gcc-&gcc3-version;-no_fixincludes-1.patch &&
|
---|
122 | patch -Np1 -i ../gcc-&gcc3-version;-linkonce-1.patch &&
|
---|
123 | mkdir ../gcc-build &&
|
---|
124 | cd ../gcc-build &&
|
---|
125 | ../gcc-&gcc3-version;/configure --prefix=/opt/gcc-&gcc3-version; \
|
---|
126 | --enable-shared --enable-languages=c,c++ --enable-threads=posix &&
|
---|
127 | make bootstrap</userinput></screen>
|
---|
128 |
|
---|
129 | <para>If desired, run the test suite using the following commands. The
|
---|
130 | <command>test_summary</command> commands create log files which can be
|
---|
131 | compared to known good results located at <ulink
|
---|
132 | url="&files-anduin;/gcc336_test.txt"/>.</para>
|
---|
133 |
|
---|
134 | <screen><userinput>make -k check &&
|
---|
135 | ../gcc-&gcc3-version;/contrib/test_summary >test_summary.log 2>&1 &&
|
---|
136 | ../gcc-&gcc3-version;/contrib/test_summary | \
|
---|
137 | grep -A7 Summ >test_summary_short.log 2>&1</userinput></screen>
|
---|
138 |
|
---|
139 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
140 |
|
---|
141 | <screen role="root"><userinput>make install &&
|
---|
142 | mv -v /opt/gcc-&gcc3-version;/lib/libstdc++.so.5* /usr/lib &&
|
---|
143 | ln -v -sf /usr/lib/libstdc++.so.5.0.7 /opt/gcc-&gcc3-version;/lib &&
|
---|
144 | ln -v -sf libstdc++.so.5.0.7 /opt/gcc-&gcc3-version;/lib/libstdc++.so.5 &&
|
---|
145 | chown -v -R root:root \
|
---|
146 | /opt/gcc-&gcc3-version;/lib/gcc-lib/i686-pc-linux-gnu/&gcc3-version;/include</userinput></screen>
|
---|
147 |
|
---|
148 | </sect2>
|
---|
149 |
|
---|
150 | <sect2 role="commands">
|
---|
151 | <title>Command Explanations</title>
|
---|
152 |
|
---|
153 | <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
|
---|
154 | <application>GCC</application> development team recommends
|
---|
155 | building in a separate directory.</para>
|
---|
156 |
|
---|
157 | <para id='gcc3-lang'><parameter>--enable-shared --enable-languages=c,c++
|
---|
158 | --enable-threads=posix</parameter>: Configures
|
---|
159 | <application>GCC</application> to build the <application>C</application>
|
---|
160 | and <application>C++</application> compilers and enable the related
|
---|
161 | <application>C++</application> options. In addition to c and c++, you can
|
---|
162 | add f77 for FORTRAN (called <application>g77</application>). Note that
|
---|
163 | <application>GCC-4</application> no longer provides a FORTRAN 77
|
---|
164 | compiler.</para>
|
---|
165 |
|
---|
166 | <indexterm zone="gcc3 gcc3-lang">
|
---|
167 | <primary sortas="b-g77">g77</primary>
|
---|
168 | </indexterm>
|
---|
169 | <indexterm zone="gcc3 gcc3-lang">
|
---|
170 | <primary sortas="b-FORTRAN">FORTRAN</primary>
|
---|
171 | </indexterm>
|
---|
172 |
|
---|
173 | <para><command>mv -v /opt/gcc-&gcc3-version;/lib/libstdc++.so.5*
|
---|
174 | /usr/lib</command>: Moves the <application>C++</application> library to the
|
---|
175 | standard lib directory to avoid having to add
|
---|
176 | <userinput>/opt/gcc-&gcc3-version;/lib</userinput> to
|
---|
177 | <filename>/etc/ld.so.conf</filename>.</para>
|
---|
178 |
|
---|
179 | </sect2>
|
---|
180 |
|
---|
181 | <sect2 role="configuration">
|
---|
182 | <title>Configuring GCC-&gcc3-version;</title>
|
---|
183 |
|
---|
184 | <sect3>
|
---|
185 | <title>Configuration information</title>
|
---|
186 |
|
---|
187 | <para>If you only need the GCC-&gcc3-version; C++ library, you may delete
|
---|
188 | <filename>/opt/gcc-&gcc3-version;</filename>.</para>
|
---|
189 |
|
---|
190 | <para>Whenever you need to use GCC-&gcc3-version; instead of your system
|
---|
191 | installed compiler, add
|
---|
192 | <filename class="directory">/opt/gcc-&gcc3-version;/bin</filename> to the
|
---|
193 | front of your <envar>PATH</envar> or (preferably) set the <envar>CC</envar>
|
---|
194 | environment variable before compiling the concerned package.</para>
|
---|
195 |
|
---|
196 | <para>If you use <application>g77</application> programs, you also
|
---|
197 | should move the libg2c.* libraries and symbolic links to <filename
|
---|
198 | class='directory'>/usr/lib</filename>. Using export
|
---|
199 | LD_LIBRARY_PATH=/opt/gcc-&gcc3-version;/lib or updating
|
---|
200 | <filename>/etc/ld.so.conf</filename> to point to <filename
|
---|
201 | class='directory'>/opt/gcc-&gcc3-version;/lib</filename> is not
|
---|
202 | recommended as it may conflict with your normal libraries.</para>
|
---|
203 |
|
---|
204 | </sect3>
|
---|
205 |
|
---|
206 | </sect2>
|
---|
207 |
|
---|
208 | <sect2 role="content">
|
---|
209 | <title>Contents</title>
|
---|
210 |
|
---|
211 | <segmentedlist>
|
---|
212 | <segtitle>Installed Programs</segtitle>
|
---|
213 | <segtitle>Installed Libraries</segtitle>
|
---|
214 | <segtitle>Installed Directory</segtitle>
|
---|
215 |
|
---|
216 | <seglistitem>
|
---|
217 | <seg>c++, cpp, g++, gcc, gccbug, gcov, and architecture specific
|
---|
218 | names of these programs.</seg>
|
---|
219 | <seg>libgcc_s.so, libiberty.a, libstdc++.{a,so}, libsupc++.a, and other
|
---|
220 | support libraries and files.</seg>
|
---|
221 | <seg>/opt/gcc-&gcc3-version;</seg>
|
---|
222 | </seglistitem>
|
---|
223 | </segmentedlist>
|
---|
224 |
|
---|
225 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
226 |
|
---|
227 | <para>The GCC-&gcc3-version; package contains the
|
---|
228 | <command>gcc</command>-&gcc3-version; <application>C</application> and
|
---|
229 | <application>C++</application> compilers and the GCC-&gcc3-version;
|
---|
230 | <filename>libstdc++.so</filename> library that is required by some
|
---|
231 | commercial and pre-compiled packages.</para>
|
---|
232 |
|
---|
233 | </sect2>
|
---|
234 |
|
---|
235 | </sect1>
|
---|