[6370fa6] | 1 | <sect2>
|
---|
| 2 | <title>Installation of GCC on the normal system if necessary</title>
|
---|
| 3 |
|
---|
| 4 | <para>
|
---|
| 5 | In order to compile Glibc-2.1.3 later on you need to have gcc-2.95.2
|
---|
| 6 | installed. Although any GCC version above 2.8 would do, 2.95.2 is the
|
---|
| 7 | highly
|
---|
| 8 | recommended version to use. egcs-2.91.x is also known to work. If you
|
---|
| 9 | don't have gcc-2.95.x or egcs-2.91.x you need to install gcc-2.95.2 on
|
---|
| 10 | your normal sytem before you can compile Glibc later in this chapter.
|
---|
| 11 | </para>
|
---|
| 12 |
|
---|
| 13 | <para>
|
---|
| 14 | To find out which compiler version your systems has, run the
|
---|
| 15 | following command:
|
---|
| 16 | </para>
|
---|
| 17 |
|
---|
| 18 | <blockquote><literallayout>
|
---|
| 19 |
|
---|
| 20 | <userinput>gcc --version</userinput>
|
---|
| 21 |
|
---|
| 22 | </literallayout></blockquote>
|
---|
| 23 |
|
---|
| 24 | <para>
|
---|
| 25 | If you normal Linux system does not have gcc-2.95.x or egcs-2.91.x
|
---|
| 26 | installed you need to install it now. We won't replace the current
|
---|
| 27 | compiler on your system, but instead we will install gcc in a separate
|
---|
| 28 | directory (/usr/local/gcc2952). This way no binaries or header files will be
|
---|
| 29 | replaced.
|
---|
| 30 | </para>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | After you unpacked the gcc-2.95.2 archive don't enter the newly created
|
---|
| 34 | gcc-2.95.2 directory but stay in the $LFS/usr/src directory. Install GCC by
|
---|
| 35 | running the following commands:
|
---|
| 36 | </para>
|
---|
| 37 |
|
---|
| 38 | <blockquote><literallayout>
|
---|
| 39 |
|
---|
| 40 | <userinput>mkdir $LFS/usr/src/gcc-build &&</userinput>
|
---|
| 41 | <userinput>cd $LFS/usr/src/gcc-build &&</userinput>
|
---|
| 42 | <userinput>../gcc-2.95.2/configure \</userinput>
|
---|
| 43 | <userinput> --prefix=/usr/local/gcc2952 \</userinput>
|
---|
| 44 | <userinput> --with-local-prefix=/usr/local/gcc2952
|
---|
| 45 | \</userinput>
|
---|
| 46 | <userinput>
|
---|
| 47 | --with-gxx-include-dir=/usr/local/gcc2952/include/g++ \</userinput>
|
---|
| 48 | <userinput> --enable-shared --enable-languages=c,c++
|
---|
| 49 | &&</userinput>
|
---|
| 50 | <userinput>make bootstrap &&</userinput>
|
---|
| 51 | <userinput>make install</userinput>
|
---|
| 52 |
|
---|
| 53 | </literallayout></blockquote>
|
---|
| 54 |
|
---|
| 55 | </sect2>
|
---|
| 56 |
|
---|