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