2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Installation of GCC</title>
|
|
|
|
|
2002-04-19 19:27:01 +01:00
|
|
|
<para>This package is known to behave badly when you have changed its
|
|
|
|
default optimization flags (including the -march and -mcpu options). GCC is
|
|
|
|
best left alone. Therefore, if you have defined any environment variables
|
|
|
|
that override default optimizations, such as CFLAGS and CXXFLAGS, we
|
2002-05-28 20:43:00 +01:00
|
|
|
recommend unsetting or modifying them when building Gcc. You have
|
2002-04-19 19:27:01 +01:00
|
|
|
been warned.</para>
|
2001-09-05 15:13:36 +01:00
|
|
|
|
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
|
|
|
|
2002-05-27 04:17:49 +01:00
|
|
|
<para><screen><userinput>mkdir ../gcc-build &&
|
2001-10-27 23:21:44 +01:00
|
|
|
cd ../gcc-build &&
|
|
|
|
../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
|
2002-05-27 04:17:49 +01:00
|
|
|
--enable-languages=c,c++ --enable-threads=posix \
|
|
|
|
--with-slibdir=/lib &&
|
2001-10-27 23:21:44 +01:00
|
|
|
make bootstrap &&
|
2001-12-10 16:40:26 +00:00
|
|
|
make install &&
|
2002-08-18 18:26:58 +01:00
|
|
|
ln -s ../usr/bin/cpp /lib &&
|
|
|
|
ln -s ../bin/cpp /usr/lib &&
|
|
|
|
ln -s gcc /usr/bin/cc</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|