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 "a1c267b34f05c8660b24251865614d8b">
|
---|
10 | <!ENTITY gcc3-size "23 MB">
|
---|
11 | <!ENTITY gcc3-buildsize "489 MB">
|
---|
12 | <!ENTITY gcc3-time "5.72 SBU (additional 12.54 SBU to run the test suite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="gcc3" xreflabel="GCC-&gcc3-version;">
|
---|
16 | <sect1info>
|
---|
17 | <othername>$LastChangedBy$</othername>
|
---|
18 | <date>$Date$</date>
|
---|
19 | </sect1info>
|
---|
20 | <?dbhtml filename="gcc3.html" ?>
|
---|
21 | <title><application><acronym>GCC</acronym></application>-&gcc3-version;</title>
|
---|
22 | <indexterm zone="gcc3">
|
---|
23 | <primary sortas="a-GCC-3-3">GCC-&gcc3-version;</primary></indexterm>
|
---|
24 |
|
---|
25 | <sect2>
|
---|
26 | <title>Introduction to
|
---|
27 | <application><acronym>GCC</acronym></application>-&gcc3-version;</title>
|
---|
28 |
|
---|
29 | <para>The reason for installing
|
---|
30 | <application><acronym>GCC</acronym></application>-&gcc3-version; is that
|
---|
31 | some <acronym>BLFS</acronym> packages (such as compiled
|
---|
32 | <application>Java</application> and <application>OpenOffice</application>)
|
---|
33 | have not been updated to be compilable by
|
---|
34 | <application><acronym>GCC</acronym></application>-&gcc-version;. Additionally,
|
---|
35 | some pre-compiled packages may require the
|
---|
36 | <application><acronym>GCC</acronym></application>-&gcc3-version;
|
---|
37 | libraries.</para>
|
---|
38 |
|
---|
39 | <sect3><title>Package information</title>
|
---|
40 | <itemizedlist spacing='compact'>
|
---|
41 | <listitem><para>Download (HTTP): <ulink
|
---|
42 | url="&gcc3-download-http;"/></para></listitem>
|
---|
43 | <listitem><para>Download (FTP): <ulink
|
---|
44 | url="&gcc3-download-ftp;"/></para></listitem>
|
---|
45 | <listitem><para>Download MD5 sum: &gcc3-md5sum;</para></listitem>
|
---|
46 | <listitem><para>Download size: &gcc3-size;</para></listitem>
|
---|
47 | <listitem><para>Estimated disk space required:
|
---|
48 | &gcc3-buildsize;</para></listitem>
|
---|
49 | <listitem><para>Estimated build time:
|
---|
50 | &gcc3-time;</para></listitem></itemizedlist>
|
---|
51 | </sect3>
|
---|
52 |
|
---|
53 | <sect3><title>Additional downloads</title>
|
---|
54 | <itemizedlist spacing='compact'>
|
---|
55 | <listitem><para>Required patch: <ulink
|
---|
56 | url="&patch-root;/gcc-&gcc3-version;-no_fixincludes-1.patch"/></para>
|
---|
57 | </listitem>
|
---|
58 | <listitem><para>Required patch: <ulink
|
---|
59 | url="&patch-root;/gcc-&gcc3-version;-linkonce-1.patch"/></para>
|
---|
60 | </listitem>
|
---|
61 | </itemizedlist>
|
---|
62 | </sect3>
|
---|
63 |
|
---|
64 | <sect3><title><application><acronym>GCC</acronym>-3</application>
|
---|
65 | dependencies</title>
|
---|
66 | <sect4><title>Optional</title>
|
---|
67 | <para><xref linkend="dejagnu"/> (required to run the full test suite)</para>
|
---|
68 | </sect4>
|
---|
69 | </sect3>
|
---|
70 |
|
---|
71 | </sect2>
|
---|
72 |
|
---|
73 | <sect2>
|
---|
74 | <title>Installation of
|
---|
75 | <application><acronym>GCC</acronym>-3</application></title>
|
---|
76 |
|
---|
77 | <screen><userinput><command>patch -Np1 -i ../gcc-&gcc3-version;-no_fixincludes-1.patch &&
|
---|
78 | patch -Np1 -i ../gcc-&gcc3-version;-linkonce-1.patch &&
|
---|
79 | mkdir ../gcc-build &&
|
---|
80 | cd ../gcc-build &&
|
---|
81 | ../gcc-&gcc3-version;/configure \
|
---|
82 | --prefix=/opt/gcc-&gcc3-version; \
|
---|
83 | --enable-shared --enable-languages=c,c++ \
|
---|
84 | --enable-threads=posix &&
|
---|
85 | make bootstrap</command></userinput></screen>
|
---|
86 |
|
---|
87 | <para>If desired, run the test suite using the following commands. The
|
---|
88 | <command>test_summary</command> commands create log files which can be
|
---|
89 | compared to known good results located at <ulink
|
---|
90 | url="http://linuxfromscratch.org/~randy/gcc-334-lfs-6.0-test_summary.log"/>
|
---|
91 | and <ulink
|
---|
92 | url="http://linuxfromscratch.org/~randy/gcc-334-lfs-6.0-test_summary_short.log"/>.
|
---|
93 | </para>
|
---|
94 |
|
---|
95 | <screen><userinput><command>make -k check &&
|
---|
96 | ../gcc-3.3.4/contrib/test_summary >test_summary.log 2>&1 &&
|
---|
97 | ../gcc-3.3.4/contrib/test_summary | \
|
---|
98 | grep -A7 Summ >test_summary_short.log 2>&1</command></userinput></screen>
|
---|
99 |
|
---|
100 | <para>Now, as the root user:</para>
|
---|
101 |
|
---|
102 | <screen><userinput role='root'><command>make install &&
|
---|
103 | mv /opt/gcc-&gcc3-version;/lib/libstdc++.so.5* /usr/lib &&
|
---|
104 | ln -sf /usr/lib/libstdc++.so.5.0.6 /opt/gcc-&gcc3-version;/lib &&
|
---|
105 | ln -sf libstdc++.so.5.0.6 /opt/gcc-&gcc3-version;/lib/libstdc++.so.5 &&
|
---|
106 | chown -R root:root \
|
---|
107 | /opt/gcc-&gcc3-version;/lib/gcc-lib/i686-pc-linux-gnu/&gcc3-version;/include</command></userinput></screen>
|
---|
108 |
|
---|
109 | </sect2>
|
---|
110 |
|
---|
111 | <sect2>
|
---|
112 | <title>Command explanations</title>
|
---|
113 |
|
---|
114 | <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
|
---|
115 | <application><acronym>GCC</acronym></application> development team recommends
|
---|
116 | building in a separate directory.</para>
|
---|
117 |
|
---|
118 | <para><parameter>--enable-shared --enable-languages=c,c++
|
---|
119 | --enable-threads=posix</parameter>: Configures
|
---|
120 | <application><acronym>GCC</acronym></application> to build the
|
---|
121 | <application>C</application> and <application>C++</application> compilers and
|
---|
122 | enable the related <application>C++</application> options.</para>
|
---|
123 |
|
---|
124 | <para><command>mv /opt/gcc-&gcc3-version;/lib/libstdc++.so.5*
|
---|
125 | /usr/lib</command>: Moves the <application>C++</application> libraries to the
|
---|
126 | standard lib directory to avoid having to add
|
---|
127 | <userinput>/opt/gcc-&gcc3-version;/lib</userinput> to
|
---|
128 | <filename>/etc/ld.so.conf</filename>.</para>
|
---|
129 |
|
---|
130 | </sect2>
|
---|
131 |
|
---|
132 | <sect2>
|
---|
133 | <title>Configuring <application><acronym>GCC</acronym></application></title>
|
---|
134 |
|
---|
135 | <sect3><title>Configuration information</title>
|
---|
136 |
|
---|
137 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
138 | href="../../lib-config.xml"/>
|
---|
139 |
|
---|
140 | <para>If you only need the GCC-&gcc3-version; libraries, you may delete
|
---|
141 | <filename>/opt/gcc-&gcc3-version;</filename>.</para>
|
---|
142 |
|
---|
143 | <para>Whenever you need to use GCC-&gcc3-version; instead of your system
|
---|
144 | installed compiler, add
|
---|
145 | <filename class="directory">/opt/gcc-&gcc3-version;/bin</filename> to the
|
---|
146 | front of your <envar>PATH</envar> or (preferably) set the <envar>CC</envar>
|
---|
147 | environment variable before compiling the concerned package.</para>
|
---|
148 |
|
---|
149 | </sect3>
|
---|
150 |
|
---|
151 | </sect2>
|
---|
152 |
|
---|
153 | <sect2>
|
---|
154 | <title>Contents</title>
|
---|
155 |
|
---|
156 | <segmentedlist>
|
---|
157 | <segtitle>Installed Programs</segtitle>
|
---|
158 | <segtitle>Installed Libraries</segtitle>
|
---|
159 | <segtitle>Installed Directories</segtitle>
|
---|
160 | <seglistitem>
|
---|
161 | <seg>c++, cpp, g++, gcc, gccbug, gcov and architecture specific names of these
|
---|
162 | programs.</seg>
|
---|
163 | <seg>libgcc_s.so, libiberty.a, libstdc++.[a,so], libsupc++.a and other
|
---|
164 | support libraries and files.</seg>
|
---|
165 | <seg>/opt/gcc-&gcc3-version;</seg>
|
---|
166 | </seglistitem>
|
---|
167 | </segmentedlist>
|
---|
168 |
|
---|
169 | <sect3><title>Short Descriptions</title>
|
---|
170 | <para>The GCC-&gcc3-version; package contains the
|
---|
171 | <command>gcc</command>-&gcc3-version; <application>C</application> and
|
---|
172 | <application>C++</application> compilers and GCC-&gcc3-version;
|
---|
173 | <filename>libstdc++.so</filename> that is required by some commercial and
|
---|
174 | pre-compiled packages.</para>
|
---|
175 | </sect3>
|
---|
176 |
|
---|
177 | </sect2>
|
---|
178 |
|
---|
179 | </sect1>
|
---|