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