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