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-08-31 00:08:49 +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
|
2002-09-28 22:08:29 +01:00
|
|
|
best left alone. Therefore, if you have defined any environment variables
|
2002-04-19 19:27:01 +01:00
|
|
|
that override default optimizations, such as CFLAGS and CXXFLAGS, we
|
2002-09-28 22:08:29 +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:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2002-08-27 00:43:23 +01:00
|
|
|
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;.patch &&
|
2002-09-29 23:59:15 +01:00
|
|
|
patch -Np1 -i ../gcc-3.2-nofixincludes-2.patch &&
|
2002-08-27 00:43:23 +01:00
|
|
|
mkdir ../gcc-build &&
|
2001-10-27 23:21:44 +01:00
|
|
|
cd ../gcc-build &&
|
2002-06-13 05:22:33 +01:00
|
|
|
../gcc-&gcc-version;/configure --prefix=/static --enable-languages=c \
|
2002-09-20 22:11:28 +01:00
|
|
|
--disable-nls --disable-shared &&
|
2002-09-02 16:46:18 +01:00
|
|
|
echo "#define HAVE_GAS_HIDDEN 1" >> gcc/auto-host.h &&
|
2001-10-27 23:21:44 +01:00
|
|
|
make BOOT_LDFLAGS=-static bootstrap &&
|
2002-05-25 01:19:47 +01:00
|
|
|
make prefix=$LFS/static install &&
|
2002-05-27 04:17:49 +01:00
|
|
|
ln -s gcc $LFS/static/bin/cc</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|