mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
Removed the installation of a "local gcc"
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@43 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
a35e5d4449
commit
81797d0acb
@ -1,31 +0,0 @@
|
||||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para>
|
||||
<userinput>--with-local-prefix:</userinput> GCC installs a number of
|
||||
files in /usr/local even when --prefix is set to something else. We
|
||||
don't want that to happen in this case so that's why we use the
|
||||
--with-local-prefix option to change that path.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<userinput>--with-gxx-include-dir:</userinput> GCC installs the C++
|
||||
header files in /usr/include/g++ by default. Again, in this case we
|
||||
don't want that to happen, we want this GCC version to be installed
|
||||
completely under /usr/local/gcc2952.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<userinput>make bootstrap:</userinput> Compile GCC by bootstrapping it.
|
||||
Here that means the compiler will be built three times in total. First
|
||||
it is compiled with your system's default compiler (which will usually
|
||||
be a gcc or egcs compiler). This is stage 1 compiler. Then GCC will re-compile
|
||||
itself but instead of using your system's compiler it will use itself to
|
||||
compile itself again. This is the stage 2 compiler. Then it will compile
|
||||
itself a second time with the stage 2 compiler and compares the second
|
||||
and the third build to see if they are identical. If so, the
|
||||
compilation was a success.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -1,55 +0,0 @@
|
||||
<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.1
|
||||
installed. Although any GCC version above 2.8 would do, 2.95.2.1 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.1 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/gcc29521). This way no binaries or header files will be
|
||||
replaced.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After you unpacked the gcc-2.95.2.1 archive don't enter the newly created
|
||||
gcc-2.95.2.1 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.1/configure \</userinput>
|
||||
<userinput> --prefix=/usr/local/gcc29521 \</userinput>
|
||||
<userinput> --with-local-prefix=/usr/local/gcc29521
|
||||
\</userinput>
|
||||
<userinput>
|
||||
--with-gxx-include-dir=/usr/local/gcc29521/include/g++ \</userinput>
|
||||
<userinput> --enable-shared --enable-languages=c,c++
|
||||
&&</userinput>
|
||||
<userinput>make bootstrap &&</userinput>
|
||||
<userinput>make install</userinput>
|
||||
|
||||
</literallayout></blockquote>
|
||||
|
||||
</sect2>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<sect1 id="ch05-gcclocal">
|
||||
<title>Installing GCC on the normal system if necessary</title>
|
||||
|
||||
&c5-pp-gcc-local-inst;
|
||||
&c5-pp-gcc-local-exp;
|
||||
&aa-gcc-desc;
|
||||
|
||||
</sect1>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<para>
|
||||
Unpack the glibc-crypt and glibc-linuxthreads in the glibc-2.1.3
|
||||
directory, not in $LFS/usr/src. Don't enter the created directories. Just
|
||||
directory, not in /usr/src. Don't enter the created directories. Just
|
||||
unpack them and leave it with that.
|
||||
</para>
|
||||
|
||||
@ -18,8 +18,8 @@ with:
|
||||
|
||||
<blockquote><literallayout>
|
||||
|
||||
<userinput>mkdir $LFS/usr/src/glibc-build &&</userinput>
|
||||
<userinput>cd $LFS/usr/src/glibc-build</userinput>
|
||||
<userinput>mkdir /usr/src/glibc-build &&</userinput>
|
||||
<userinput>cd /usr/src/glibc-build</userinput>
|
||||
|
||||
</literallayout></blockquote>
|
||||
|
||||
@ -42,34 +42,15 @@ sysconfdir=/etc
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
Before we actually install Glibc you need to unpack the Glibc patch
|
||||
file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please note that the configure script of Glibc may complain about
|
||||
certain files in the /usr/include directory being too old and will be
|
||||
replaced, or that some symlink is not supposed to be there anymore (like
|
||||
the /usr/include/scsi symlink that's present on older Linux systems). If
|
||||
it asks you to move a symlink like scsi out of the way, please do so. If
|
||||
it says it will replace old files by the newer Glibc files you can
|
||||
ignore that. Glibc does not know that it will end up on $LFS when the
|
||||
configure script is run.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If your system had already a suitable GCC version installed, change to the
|
||||
Change to the
|
||||
<filename class="directory">$LFS/usr/src/glibc-build</filename>
|
||||
directory and install Glibc by running the following
|
||||
commands:
|
||||
directory and install Glibc by running the following commands:
|
||||
</para>
|
||||
|
||||
<blockquote><literallayout>
|
||||
|
||||
<userinput>cd ../glibc-2.1.3 &&</userinput>
|
||||
<userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
|
||||
<userinput>cd $LFS/usr/src/glibc-build &&</userinput>
|
||||
<userinput>../glibc-2.1.3/configure \</userinput>
|
||||
<userinput>cd /usr/src/glibc-build &&</userinput>
|
||||
<userinput>../glibc-2.2.1/configure \</userinput>
|
||||
<userinput> --prefix=/usr --enable-add-ons
|
||||
\</userinput>
|
||||
<userinput> --with-headers=$LFS/usr/include
|
||||
@ -77,33 +58,8 @@ commands:
|
||||
<userinput> --libexecdir=/usr/bin &&
|
||||
</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install_root=$LFS install &&</userinput>
|
||||
<userinput>make install_root=$LFS localedata/install-locales</userinput>
|
||||
|
||||
</literallayout></blockquote>
|
||||
|
||||
<para>
|
||||
If your system didn't have a suitable GCC version installed, change to the
|
||||
<filename class="directory">$LFS/usr/src/glibc-build</filename>
|
||||
directory and install Glibc using the gcc-2.95.2.1 you just installed by
|
||||
running the following commands:
|
||||
</para>
|
||||
|
||||
<blockquote><literallayout>
|
||||
|
||||
<userinput>cd ../glibc-2.1.3 &&</userinput>
|
||||
<userinput>patch -Np1 -i ../glibc-2.1.3.patch &&</userinput>
|
||||
<userinput>cd $LFS/usr/src/glibc-build &&</userinput>
|
||||
<userinput>CC=/usr/local/gcc2952/bin/gcc \</userinput>
|
||||
<userinput> ../glibc-2.1.3/configure --prefix=/usr
|
||||
--enable-add-ons \</userinput>
|
||||
<userinput> --with-headers=$LFS/usr/include \
|
||||
</userinput>
|
||||
<userinput> --libexecdir=/usr/bin &&
|
||||
</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install_root=$LFS install &&</userinput>
|
||||
<userinput>make install_root=$LFS localedata/install-locales</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>make localedata/install-locales</userinput>
|
||||
|
||||
</literallayout></blockquote>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user