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