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-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-09 00:25:04 +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-05-27 04:17:49 +01:00
|
|
|
<para><screen><userinput>mkdir ../gcc-build &&
|
2001-10-27 23:21:44 +01:00
|
|
|
cd ../gcc-build &&
|
2002-05-25 01:19:47 +01:00
|
|
|
../gcc-&gcc-version;/configure --prefix=/static --enable-languages=c,c++ \
|
2001-10-27 23:21:44 +01:00
|
|
|
--disable-nls --disable-shared --enable-threads=posix &&
|
|
|
|
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>
|
|
|
|
|