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