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