From 73aedd1d35747ff2fad4ddf514dca810721a612a Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Sat, 1 Nov 2003 22:31:50 +0000 Subject: Merging caption and installation sections for all packages in chapters 5 and 6. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3052 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/gcc-2953.xml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'chapter06/gcc-2953.xml') diff --git a/chapter06/gcc-2953.xml b/chapter06/gcc-2953.xml index 0afac9ae7..f0f196ada 100644 --- a/chapter06/gcc-2953.xml +++ b/chapter06/gcc-2953.xml @@ -5,7 +5,57 @@ Estimated build time: &gcc-2953-time; Estimated required disk space: &gcc-2953-compsize; -&c6-gcc-2953-inst; + +   + + +Installation of GCC + +This package is known to behave badly when you have changed its +default optimization flags (including the -march and -mcpu options). +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 GCC. + +This is an older release of GCC which we are going to install for the +purpose of compiling the Linux kernel in . This +version is recommended +by the kernel developers when you need absolute stability. Later versions of +GCC have not received as much testing for Linux kernel compilation. Using a +later version is likely to work, however, we recommend adhering to the kernel +developer's advice and using the version here to compile your kernel. + +We don't install the C++ compiler or libraries here. However, there +may be reasons why you would want to install them. More information can be found +at . + +We'll install this older release of GCC into the non-standard prefix of +/opt so as to avoid interfering with +the system GCC already installed in /usr + . + +Apply the patches and make a small adjustment: + +patch -Np1 -i ../&gcc-2953-patch; +patch -Np1 -i ../&gcc-2953-no-fixinc-patch; +patch -Np1 -i ../&gcc-2953-returntype-fix-patch; +echo timestamp > gcc/cstamp-h.in + +The GCC documentation recommends building GCC outside of the source +directory in a dedicated build directory: + +mkdir ../gcc-2-build +cd ../gcc-2-build + +Compile and install gcc: + +../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \ +    --enable-shared --enable-languages=c \ +    --enable-threads=posix +make bootstrap +make install + + -- cgit v1.2.3-54-g00ecf