[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY gcc2-download-http "http://ftp.gnu.org/gnu/gcc/gcc-&gcc2-version;.tar.gz">
|
---|
| 8 | <!ENTITY gcc2-download-ftp "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc2-version;.tar.gz">
|
---|
| 9 | <!ENTITY gcc2-size "9.4 MB">
|
---|
| 10 | <!ENTITY gcc2-buildsize "150 MB">
|
---|
| 11 | <!ENTITY gcc2-time "2.60 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
[58bd309a] | 14 | <sect1 id="gcc2" xreflabel="GCC-&gcc2-version;">
|
---|
[a0f03b0] | 15 | <sect1info>
|
---|
[5cd0959d] | 16 | <othername>$LastChangedBy$</othername>
|
---|
| 17 | <date>$Date$</date>
|
---|
[a0f03b0] | 18 | </sect1info>
|
---|
[19aa75a] | 19 | <?dbhtml filename="gcc2.html" ?>
|
---|
[58bd309a] | 20 | <title>GCC-&gcc2-version;</title>
|
---|
[3b03fa57] | 21 |
|
---|
[52d29f7] | 22 | <sect2>
|
---|
| 23 | <title>Introduction to <application><acronym>GCC</acronym></application>-&gcc2-version;</title>
|
---|
[c230e05] | 24 |
|
---|
[52d29f7] | 25 | <para>There are two reasons for installing
|
---|
| 26 | <acronym>GCC</acronym>-&gcc2-version;. The first is that the kernel
|
---|
| 27 | developers have certified <acronym>GCC</acronym>-&gcc2-version; as the
|
---|
| 28 | preferred compiler for compiling the kernel. The other (and more compelling
|
---|
| 29 | reason) is that some commercial closed-source packages (such as Netscape
|
---|
| 30 | Navigator, Yahoo Pager) and precompiled packages (such as Mozilla)
|
---|
| 31 | are linked against <acronym>GCC</acronym>-&gcc2-version; libs.</para>
|
---|
[c230e05] | 32 |
|
---|
[52d29f7] | 33 | <sect3><title>Package information</title>
|
---|
| 34 | <itemizedlist spacing='compact'>
|
---|
| 35 | <listitem><para>Download (HTTP): <ulink
|
---|
| 36 | url="&gcc2-download-http;"/></para></listitem>
|
---|
| 37 | <listitem><para>Download (FTP): <ulink
|
---|
| 38 | url="&gcc2-download-ftp;"/></para></listitem>
|
---|
| 39 | <listitem><para>Download size: &gcc2-size;</para></listitem>
|
---|
| 40 | <listitem><para>Estimated Disk space required:
|
---|
| 41 | &gcc2-buildsize;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated build time:
|
---|
| 43 | &gcc2-time;</para></listitem></itemizedlist>
|
---|
| 44 | </sect3>
|
---|
[c230e05] | 45 |
|
---|
[52d29f7] | 46 | <sect3><title>Additional downloads</title>
|
---|
| 47 | <itemizedlist spacing='compact'>
|
---|
[07b157f4] | 48 | <listitem><para>Required Patch: <ulink
|
---|
| 49 | url="&patch-root;/gcc-&gcc2-version;-2.patch"/></para></listitem>
|
---|
| 50 | <listitem><para>Required Patch: <ulink
|
---|
| 51 | url="&patch-root;/gcc-&gcc2-version;-no_fixinc-1.patch"/></para></listitem>
|
---|
| 52 | <listitem><para>Required Patch: <ulink
|
---|
| 53 | url="&patch-root;/gcc-&gcc2-version;-returntype_fix-1.patch"/></para></listitem>
|
---|
[52d29f7] | 54 | </itemizedlist>
|
---|
| 55 | </sect3>
|
---|
| 56 |
|
---|
| 57 | </sect2>
|
---|
| 58 |
|
---|
[c230e05] | 59 | <sect2>
|
---|
| 60 | <title>Installation of <application><acronym>GCC</acronym></application></title>
|
---|
| 61 |
|
---|
| 62 | <para>Apply the patches:</para>
|
---|
| 63 |
|
---|
| 64 | <screen><userinput><command>patch -Np1 -i ../gcc-&gcc2-version;-2.patch &&
|
---|
| 65 | patch -Np1 -i ../gcc-&gcc2-version;-no_fixinc-1.patch &&
|
---|
| 66 | patch -Np1 -i ../gcc-&gcc2-version;-returntype_fix-1.patch</command></userinput></screen>
|
---|
| 67 |
|
---|
| 68 | <para>The <acronym>GCC</acronym> development team recommends building in a
|
---|
| 69 | separate directory.</para>
|
---|
| 70 |
|
---|
| 71 | <screen><userinput><command>mkdir ../gcc-build &&
|
---|
| 72 | cd ../gcc-build</command></userinput></screen>
|
---|
| 73 |
|
---|
| 74 | <para>Configure <acronym>GCC</acronym> to build the
|
---|
| 75 | <application>C</application> and <application>C++</application> compilers and
|
---|
| 76 | enable the related <application>C++</application> options.</para>
|
---|
| 77 |
|
---|
| 78 | <screen><userinput><command>../gcc-&gcc2-version;/configure \
|
---|
| 79 | --prefix=/opt/gcc-&gcc2-version; \
|
---|
| 80 | --enable-shared --enable-languages=c,c++ \
|
---|
| 81 | --enable-threads=posix</command></userinput></screen>
|
---|
| 82 |
|
---|
| 83 | <para>Compile and install <acronym>GCC</acronym>:</para>
|
---|
| 84 |
|
---|
| 85 | <screen><userinput><command>make bootstrap &&
|
---|
| 86 | make install</command></userinput></screen>
|
---|
| 87 |
|
---|
| 88 | <para>Make note of the library that is installed.</para>
|
---|
| 89 |
|
---|
| 90 | <screen><userinput><command>L=`find /opt/gcc-&gcc2-version;/lib -name "*libstdc++*.so" -type f` &&
|
---|
| 91 | IL=`basename $L`</command></userinput></screen>
|
---|
| 92 |
|
---|
| 93 | <para>Move the <application>C++</application> libraries to the standard lib
|
---|
| 94 | directory to avoid having to add <userinput>/opt/gcc-&gcc2-version;/lib
|
---|
| 95 | </userinput> to <filename>/etc/ld.so.conf</filename>.</para>
|
---|
| 96 |
|
---|
| 97 | <screen><userinput><command>for i in /opt/gcc-&gcc2-version;/lib/*.so*; do mv -f $i /usr/lib;
|
---|
| 98 | ln -sf /usr/lib/`basename $i` /opt/gcc-&gcc2-version;/lib; done</command></userinput></screen>
|
---|
| 99 |
|
---|
| 100 | <para>Create symlinks required by commercial and precompiled packages.</para>
|
---|
| 101 |
|
---|
| 102 | <screen><userinput><command>ln -sf $IL /usr/lib/libstdc++-libc6.1-1.so.2 &&
|
---|
| 103 | ln -sf $IL /usr/lib/libstdc++-libc6.2-2.so.3 &&
|
---|
| 104 | ln -sf $IL /usr/lib/libstdc++-libc6.3-2.so.3</command></userinput></screen>
|
---|
| 105 |
|
---|
| 106 | </sect2>
|
---|
| 107 |
|
---|
[52d29f7] | 108 | <sect2>
|
---|
| 109 | <title>Configuring <application><acronym>GCC</acronym></application></title>
|
---|
[c230e05] | 110 |
|
---|
[52d29f7] | 111 | <sect3><title>Configuration Information</title>
|
---|
[c230e05] | 112 |
|
---|
[52d29f7] | 113 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../../lib-config.xml"/>
|
---|
[c230e05] | 114 |
|
---|
[52d29f7] | 115 | <para>The instructions given above make compatibility symlinks that pre-compiled
|
---|
| 116 | packages in <acronym>BLFS</acronym> require. You may create additional
|
---|
| 117 | compatibility links based on your requirements.</para>
|
---|
[c230e05] | 118 |
|
---|
[52d29f7] | 119 | <para>If you only need the GCC-&gcc2-version; libraries, you may delete
|
---|
| 120 | <filename>/opt/gcc-&gcc2-version;</filename>.</para>
|
---|
[c230e05] | 121 |
|
---|
[52d29f7] | 122 | <para>Whenever you need to use GCC-&gcc2-version; instead of your system
|
---|
| 123 | installed compiler, add
|
---|
[c230e05] | 124 | <filename class="directory">/opt/gcc-&gcc2-version;/bin</filename> to the
|
---|
| 125 | front of your <envar>PATH</envar> or (preferably) set the <envar>CC</envar>
|
---|
[52d29f7] | 126 | environment variable before compiling the concerned package.</para>
|
---|
[c230e05] | 127 |
|
---|
[52d29f7] | 128 | </sect3>
|
---|
[c230e05] | 129 |
|
---|
[52d29f7] | 130 | </sect2>
|
---|
| 131 |
|
---|
| 132 | <sect2>
|
---|
| 133 | <title>Contents</title>
|
---|
[c230e05] | 134 |
|
---|
[52d29f7] | 135 | <para>The GCC-&gcc2-version; package contains the
|
---|
| 136 | <command>gcc</command>-&gcc2-version; <application>C</application> and
|
---|
| 137 | <application>C++</application> compilers and GCC-&gcc2-version;
|
---|
| 138 | <filename>libstdc++.so</filename> that is required by some commercial and
|
---|
| 139 | pre-compiled packages.</para>
|
---|
[c230e05] | 140 |
|
---|
[52d29f7] | 141 | </sect2>
|
---|
[3b03fa57] | 142 |
|
---|
| 143 | </sect1>
|
---|
| 144 |
|
---|