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