2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Installation of GCC</title>
|
|
|
|
|
2001-09-20 02:47:28 +01:00
|
|
|
<para>This package is known to behave badly when you have changed its default
|
2001-09-05 15:13:36 +01:00
|
|
|
optimization flags (including the -march and -mcpu options). GCC is best
|
|
|
|
left alone, so we recommend you unsetting CFLAGS, CXXFLAGS and other
|
|
|
|
such variables/settings that would change the default optimization that
|
|
|
|
it comes with.</para>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Install GCC by running the following commands. These commands will build
|
2001-06-28 00:13:21 +01:00
|
|
|
the C and C++ compiler. Other compilers are available within the gcc
|
2001-10-16 00:34:45 +01:00
|
|
|
package. If you want to build all the other available compilers too,
|
2001-06-28 00:13:21 +01:00
|
|
|
leave out the --enable-languages=c,c++ option in the configure command.
|
|
|
|
See the GCC documentation for more details on which additional compilers
|
2001-07-22 20:45:10 +01:00
|
|
|
are available.</para>
|
2001-06-28 00:13:21 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Note: the build of other compilers is not tested by the people
|
|
|
|
who actively work on LFS.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-10-27 23:21:44 +01:00
|
|
|
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;.patch &&
|
|
|
|
mkdir ../gcc-build &&
|
|
|
|
cd ../gcc-build &&
|
|
|
|
../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
|
|
|
|
--enable-languages=c,c++ --enable-threads=posix &&
|
|
|
|
make bootstrap &&
|
2001-12-10 16:40:26 +00:00
|
|
|
make install &&
|
|
|
|
cd /lib &&
|
|
|
|
ln -sf ../usr/bin/cpp &&
|
|
|
|
cd /usr/lib &&
|
|
|
|
ln -sf ../bin/cpp &&
|
|
|
|
cd /usr/bin &&
|
|
|
|
ln -sf gcc cc</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|