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