source: chapter06/gcc-2953.xml@ e23384c4

Last change on this file since e23384c4 was 673b0d8, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Merged newxml into HEAD

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3435 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-gcc-2953">
7<title>GCC-&gcc-2953-version;</title>
8<?dbhtml filename="gcc-2953.html"?>
9
10<indexterm zone="ch-system-gcc-2953"><primary sortas="a-GCC-2953">GCC-2953</primary></indexterm>
11
12<screen>&buildtime; 1.5 SBU
13&buildtime; 130 MB</screen>
14
15<sect2>
16<title>Installation of GCC</title>
17
18<para>This package is known to behave badly when you have changed its
19default optimization flags (including the -march and -mcpu options).
20Therefore, if you have defined any environment variables that override
21default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting
22or modifying them when building GCC.</para>
23
24<para>This is an older release of GCC which we are going to install for the
25purpose of compiling the Linux kernel in <xref linkend="chapter-bootable"/>.
26This version is recommended by the kernel developers when you need absolute
27stability. Later versions of GCC have not received as much testing for Linux
28kernel compilation. Using a later version is likely to work, however, we
29recommend adhering to the kernel developer's advice and using the version here
30to compile your kernel.</para>
31
32<note><para>We don't install the C++ compiler or libraries here. However, there
33may be reasons why you would want to install them. More information can be found
34at <ulink url="&blfs-root;view/stable/general/gcc2.html"/>.</para></note>
35
36<para>We'll install this older release of GCC into the non-standard prefix of
37<filename class="directory">/opt</filename> so as to avoid interfering with
38the system GCC already installed in <filename class="directory">/usr</filename>
39 .</para>
40
41<para>Apply the patches and make a small adjustment:</para>
42
43<screen><userinput>patch -Np1 -i ../gcc-&gcc-2953-version;-2.patch
44patch -Np1 -i ../gcc-&gcc-2953-version;-no-fixinc.patch
45patch -Np1 -i ../gcc-&gcc-2953-version;-returntype-fix.patch
46echo timestamp &gt; gcc/cstamp-h.in</userinput></screen>
47
48<para>The GCC documentation recommends building GCC outside of the source
49directory in a dedicated build directory:</para>
50
51<screen><userinput>mkdir ../gcc-2-build
52cd ../gcc-2-build</userinput></screen>
53
54<para>Compile and install the compiler:</para>
55
56<screen><userinput>../gcc-&gcc-2953-version;/configure --prefix=/opt/gcc-&gcc-2953-version; \
57 --enable-shared --enable-languages=c \
58 --enable-threads=posix
59make bootstrap
60make install</userinput></screen>
61
62</sect2>
63
64</sect1>
Note: See TracBrowser for help on using the repository browser.