mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 19:32:03 +00:00
6370fa6cff
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@14 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
<sect2>
|
|
<title>Installation of GCC on the normal system if necessary</title>
|
|
|
|
<para>
|
|
In order to compile Glibc-2.1.3 later on you need to have gcc-2.95.2
|
|
installed. Although any GCC version above 2.8 would do, 2.95.2 is the
|
|
highly
|
|
recommended version to use. egcs-2.91.x is also known to work. If you
|
|
don't have gcc-2.95.x or egcs-2.91.x you need to install gcc-2.95.2 on
|
|
your normal sytem before you can compile Glibc later in this chapter.
|
|
</para>
|
|
|
|
<para>
|
|
To find out which compiler version your systems has, run the
|
|
following command:
|
|
</para>
|
|
|
|
<blockquote><literallayout>
|
|
|
|
<userinput>gcc --version</userinput>
|
|
|
|
</literallayout></blockquote>
|
|
|
|
<para>
|
|
If you normal Linux system does not have gcc-2.95.x or egcs-2.91.x
|
|
installed you need to install it now. We won't replace the current
|
|
compiler on your system, but instead we will install gcc in a separate
|
|
directory (/usr/local/gcc2952). This way no binaries or header files will be
|
|
replaced.
|
|
</para>
|
|
|
|
<para>
|
|
After you unpacked the gcc-2.95.2 archive don't enter the newly created
|
|
gcc-2.95.2 directory but stay in the $LFS/usr/src directory. Install GCC by
|
|
running the following commands:
|
|
</para>
|
|
|
|
<blockquote><literallayout>
|
|
|
|
<userinput>mkdir $LFS/usr/src/gcc-build &&</userinput>
|
|
<userinput>cd $LFS/usr/src/gcc-build &&</userinput>
|
|
<userinput>../gcc-2.95.2/configure \</userinput>
|
|
<userinput> --prefix=/usr/local/gcc2952 \</userinput>
|
|
<userinput> --with-local-prefix=/usr/local/gcc2952
|
|
\</userinput>
|
|
<userinput>
|
|
--with-gxx-include-dir=/usr/local/gcc2952/include/g++ \</userinput>
|
|
<userinput> --enable-shared --enable-languages=c,c++
|
|
&&</userinput>
|
|
<userinput>make bootstrap &&</userinput>
|
|
<userinput>make install</userinput>
|
|
|
|
</literallayout></blockquote>
|
|
|
|
</sect2>
|
|
|