2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
2001-03-10 04:28:47 +00:00
|
|
|
<title>Installation of GCC</title>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2002-05-01 18:21:09 +01:00
|
|
|
<para>This package requires its patch to be applied before you can
|
|
|
|
install it. Make sure it's unpacked before running the installation
|
|
|
|
commands.</para>
|
|
|
|
|
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
|
|
|
|
recommend unsetting or modifying them when building binutils. You have
|
|
|
|
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:</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-languages=c,c++ \
|
|
|
|
--disable-nls --disable-shared --enable-threads=posix &&
|
|
|
|
make BOOT_LDFLAGS=-static bootstrap &&
|
|
|
|
make prefix=$LFS/usr install &&
|
|
|
|
cd $LFS/lib &&
|
|
|
|
ln -sf ../usr/bin/cpp &&
|
|
|
|
cd $LFS/usr/lib &&
|
|
|
|
ln -sf ../bin/cpp &&
|
|
|
|
cd $LFS/usr/bin &&
|
2002-04-05 20:21:29 +01:00
|
|
|
ln -sf gcc cc &&
|
|
|
|
rmdir $LFS/usr/*-gnu/include &&
|
|
|
|
rmdir $LFS/usr/*-gnu</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|