1 | <sect2>
|
---|
2 | <title>Installation of <application><acronym>GCC</acronym></application></title>
|
---|
3 |
|
---|
4 | <para>Apply the patches:</para>
|
---|
5 |
|
---|
6 | <screen><userinput><command>patch -Np1 -i ../gcc-&gcc2-version;-2.patch &&
|
---|
7 | patch -Np1 -i ../gcc-&gcc2-version;-no-fixinc.patch &&
|
---|
8 | patch -Np1 -i ../gcc-&gcc2-version;-returntype-fix.patch</command></userinput></screen>
|
---|
9 |
|
---|
10 | <para>The <acronym>GCC</acronym> development team recommends building in a
|
---|
11 | separate directory.</para>
|
---|
12 |
|
---|
13 | <screen><userinput><command>mkdir ../gcc-build &&
|
---|
14 | cd ../gcc-build</command></userinput></screen>
|
---|
15 |
|
---|
16 | <para>Configure <acronym>GCC</acronym> to build the
|
---|
17 | <application>C</application> and <application>C++</application> compilers and
|
---|
18 | enable the related <application>C++</application> options.</para>
|
---|
19 | <screen><userinput><command>../gcc-&gcc2-version;/configure \
|
---|
20 | --prefix=/opt/gcc-&gcc2-version; \
|
---|
21 | --enable-shared --enable-languages=c,c++ \
|
---|
22 | --enable-threads=posix</command></userinput></screen>
|
---|
23 |
|
---|
24 | <para>Compile and install <acronym>GCC</acronym>:</para>
|
---|
25 | <screen><userinput><command>make bootstrap &&
|
---|
26 | make install</command></userinput></screen>
|
---|
27 |
|
---|
28 | <para>Make note of the library that is installed.</para>
|
---|
29 | <screen><userinput><command>L=`find /opt/gcc-&gcc2-version;/lib -name "*libstdc++*.so" -type f` &&
|
---|
30 | IL=`basename $L`</command></userinput></screen>
|
---|
31 |
|
---|
32 | <para>Move the <application>C++</application> libraries to the standard lib
|
---|
33 | directory to avoid having to add <userinput>/opt/gcc-&gcc2-version;/lib
|
---|
34 | </userinput> to <filename>/etc/ld.so.conf</filename>.</para>
|
---|
35 |
|
---|
36 | <screen><userinput><command>for i in /opt/gcc-&gcc2-version;/lib/*.so*; do mv -f $i /usr/lib;
|
---|
37 | ln -sf /usr/lib/`basename $i` /opt/gcc-&gcc2-version;/lib; done</command></userinput></screen>
|
---|
38 |
|
---|
39 | <para>Create symlinks required by commercial and precompiled packages.</para>
|
---|
40 | <screen><userinput><command>ln -sf $IL /usr/lib/libstdc++-libc6.1-1.so.2 &&
|
---|
41 | ln -sf $IL /usr/lib/libstdc++-libc6.2-2.so.3 &&
|
---|
42 | ln -sf $IL /usr/lib/libstdc++-libc6.3-2.so.3</command></userinput></screen>
|
---|
43 |
|
---|
44 | </sect2>
|
---|