1 |
268 |
jeremybenn |
<html lang="en">
|
2 |
|
|
<head>
|
3 |
|
|
<title>Installing GCC: Old documentation</title>
|
4 |
|
|
<meta http-equiv="Content-Type" content="text/html">
|
5 |
|
|
<meta name="description" content="Installing GCC: Old documentation">
|
6 |
|
|
<meta name="generator" content="makeinfo 4.12">
|
7 |
|
|
<link title="Top" rel="top" href="#Top">
|
8 |
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
9 |
|
|
<!--
|
10 |
|
|
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
|
11 |
|
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
12 |
|
|
2008 Free Software Foundation, Inc.
|
13 |
|
|
|
14 |
|
|
Permission is granted to copy, distribute and/or modify this document
|
15 |
|
|
under the terms of the GNU Free Documentation License, Version 1.2 or
|
16 |
|
|
any later version published by the Free Software Foundation; with no
|
17 |
|
|
Invariant Sections, the Front-Cover texts being (a) (see below), and
|
18 |
|
|
with the Back-Cover Texts being (b) (see below). A copy of the
|
19 |
|
|
license is included in the section entitled "GNU Free Documentation License".
|
20 |
|
|
|
21 |
|
|
(a) The FSF's Front-Cover Text is:
|
22 |
|
|
|
23 |
|
|
A GNU Manual
|
24 |
|
|
|
25 |
|
|
(b) The FSF's Back-Cover Text is:
|
26 |
|
|
|
27 |
|
|
You have freedom to copy and modify this GNU Manual, like GNU
|
28 |
|
|
software. Copies published by the Free Software Foundation raise
|
29 |
|
|
funds for GNU development.-->
|
30 |
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
31 |
|
|
<style type="text/css"><!--
|
32 |
|
|
pre.display { font-family:inherit }
|
33 |
|
|
pre.format { font-family:inherit }
|
34 |
|
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
35 |
|
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
36 |
|
|
pre.smallexample { font-size:smaller }
|
37 |
|
|
pre.smalllisp { font-size:smaller }
|
38 |
|
|
span.sc { font-variant:small-caps }
|
39 |
|
|
span.roman { font-family:serif; font-weight:normal; }
|
40 |
|
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
41 |
|
|
--></style>
|
42 |
|
|
</head>
|
43 |
|
|
<body>
|
44 |
|
|
<h1 class="settitle">Installing GCC: Old documentation</h1>
|
45 |
|
|
<h1 align="center">Old installation documentation</h1>
|
46 |
|
|
|
47 |
|
|
<p>Note most of this information is out of date and superseded by the
|
48 |
|
|
previous chapters of this manual. It is provided for historical
|
49 |
|
|
reference only, because of a lack of volunteers to merge it into the
|
50 |
|
|
main manual.
|
51 |
|
|
|
52 |
|
|
<p>Here is the procedure for installing GCC on a GNU or Unix system.
|
53 |
|
|
|
54 |
|
|
<ol type=1 start=1>
|
55 |
|
|
<li>If you have chosen a configuration for GCC which requires other GNU
|
56 |
|
|
tools (such as GAS or the GNU linker) instead of the standard system
|
57 |
|
|
tools, install the required tools in the build directory under the names
|
58 |
|
|
<samp><span class="file">as</span></samp>, <samp><span class="file">ld</span></samp> or whatever is appropriate.
|
59 |
|
|
|
60 |
|
|
<p>Alternatively, you can do subsequent compilation using a value of the
|
61 |
|
|
<code>PATH</code> environment variable such that the necessary GNU tools come
|
62 |
|
|
before the standard system tools.
|
63 |
|
|
|
64 |
|
|
<li>Specify the host, build and target machine configurations. You do this
|
65 |
|
|
when you run the <samp><span class="file">configure</span></samp> script.
|
66 |
|
|
|
67 |
|
|
<p>The <dfn>build</dfn> machine is the system which you are using, the
|
68 |
|
|
<dfn>host</dfn> machine is the system where you want to run the resulting
|
69 |
|
|
compiler (normally the build machine), and the <dfn>target</dfn> machine is
|
70 |
|
|
the system for which you want the compiler to generate code.
|
71 |
|
|
|
72 |
|
|
<p>If you are building a compiler to produce code for the machine it runs
|
73 |
|
|
on (a native compiler), you normally do not need to specify any operands
|
74 |
|
|
to <samp><span class="file">configure</span></samp>; it will try to guess the type of machine you are on
|
75 |
|
|
and use that as the build, host and target machines. So you don't need
|
76 |
|
|
to specify a configuration when building a native compiler unless
|
77 |
|
|
<samp><span class="file">configure</span></samp> cannot figure out what your configuration is or guesses
|
78 |
|
|
wrong.
|
79 |
|
|
|
80 |
|
|
<p>In those cases, specify the build machine's <dfn>configuration name</dfn>
|
81 |
|
|
with the <samp><span class="option">--host</span></samp> option; the host and target will default to be
|
82 |
|
|
the same as the host machine.
|
83 |
|
|
|
84 |
|
|
<p>Here is an example:
|
85 |
|
|
|
86 |
|
|
<pre class="smallexample"> ./configure --host=sparc-sun-sunos4.1
|
87 |
|
|
</pre>
|
88 |
|
|
<p>A configuration name may be canonical or it may be more or less
|
89 |
|
|
abbreviated.
|
90 |
|
|
|
91 |
|
|
<p>A canonical configuration name has three parts, separated by dashes.
|
92 |
|
|
It looks like this: ‘<samp><var>cpu</var><span class="samp">-</span><var>company</var><span class="samp">-</span><var>system</var></samp>’.
|
93 |
|
|
(The three parts may themselves contain dashes; <samp><span class="file">configure</span></samp>
|
94 |
|
|
can figure out which dashes serve which purpose.) For example,
|
95 |
|
|
‘<samp><span class="samp">m68k-sun-sunos4.1</span></samp>’ specifies a Sun 3.
|
96 |
|
|
|
97 |
|
|
<p>You can also replace parts of the configuration by nicknames or aliases.
|
98 |
|
|
For example, ‘<samp><span class="samp">sun3</span></samp>’ stands for ‘<samp><span class="samp">m68k-sun</span></samp>’, so
|
99 |
|
|
‘<samp><span class="samp">sun3-sunos4.1</span></samp>’ is another way to specify a Sun 3.
|
100 |
|
|
|
101 |
|
|
<p>You can specify a version number after any of the system types, and some
|
102 |
|
|
of the CPU types. In most cases, the version is irrelevant, and will be
|
103 |
|
|
ignored. So you might as well specify the version if you know it.
|
104 |
|
|
|
105 |
|
|
<p>See <a href="#Configurations">Configurations</a>, for a list of supported configuration names and
|
106 |
|
|
notes on many of the configurations. You should check the notes in that
|
107 |
|
|
section before proceeding any further with the installation of GCC.
|
108 |
|
|
|
109 |
|
|
</ol>
|
110 |
|
|
|
111 |
|
|
<p><h2><a name="Configurations"></a>Configurations Supported by GCC</h2><a name="index-configurations-supported-by-GCC-1"></a>
|
112 |
|
|
Here are the possible CPU types:
|
113 |
|
|
|
114 |
|
|
<blockquote>
|
115 |
|
|
<!-- gmicro, fx80, spur and tahoe omitted since they don't work. -->
|
116 |
|
|
1750a, a29k, alpha, arm, avr, c<var>n</var>, clipper, dsp16xx, elxsi, fr30, h8300,
|
117 |
|
|
hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, i960, ip2k, m32r,
|
118 |
|
|
m68000, m68k, m6811, m6812, m88k, mcore, mips, mipsel, mips64, mips64el,
|
119 |
|
|
mn10200, mn10300, ns32k, pdp11, powerpc, powerpcle, romp, rs6000, sh, sparc,
|
120 |
|
|
sparclite, sparc64, v850, vax, we32k.
|
121 |
|
|
</blockquote>
|
122 |
|
|
|
123 |
|
|
<p>Here are the recognized company names. As you can see, customary
|
124 |
|
|
abbreviations are used rather than the longer official names.
|
125 |
|
|
|
126 |
|
|
<!-- What should be done about merlin, tek*, dolphin? -->
|
127 |
|
|
<blockquote>
|
128 |
|
|
acorn, alliant, altos, apollo, apple, att, bull,
|
129 |
|
|
cbm, convergent, convex, crds, dec, dg, dolphin,
|
130 |
|
|
elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi,
|
131 |
|
|
mips, motorola, ncr, next, ns, omron, plexus,
|
132 |
|
|
sequent, sgi, sony, sun, tti, unicom, wrs.
|
133 |
|
|
</blockquote>
|
134 |
|
|
|
135 |
|
|
<p>The company name is meaningful only to disambiguate when the rest of
|
136 |
|
|
the information supplied is insufficient. You can omit it, writing
|
137 |
|
|
just ‘<samp><var>cpu</var><span class="samp">-</span><var>system</var></samp>’, if it is not needed. For example,
|
138 |
|
|
‘<samp><span class="samp">vax-ultrix4.2</span></samp>’ is equivalent to ‘<samp><span class="samp">vax-dec-ultrix4.2</span></samp>’.
|
139 |
|
|
|
140 |
|
|
<p>Here is a list of system types:
|
141 |
|
|
|
142 |
|
|
<blockquote>
|
143 |
|
|
386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, ctix, cxux,
|
144 |
|
|
dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux,
|
145 |
|
|
linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs,
|
146 |
|
|
netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim,
|
147 |
|
|
solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta,
|
148 |
|
|
vxworks, winnt, xenix.
|
149 |
|
|
</blockquote>
|
150 |
|
|
|
151 |
|
|
<p class="noindent">You can omit the system type; then <samp><span class="file">configure</span></samp> guesses the
|
152 |
|
|
operating system from the CPU and company.
|
153 |
|
|
|
154 |
|
|
<p>You can add a version number to the system type; this may or may not
|
155 |
|
|
make a difference. For example, you can write ‘<samp><span class="samp">bsd4.3</span></samp>’ or
|
156 |
|
|
‘<samp><span class="samp">bsd4.4</span></samp>’ to distinguish versions of BSD. In practice, the version
|
157 |
|
|
number is most needed for ‘<samp><span class="samp">sysv3</span></samp>’ and ‘<samp><span class="samp">sysv4</span></samp>’, which are often
|
158 |
|
|
treated differently.
|
159 |
|
|
|
160 |
|
|
<p>‘<samp><span class="samp">linux-gnu</span></samp>’ is the canonical name for the GNU/Linux target; however
|
161 |
|
|
GCC will also accept ‘<samp><span class="samp">linux</span></samp>’. The version of the kernel in use is
|
162 |
|
|
not relevant on these systems. A suffix such as ‘<samp><span class="samp">libc1</span></samp>’ or ‘<samp><span class="samp">aout</span></samp>’
|
163 |
|
|
distinguishes major versions of the C library; all of the suffixed versions
|
164 |
|
|
are obsolete.
|
165 |
|
|
|
166 |
|
|
<p>If you specify an impossible combination such as ‘<samp><span class="samp">i860-dg-vms</span></samp>’,
|
167 |
|
|
then you may get an error message from <samp><span class="file">configure</span></samp>, or it may
|
168 |
|
|
ignore part of the information and do the best it can with the rest.
|
169 |
|
|
<samp><span class="file">configure</span></samp> always prints the canonical name for the alternative
|
170 |
|
|
that it used. GCC does not support all possible alternatives.
|
171 |
|
|
|
172 |
|
|
<p>Often a particular model of machine has a name. Many machine names are
|
173 |
|
|
recognized as aliases for CPU/company combinations. Thus, the machine
|
174 |
|
|
name ‘<samp><span class="samp">sun3</span></samp>’, mentioned above, is an alias for ‘<samp><span class="samp">m68k-sun</span></samp>’.
|
175 |
|
|
Sometimes we accept a company name as a machine name, when the name is
|
176 |
|
|
popularly used for a particular machine. Here is a table of the known
|
177 |
|
|
machine names:
|
178 |
|
|
|
179 |
|
|
<blockquote>
|
180 |
|
|
3300, 3b1, 3b<var>n</var>, 7300, altos3068, altos,
|
181 |
|
|
apollo68, att-7300, balance,
|
182 |
|
|
convex-c<var>n</var>, crds, decstation-3100,
|
183 |
|
|
decstation, delta, encore,
|
184 |
|
|
fx2800, gmicro, hp7<var>nn</var>, hp8<var>nn</var>,
|
185 |
|
|
hp9k2<var>nn</var>, hp9k3<var>nn</var>, hp9k7<var>nn</var>,
|
186 |
|
|
hp9k8<var>nn</var>, iris4d, iris, isi68,
|
187 |
|
|
m3230, magnum, merlin, miniframe,
|
188 |
|
|
mmax, news-3600, news800, news, next,
|
189 |
|
|
pbd, pc532, pmax, powerpc, powerpcle, ps2, risc-news,
|
190 |
|
|
rtpc, sun2, sun386i, sun386, sun3,
|
191 |
|
|
sun4, symmetry, tower-32, tower.
|
192 |
|
|
</blockquote>
|
193 |
|
|
|
194 |
|
|
<p class="noindent">Remember that a machine name specifies both the cpu type and the company
|
195 |
|
|
name.
|
196 |
|
|
If you want to install your own homemade configuration files, you can
|
197 |
|
|
use ‘<samp><span class="samp">local</span></samp>’ as the company name to access them. If you use
|
198 |
|
|
configuration ‘<samp><var>cpu</var><span class="samp">-local</span></samp>’, the configuration name
|
199 |
|
|
without the cpu prefix
|
200 |
|
|
is used to form the configuration file names.
|
201 |
|
|
|
202 |
|
|
<p>Thus, if you specify ‘<samp><span class="samp">m68k-local</span></samp>’, configuration uses
|
203 |
|
|
files <samp><span class="file">m68k.md</span></samp>, <samp><span class="file">local.h</span></samp>, <samp><span class="file">m68k.c</span></samp>,
|
204 |
|
|
<samp><span class="file">xm-local.h</span></samp>, <samp><span class="file">t-local</span></samp>, and <samp><span class="file">x-local</span></samp>, all in the
|
205 |
|
|
directory <samp><span class="file">config/m68k</span></samp>.
|
206 |
|
|
<hr />
|
207 |
|
|
<p><a href="./index.html">Return to the GCC Installation page</a>
|
208 |
|
|
|
209 |
|
|
<!-- ***GFDL******************************************************************** -->
|
210 |
|
|
<!-- *************************************************************************** -->
|
211 |
|
|
<!-- Part 6 The End of the Document -->
|
212 |
|
|
</body></html>
|
213 |
|
|
|