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-10-07 05:33:47 +01:00
|
|
|
<para>We won't be needing a C++ compiler until Chapter 6. So, only
|
|
|
|
the gcc-core tarball needs to be unpacked at this time.</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
|
|
|
|
Updated to autoconf-2.57, automake-1.7.2, binutils-2.13.1, e2fsprogs-1.32, gcc-3.2.1, libtool-1.4.3, linux-2.4.20, modutils-2.4.22, procps-3.1.3, sed-4.0.4, texinfo-4.3, util-linux-2.11y. Removed warning about --enable-kernel.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2235 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2002-12-15 21:32:51 +00:00
|
|
|
<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;-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-10-07 05:33:47 +01:00
|
|
|
../gcc-&gcc-version;/configure --prefix=/static \
|
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>
|
|
|
|
|