|
|
1.1.1.5 root 1: This is Info file gcc.info, produced by Makeinfo-1.54 from the input
1.1 root 2: file gcc.texi.
3:
4: This file documents the use and the internals of the GNU compiler.
5:
1.1.1.5 root 6: Published by the Free Software Foundation 675 Massachusetts Avenue
7: Cambridge, MA 02139 USA
8:
9: Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
1.1 root 10:
1.1.1.3 root 11: Permission is granted to make and distribute verbatim copies of this
12: manual provided the copyright notice and this permission notice are
13: preserved on all copies.
1.1 root 14:
15: Permission is granted to copy and distribute modified versions of
16: this manual under the conditions for verbatim copying, provided also
1.1.1.4 root 17: that the sections entitled "GNU General Public License" and "Protect
18: Your Freedom--Fight `Look And Feel'" are included exactly as in the
19: original, and provided that the entire resulting derived work is
20: distributed under the terms of a permission notice identical to this
21: one.
1.1 root 22:
23: Permission is granted to copy and distribute translations of this
24: manual into another language, under the above conditions for modified
1.1.1.3 root 25: versions, except that the sections entitled "GNU General Public
1.1.1.4 root 26: License" and "Protect Your Freedom--Fight `Look And Feel'", and this
27: permission notice, may be included in translations approved by the Free
28: Software Foundation instead of in the original English.
1.1 root 29:
30:
1.1.1.5 root 31: File: gcc.info, Node: Installation, Next: C Extensions, Prev: Invoking GCC, Up: Top
1.1.1.4 root 32:
1.1.1.5 root 33: Installing GNU CC
34: *****************
1.1.1.4 root 35:
1.1.1.5 root 36: Here is the procedure for installing GNU CC on a Unix system.
1.1.1.4 root 37:
38: * Menu:
39:
1.1.1.5 root 40: * Other Dir:: Compiling in a separate directory (not where the source is).
41: * Cross-Compiler:: Building and installing a cross-compiler.
42: * PA Install:: See below for installation on the HP Precision Architecture.
43: * Sun Install:: See below for installation on the Sun.
44: * 3b1 Install:: See below for installation on the 3b1.
45: * Unos Install:: See below for installation on Unos (from CRDS).
46: * VMS Install:: See below for installation on VMS.
47: * WE32K Install:: See below for installation on the 3b* aside from the 3b1.
48: * MIPS Install:: See below for installation on the MIPS Architecture.
49: * Collect2:: How `collect2' works; how it finds `ld'.
1.1.1.6 ! root 50: * Header Dirs:: Understanding the standard header file directories.
! 51:
! 52: You cannot install GNU C by itself on MSDOS; it will not compile
! 53: under any MSDOS compiler except itself. You need to get the complete
! 54: compilation package DJGPP, which includes binaries as well as sources,
! 55: and includes all the necessary compilation tools and libraries.
1.1.1.5 root 56:
57: 1. If you have built GNU CC previously in the same directory for a
58: different target machine, do `make distclean' to delete all files
59: that might be invalid. One of the files this deletes is
60: `Makefile'; if `make distclean' complains that `Makefile' does not
61: exist, it probably means that the directory is already suitably
62: clean.
63:
64: 2. On a System V release 4 system, make sure `/usr/bin' precedes
65: `/usr/ucb' in `PATH'. The `cc' command in `/usr/ucb' uses
66: libraries which have bugs.
67:
68: 3. Specify the host and target machine configurations. You do this by
69: running the file `configure' with appropriate arguments.
70:
71: If you are building a compiler to produce code for the machine it
1.1.1.6 ! root 72: runs on, specify just one machine type, with the `--target'
1.1.1.5 root 73: option; the host type will default to be the same as the target.
74: (For information on building a cross-compiler, see *Note
1.1.1.6 ! root 75: Cross-Compiler::.) Here is an example:
1.1.1.5 root 76:
77: configure --target=sparc-sun-sunos4.1
78:
1.1.1.6 ! root 79: If you run `configure' without specifying configuration arguments,
! 80: `configure' tries to guess the type of host you are on, and uses
! 81: that configuration type for both host and target. So you don't
! 82: need to specify a configuration, for building a native compiler,
! 83: unless `configure' cannot figure out what your configuration is.
! 84:
1.1.1.5 root 85: A configuration name may be canonical or it may be more or less
86: abbreviated.
87:
88: A canonical configuration name has three parts, separated by
89: dashes. It looks like this: `CPU-COMPANY-SYSTEM'. (The three
90: parts may themselves contain dashes; `configure' can figure out
91: which dashes serve which purpose.) For example,
92: `m68k-sun-sunos4.1' specifies a Sun 3.
93:
94: You can also replace parts of the configuration by nicknames or
95: aliases. For example, `sun3' stands for `m68k-sun', so
96: `sun3-sunos4.1' is another way to specify a Sun 3. You can also
97: use simply `sun3-sunos', since the version of SunOS is assumed by
98: default to be version 4. `sun3-bsd' also works, since `configure'
99: knows that the only BSD variant on a Sun 3 is SunOS.
100:
101: You can specify a version number after any of the system types,
102: and some of the CPU types. In most cases, the version is
103: irrelevant, and will be ignored. So you might as well specify the
104: version if you know it.
105:
106: Here are the possible CPU types:
107:
108: a29k, alpha, arm, cN, clipper, elxsi, h8300, hppa1.0, hppa1.1,
1.1.1.6 ! root 109: i370, i386, i486, i860, i960, m68000, m68k, m88k, mips,
! 110: ns32k, pyramid, romp, rs6000, sh, sparc, sparclite, vax,
! 111: we32k.
1.1.1.5 root 112:
113: Here are the recognized company names. As you can see, customary
114: abbreviations are used rather than the longer official names.
115:
116: alliant, altos, apollo, att, bull, cbm, convergent, convex,
117: crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp,
118: ibm, intergraph, isi, mips, motorola, ncr, next, ns, omron,
119: plexus, sequent, sgi, sony, sun, tti, unicom.
120:
121: The company name is meaningful only to disambiguate when the rest
122: of the information supplied is insufficient. You can omit it,
123: writing just `CPU-SYSTEM', if it is not needed. For example,
124: `vax-ultrix4.2' is equivalent to `vax-dec-ultrix4.2'.
125:
126: Here is a list of system types:
127:
128: aix, acis, aos, bsd, clix, ctix, dgux, dynix, genix, hpux,
1.1.1.6 ! root 129: isc, linux, luna, lynxos, mach, minix, newsos, osf, osfrose,
! 130: riscos, sco, solaris, sunos, sysv, ultrix, unos, vms.
1.1.1.5 root 131:
132: You can omit the system type; then `configure' guesses the
133: operating system from the CPU and company.
134:
135: You can add a version number to the system type; this may or may
136: not make a difference. For example, you can write `bsd4.3' or
137: `bsd4.4' to distinguish versions of BSD. In practice, the version
138: number is most needed for `sysv3' and `sysv4', which are often
139: treated differently.
140:
141: If you specify an impossible combination such as `i860-dg-vms',
142: then you may get an error message from `configure', or it may
143: ignore part of the information and do the best it can with the
144: rest. `configure' always prints the canonical name for the
145: alternative that it used.
146:
147: Often a particular model of machine has a name. Many machine
148: names are recognized as aliases for CPU/company combinations.
149: Thus, the machine name `sun3', mentioned above, is an alias for
150: `m68k-sun'. Sometimes we accept a company name as a machine name,
151: when the name is popularly used for a particular machine. Here is
152: a table of the known machine names:
153:
154: 3300, 3b1, 3bN, 7300, altos3068, altos, apollo68, att-7300,
155: balance, convex-cN, crds, decstation-3100, decstation, delta,
156: encore, fx2800, gmicro, hp7NN, hp8NN, hp9k2NN, hp9k3NN,
157: hp9k7NN, hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin,
158: miniframe, mmax, news-3600, news800, news, next, pbd, pc532,
159: pmax, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3,
160: sun4, symmetry, tower-32, tower.
161:
162: Remember that a machine name specifies both the cpu type and the
163: company name.
164:
165: There are four additional options you can specify independently to
166: describe variant hardware and software configurations. These are
167: `--with-gnu-as', `--with-gnu-ld', `--with-stabs' and `--nfp'.
168:
169: `--with-gnu-as'
170: If you will use GNU CC with the GNU assembler (GAS), you
171: should declare this by using the `--with-gnu-as' option when
172: you run `configure'.
173:
174: Using this option does not install GAS. It only modifies the
175: output of GNU CC to work with GAS. Building and installing
176: GAS is up to you.
177:
1.1.1.6 ! root 178: Conversely, if you *do not* wish to use GAS and do not specify
! 179: `--with-gnu-as' when building GNU CC, it is up to you to make
! 180: sure that GAS is not installed. GNU CC searches for a
! 181: program named `as' in various directories; if the program it
! 182: finds is GAS, then it runs GAS. If you are not sure where
! 183: GNU CC finds the assembler it is using, try specifying `-v'
! 184: when you run it.
1.1.1.5 root 185:
1.1.1.6 ! root 186: The systems where it makes a difference whether you use GAS
! 187: are
! 188: `hppa1.0-ANY-ANY', `hppa1.1-ANY-ANY', `i386-ANY-sysv',
! 189: `i386-ANY-isc',
! 190: `i860-ANY-bsd', `m68k-bull-sysv', `m68k-hp-hpux',
! 191: `m68k-sony-bsd',
! 192: `m68k-altos-sysv', `m68000-hp-hpux', `m68000-att-sysv', and
! 193: `mips-ANY'). On any other system, `--with-gnu-as' has no
! 194: effect.
! 195:
! 196: On the systems listed above (except for the HP-PA and for ISC
! 197: on the 386), if you use GAS, you should also use the GNU
! 198: linker (and specify `--with-gnu-ld').
1.1.1.5 root 199:
200: `--with-gnu-ld'
201: Specify the option `--with-gnu-ld' if you plan to use the GNU
202: linker with GNU CC.
203:
204: This option does not cause the GNU linker to be installed; it
205: just modifies the behavior of GNU CC to work with the GNU
206: linker. Specifically, it inhibits the installation of
207: `collect2', a program which otherwise serves as a front-end
208: for the system's linker on most configurations.
209:
210: `--with-stabs'
1.1.1.6 ! root 211: On MIPS based systems and on Alphas, you must specify whether
! 212: you want GNU CC to create the normal ECOFF debugging format,
! 213: or to use BSD-style stabs passed through the ECOFF symbol
! 214: table. The normal ECOFF debug format cannot fully handle
! 215: languages other than C. BSD stabs format can handle other
! 216: languages, but it only works with the GNU debugger GDB.
1.1.1.5 root 217:
218: Normally, GNU CC uses the ECOFF debugging format by default;
219: if you prefer BSD stabs, specify `--with-stabs' when you
220: configure GNU CC.
221:
222: No matter which default you choose when you configure GNU CC,
223: the user can use the `-gcoff' and `-gstabs+' options to
224: specify explicitly the debug format for a particular
225: compilation.
226:
1.1.1.6 ! root 227: `--with-stabs' is meaningful on the ISC system on the 386,
! 228: also, if `--with-gas' is used. It selects use of stabs
! 229: debugging information embedded in COFF output. This kind of
! 230: debugging information supports C++ well; ordinary COFF
! 231: debugging information does not.
! 232:
1.1.1.5 root 233: `--nfp'
234: On certain systems, you must specify whether the machine has
235: a floating point unit. These systems include
236: `m68k-sun-sunosN' and `m68k-isi-bsd'. On any other system,
237: `--nfp' currently has no effect, though perhaps there are
238: other systems where it could usefully make a difference.
239:
240: If you want to install your own homemade configuration files, you
241: can use `local' as the company name to access them. If you use
242: configuration `CPU-local', the configuration name without the cpu
243: prefix is used to form the configuration file names.
244:
245: Thus, if you specify `m68k-local', configuration uses files
246: `local.md', `local.h', `local.c', `xm-local.h', `t-local', and
247: `x-local', all in the directory `config/m68k'.
248:
249: Here is a list of configurations that have special treatment or
250: special things you must know:
251:
252: `alpha-*-osf1'
253: Systems using processors that implement the DEC Alpha
254: architecture and are running the OSF/1 operating system, for
255: example the DEC Alpha AXP systems. (VMS on the Alpha is not
256: currently supported by GNU CC.)
257:
1.1.1.6 ! root 258: Objective C and C++ do not yet work on the Alpha. We hope to
! 259: support C++ in version 2.6.
! 260:
1.1.1.5 root 261: GNU CC writes a `.verstamp' directive to the assembler output
262: file unless it is built as a cross-compiler. It gets the
263: version to use from the system header file
264: `/usr/include/stamp.h'. If you install a new version of
265: OSF/1, you should rebuild GCC to pick up the new version
266: stamp.
267:
268: Note that since the Alpha is a 64-bit architecture,
269: cross-compilers from 32-bit machines will not generate as
270: efficient code as that generated when the compiler is running
271: on a 64-bit machine because many optimizations that depend on
272: being able to represent a word on the target in an integral
273: value on the host cannot be performed. Building
1.1.1.6 ! root 274: cross-compilers on the Alpha for 32-bit machines has only
! 275: been tested in a few cases and may not work properly.
! 276:
! 277: `make compare' may fail on some versions of OSF/1 unless you
! 278: add `-save-temps' to `CFLAGS'. The same problem occurs on
! 279: Irix version 5.1.1. On these systems, the name of the
! 280: assembler input file is stored in the object file, and that
! 281: makes comparison fail if it differs between the `stage1' and
! 282: `stage2' compilations. The option `-save-temps' forces a
! 283: fixed name to be used for the assembler input file, instead
! 284: of a randomly chosen name in `/tmp'.
! 285:
! 286: GNU CC now supports both the native (ECOFF) debugging format
! 287: used by DBX and GDB and an encapsulated STABS format for use
! 288: only with GDB. See the discussion of the `--with-stabs'
! 289: option of `configure' above for more information on these
! 290: formats and how to select them.
! 291:
! 292: There is a bug in DEC's assembler that produces incorrect
! 293: line numbers for ECOFF format when the `.align' directive is
! 294: used. To work around this problem, GNU CC will not emit such
! 295: alignment directives even if optimization is being performed
! 296: if it is writing ECOFF format debugging information.
! 297: Unfortunately, this has the very undesirable side-effect that
! 298: code addresses when `-O' is specified are different depending
! 299: on whether or not `-g' is also specified.
! 300:
! 301: To avoid this behavior, specify `-gstabs+' and use GDB
! 302: instead of DBX. DEC is now aware of this problem with the
! 303: assembler and hopes to provide a fix shortly.
1.1.1.5 root 304:
305: `a29k'
306: AMD Am29k-family processors. These are normally used in
307: embedded applications. There are no standard Unix
308: configurations. This configuration corresponds to AMD's
309: standard calling sequence and binary interface and is
310: compatible with other 29k tools.
311:
312: You may need to make a variant of the file `a29k.h' for your
313: particular configuration.
314:
315: `a29k-*-bsd'
316: AMD Am29050 used in a system running a variant of BSD Unix.
317:
318: `elxsi-elxsi-bsd'
319: The Elxsi's C compiler has known limitations that prevent it
320: from compiling GNU C. Please contact `[email protected]' for
321: more details.
322:
1.1.1.6 ! root 323: `hppa*-*-*'
! 324: Using GAS is highly recommended for all HP-PA configurations.
! 325: See *Note PA Install:: for the special procedures needed to
! 326: compile GNU CC for the HP-PA.
! 327:
1.1.1.5 root 328: `i386-*-sco'
329: Compilation with RCC is recommended. Also, it may be a good
330: idea to link with GNU malloc instead of the malloc that comes
331: with the system.
332:
1.1.1.6 ! root 333: `i386-*-sco3.2.4'
! 334: Use this configuration for SCO release 3.2 version 4.
! 335:
1.1.1.5 root 336: `i386-*-isc'
337: It may be good idea to link with GNU malloc instead of the
338: malloc that comes with the system.
339:
340: `i386-*-esix'
341: It may be good idea to link with GNU malloc instead of the
342: malloc that comes with the system.
343:
344: `i386-ibm-aix'
345: You need to use GAS version 2.1 or later, and and LD from GNU
346: binutils version 2.2 or later.
347:
348: `i386-sequent'
349: Go to the Berkeley universe before compiling. In addition,
350: you probably need to create a file named `string.h'
351: containing just one line: `#include <strings.h>'.
352:
353: `i386-sun-sunos4'
354: You may find that you need another version of GNU CC to begin
355: bootstrapping with, since the current version when built with
356: the system's own compiler seems to get an infinite loop
357: compiling part of `libgcc2.c'. GNU CC version 2 compiled
358: with GNU CC (any version) seems not to have this problem.
359:
1.1.1.6 ! root 360: `i860-intel-osf1'
! 361: This is the Paragon. If you have version 1.0 of the
! 362: operating system, see *Note Installation Problems::, for
! 363: special things you need to do to compensate for peculiarities
! 364: in the system.
! 365:
1.1.1.5 root 366: `m68000-att'
367: AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to
368: compile GNU CC with this machine's standard C compiler, due
369: to bugs in that compiler. *Note 3b1 Install::. You can
370: bootstrap it more easily with previous versions of GNU CC if
371: you have them.
372:
373: `m68000-hp-bsd'
374: HP 9000 series 200 running BSD. Note that the C compiler
375: that comes with this system cannot compile GNU CC; contact
376: `[email protected]' to get binaries of GNU CC for bootstrapping.
377:
378: `m68k-altos'
379: Altos 3068. You must use the GNU assembler, linker and
380: debugger. Also, you must fix a kernel bug. Details in the
381: file `README.ALTOS'.
382:
1.1.1.6 ! root 383: `m68k-bull-sysv'
! 384: Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to
! 385: BOS-2.01. GNU CC works either with native assembler or GNU
! 386: assembler. You can use GNU assembler with native coff
! 387: generation by providing `--gas' to the configure script or
! 388: use GNU assembler with dbx-in-coff encapsulation by providing
! 389: `--gas --stabs'. For any problem with native assembler or for
! 390: availability of the DPX/2 port of GAS, contact
! 391: `[email protected]'.
! 392:
1.1.1.5 root 393: `m68k-hp-hpux'
394: HP 9000 series 300 or 400 running HP-UX. HP-UX version 8.0
395: has a bug in the assembler that prevents compilation of GNU
396: CC. To fix it, get patch PHCO_0800 from HP.
397:
398: In addition, `--gas' does not currently work with this
399: configuration. Changes in HP-UX have broken the library
400: conversion tool and the linker.
401:
402: `m68k-sun'
403: Sun 3. We do not provide a configuration file to use the Sun
404: FPA by default, because programs that establish signal
405: handlers for floating point traps inherently cannot work with
406: the FPA.
407:
408: `m88k-*-svr3'
409: Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference
410: port. These systems tend to use the Green Hills C, revision
411: 1.8.5, as the standard C compiler. There are apparently bugs
412: in this compiler that result in object files differences
413: between stage 2 and stage 3. If this happens, make the stage
414: 4 compiler and compare it to the stage 3 compiler. If the
415: stage 3 and stage 4 object files are identical, this suggests
416: you encountered a problem with the standard C compiler; the
417: stage 3 and 4 compilers may be usable.
418:
419: It is best, however, to use an older version of GNU CC for
420: bootstrapping if you have one.
421:
422: `m88k-*-dgux'
423: Motorola m88k running DG/UX. To build native or cross
424: compilers on DG/UX, you must first change to the 88open BCS
425: software development environment. This is done by issuing
426: this command:
427:
428: eval `sde-target m88kbcs`
429:
430: `m88k-tektronix-sysv3'
431: Tektronix XD88 running UTekV 3.2e. Do not turn on
432: optimization while building stage1 if you bootstrap with the
433: buggy Green Hills compiler. Also, The bundled LAI System V
434: NFS is buggy so if you build in an NFS mounted directory,
435: start from a fresh reboot, or avoid NFS all together.
436: Otherwise you may have trouble getting clean comparisons
437: between stages.
438:
439: `mips-mips-bsd'
440: MIPS machines running the MIPS operating system in BSD mode.
441: It's possible that some old versions of the system lack the
442: functions `memcpy', `memcmp', and `memset'. If your system
443: lacks these, you must remove or undo the definition of
444: `TARGET_MEM_FUNCTIONS' in `mips-bsd.h'.
445:
446: `mips-sgi-*'
447: Silicon Graphics MIPS machines running IRIX. In order to
448: compile GCC on an SGI the "c.hdr.lib" option must be
449: installed from the CD-ROM supplied from Silicon Graphics.
450: This is found on the 2nd CD in release 4.0.1.
451:
452: `mips-sony-sysv'
453: Sony MIPS NEWS. This works in NEWSOS 5.0.1, but not in 5.0.2
454: (which uses ELF instead of COFF). Support for 5.0.2 will
455: probably be provided soon by volunteers. In particular, the
456: linker does not like the code generated by GCC when shared
457: libraries are linked in.
458:
459: `ns32k-encore'
460: Encore ns32000 system. Encore systems are supported only
461: under BSD.
462:
463: `ns32k-*-genix'
464: National Semiconductor ns32000 system. Genix has bugs in
465: `alloca' and `malloc'; you must get the compiled versions of
466: these from GNU Emacs.
467:
468: `ns32k-sequent'
469: Go to the Berkeley universe before compiling. In addition,
470: you probably need to create a file named `string.h'
471: containing just one line: `#include <strings.h>'.
472:
473: `ns32k-utek'
474: UTEK ns32000 system ("merlin"). The C compiler that comes
475: with this system cannot compile GNU CC; contact
476: `tektronix!reed!mason' to get binaries of GNU CC for
477: bootstrapping.
478:
479: `romp-*-aos'
480: `romp-*-mach'
481: The only operating systems supported for the IBM RT PC are
482: AOS and MACH. GNU CC does not support AIX running on the RT.
483: We recommend you compile GNU CC with an earlier version of
484: itself; if you compile GNU CC with `hc', the Metaware
485: compiler, it will work, but you will get mismatches between
486: the stage 2 and stage 3 compilers in various files. These
487: errors are minor differences in some floating-point constants
488: and can be safely ignored; the stage 3 compiler is correct.
489:
490: `rs6000-*-aix'
491: *Read the file `README.RS6000' for information on how to get
492: a fix for problems in the IBM assembler that interfere with
493: GNU CC.* You must either obtain the new assembler or avoid
494: using the `-g' switch. Note that `Makefile.in' uses `-g' by
495: default when compiling `libgcc2.c'.
496:
1.1.1.6 ! root 497: The PowerPC and POWER2 architectures are now supported, but
! 498: have not been extensively tested due to lack of appropriate
! 499: systems. Only AIX is supported on the PowerPC.
! 500:
! 501: Objective C does not work on this architecture.
! 502:
! 503: XLC version 1.3.0.0 will miscompile `jump.c'. XLC version
! 504: 1.3.0.1 or later fixes this problem. We do not yet have a
! 505: PTF number for this fix.
! 506:
1.1.1.5 root 507: `vax-dec-ultrix'
508: Don't try compiling with Vax C (`vcc'). It produces
509: incorrect code in some cases (for example, when `alloca' is
510: used).
511:
512: Meanwhile, compiling `cp-parse.c' with pcc does not work
513: because of an internal table size limitation in that
514: compiler. To avoid this problem, compile just the GNU C
515: compiler first, and use it to recompile building all the
516: languages that you want to run.
517:
518: Here we spell out what files will be set up by `configure'.
519: Normally you need not be concerned with these files.
520:
521: * A symbolic link named `config.h' is made to the top-level
522: config file for the machine you will run the compiler on
523: (*note Config::.). This file is responsible for defining
524: information about the host machine. It includes `tm.h'.
525:
526: The top-level config file is located in the subdirectory
527: `config'. Its name is always `xm-SOMETHING.h'; usually
528: `xm-MACHINE.h', but there are some exceptions.
529:
530: If your system does not support symbolic links, you might
531: want to set up `config.h' to contain a `#include' command
532: which refers to the appropriate file.
533:
534: * A symbolic link named `tconfig.h' is made to the top-level
535: config file for your target machine. This is used for
536: compiling certain programs to run on that machine.
537:
538: * A symbolic link named `tm.h' is made to the
539: machine-description macro file for your target machine. It
540: should be in the subdirectory `config' and its name is often
541: `MACHINE.h'.
542:
543: * A symbolic link named `md' will be made to the machine
544: description pattern file. It should be in the `config'
545: subdirectory and its name should be `MACHINE.md'; but MACHINE
546: is often not the same as the name used in the `tm.h' file
547: because the `md' files are more general.
548:
549: * A symbolic link named `aux-output.c' will be made to the
550: output subroutine file for your machine. It should be in the
551: `config' subdirectory and its name should be `MACHINE.c'.
552:
553: * The command file `configure' also constructs the file
554: `Makefile' by adding some text to the template file
555: `Makefile.in'. The additional text comes from files in the
556: `config' directory, named `t-TARGET' and `x-HOST'. If these
557: files do not exist, it means nothing needs to be added for a
558: given target or host.
559:
560: 4. The standard directory for installing GNU CC is `/usr/local/lib'.
561: If you want to install its files somewhere else, specify
562: `--prefix=DIR' when you run `configure'. Here DIR is a directory
563: name to use instead of `/usr/local' for all purposes with one
564: exception: the directory `/usr/local/include' is searched for
565: header files no matter where you install the compiler.
566:
567: 5. Specify `--local-prefix=DIR' if you want the compiler to search
568: directory `DIR/include' for header files *instead* of
569: `/usr/local/include'. (This is for systems that have different
570: conventions for where to put site-specific things.)
571:
1.1.1.6 ! root 572: Unless you have a convention other than `/usr/local' for
! 573: site-specific files, it is a bad idea to specify `--local-prefix'.
! 574:
1.1.1.5 root 575: 6. Make sure the Bison parser generator is installed. (This is
576: unnecessary if the Bison output files `c-parse.c' and `cexp.c' are
577: more recent than `c-parse.y' and `cexp.y' and you do not plan to
578: change the `.y' files.)
579:
580: Bison versions older than Sept 8, 1988 will produce incorrect
581: output for `c-parse.c'.
582:
1.1.1.6 ! root 583: 7. If you have chosen a configuration for GNU CC which requires other
! 584: GNU tools (such as GAS or the GNU linker) instead of the standard
! 585: system tools, install the required tools in the build directory
! 586: under the names `as', `ld' or whatever is appropriate. This will
! 587: enable the compiler to find the proper tools for compilation of
! 588: the program `enquire'.
! 589:
! 590: Alternatively, you can do subsequent compilation using a value of
! 591: the `PATH' environment variable such that the necessary GNU tools
! 592: come before the standard system tools.
! 593:
! 594: 8. Build the compiler. Just type `make LANGUAGES=c' in the compiler
1.1.1.5 root 595: directory.
596:
597: `LANGUAGES=c' specifies that only the C compiler should be
598: compiled. The makefile normally builds compilers for all the
599: supported languages; currently, C, C++ and Objective C. However,
600: C is the only language that is sure to work when you build with
601: other non-GNU C compilers. In addition, building anything but C
602: at this stage is a waste of time.
603:
604: In general, you can specify the languages to build by typing the
605: argument `LANGUAGES="LIST"', where LIST is one or more words from
606: the list `c', `c++', and `objective-c'.
607:
608: Ignore any warnings you may see about "statement not reached" in
609: `insn-emit.c'; they are normal. Also, warnings about "unknown
610: escape sequence" are normal in `genopinit.c' and perhaps some
611: other files. Any other compilation errors may represent bugs in
612: the port to your machine or operating system, and should be
613: investigated and reported (*note Bugs::.).
614:
615: Some commercial compilers fail to compile GNU CC because they have
616: bugs or limitations. For example, the Microsoft compiler is said
617: to run out of macro space. Some Ultrix compilers run out of
618: expression space; then you need to break up the statement where
619: the problem happens.
620:
621: If you are building with a previous GNU C compiler, do not use
622: `CC=gcc' on the make command or by editing the Makefile. Instead,
623: use a full pathname to specify the compiler, such as
624: `CC=/usr/local/bin/gcc'. This is because make might execute the
625: `gcc' in the current directory before all of the compiler
626: components have been built.
627:
1.1.1.6 ! root 628: 9. If you are building a cross-compiler, stop here. *Note
1.1.1.5 root 629: Cross-Compiler::.
630:
1.1.1.6 ! root 631: 10. Move the first-stage object files and executables into a
1.1.1.5 root 632: subdirectory with this command:
633:
634: make stage1
635:
636: The files are moved into a subdirectory named `stage1'. Once
637: installation is complete, you may wish to delete these files with
638: `rm -r stage1'.
639:
1.1.1.6 ! root 640: 11. If you have chosen a configuration for GNU CC which requires other
1.1.1.5 root 641: GNU tools (such as GAS or the GNU linker) instead of the standard
642: system tools, install the required tools in the `stage1'
643: subdirectory under the names `as', `ld' or whatever is
644: appropriate. This will enable the stage 1 compiler to find the
645: proper tools in the following stage.
646:
647: Alternatively, you can do subsequent compilation using a value of
648: the `PATH' environment variable such that the necessary GNU tools
649: come before the standard system tools.
650:
1.1.1.6 ! root 651: 12. Recompile the compiler with itself, with this command:
1.1.1.5 root 652:
653: make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"
654:
655: This is called making the stage 2 compiler.
656:
657: The command shown above builds compilers for all the supported
658: languages. If you don't want them all, you can specify the
659: languages to build by typing the argument `LANGUAGES="LIST"'. LIST
660: should contain one or more words from the list `c', `c++',
661: `objective-c', and `proto'. Separate the words with spaces.
662: `proto' stands for the programs `protoize' and `unprotoize'; they
663: are not a separate language, but you use `LANGUAGES' to enable or
664: disable their installation.
665:
666: If you are going to build the stage 3 compiler, then you might
667: want to build only the C language in stage 2.
668:
669: Once you have built the stage 2 compiler, if you are short of disk
670: space, you can delete the subdirectory `stage1'.
671:
672: On a 68000 or 68020 system lacking floating point hardware, unless
673: you have selected a `tm.h' file that expects by default that there
674: is no such hardware, do this instead:
675:
676: make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float"
677:
1.1.1.6 ! root 678: 13. If you wish to test the compiler by compiling it with itself one
1.1.1.5 root 679: more time, install any other necessary GNU tools (such as GAS or
680: the GNU linker) in the `stage2' subdirectory as you did in the
681: `stage1' subdirectory, then do this:
682:
683: make stage2
684: make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
685:
686: This is called making the stage 3 compiler. Aside from the `-B'
687: option, the compiler options should be the same as when you made
688: the stage 2 compiler. But the `LANGUAGES' option need not be the
689: same. The command shown above builds compilers for all the
690: supported languages; if you don't want them all, you can specify
691: the languages to build by typing the argument `LANGUAGES="LIST"',
692: as described above.
693:
694: Then compare the latest object files with the stage 2 object
1.1.1.6 ! root 695: files--they ought to be identical, aside from time stamps (if any).
! 696:
! 697: On some systems, meaningful comparison of object files is
! 698: impossible; they always appear "different." This is currently
! 699: true on Solaris and probably on all systems that use ELF object
! 700: file format. Some other systems where this is so are listed below.
! 701:
! 702: Use this command to compare the files:
1.1.1.5 root 703:
704: make compare
705:
706: This will mention any object files that differ between stage 2 and
707: stage 3. Any difference, no matter how innocuous, indicates that
708: the stage 2 compiler has compiled GNU CC incorrectly, and is
709: therefore a potentially serious bug which you should investigate
710: and report (*note Bugs::.).
711:
712: If your system does not put time stamps in the object files, then
713: this is a faster way to compare them (using the Bourne shell):
714:
715: for file in *.o; do
716: cmp $file stage2/$file
717: done
718:
719: If you have built the compiler with the `-mno-mips-tfile' option on
720: MIPS machines, you will not be able to compare the files.
721:
1.1.1.6 ! root 722: The Alpha stores file names of internal temporary files in the
! 723: object files and `make compare' does not know how to ignore them,
! 724: so normally you cannot compare on the Alpha. However, if you use
! 725: the `-save-temps' option when compiling *both* stage 2 and stage
! 726: 3, this causes the same file names to be used in both stages; then
! 727: you can do the comparison.
1.1.1.5 root 728:
1.1.1.6 ! root 729: 14. Build the Objective C library (if you have built the Objective C
! 730: compiler). Here is the command to do this:
! 731:
! 732: make objc-runtime CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
! 733:
! 734: 15. Install the compiler driver, the compiler's passes and run-time
1.1.1.5 root 735: support with `make install'. Use the same value for `CC',
736: `CFLAGS' and `LANGUAGES' that you used when compiling the files
737: that are being installed. One reason this is necessary is that
738: some versions of Make have bugs and recompile files gratuitously
739: when you do this step. If you use the same variable values, those
740: files will be recompiled properly.
741:
742: For example, if you have built the stage 2 compiler, you can use
743: the following command:
744:
745: make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="LIST"
746:
747: This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1',
748: `cpp' and `libgcc.a' in the directory
749: `/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the
750: compiler driver program looks for them. Here TARGET is the target
751: machine type specified when you ran `configure', and VERSION is
752: the version number of GNU CC. This naming scheme permits various
753: versions and/or cross-compilers to coexist.
754:
755: This also copies the driver program `xgcc' into
756: `/usr/local/bin/gcc', so that it appears in typical execution
757: search paths.
758:
759: On some systems, this command causes recompilation of some files.
760: This is usually due to bugs in `make'. You should either ignore
761: this problem, or use GNU Make.
762:
763: *Warning: there is a bug in `alloca' in the Sun library. To avoid
764: this bug, be sure to install the executables of GNU CC that were
765: compiled by GNU CC. (That is, the executables from stage 2 or 3,
766: not stage 1.) They use `alloca' as a built-in function and never
767: the one in the library.*
768:
769: (It is usually better to install GNU CC executables from stage 2
770: or 3, since they usually run faster than the ones compiled with
771: some other compiler.)
772:
1.1.1.6 ! root 773: 16. Install the Objective C library (if you are installing the
! 774: Objective C compiler). Here is the command to do this:
1.1.1.5 root 775:
776: make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
777:
1.1.1.6 ! root 778: 17. If you're going to use C++, it's likely that you need to also
1.1.1.5 root 779: install the libg++ distribution. It should be available from the
780: same place where you got the GNU C distribution. Just as GNU C
781: does not distribute a C runtime library, it also does not include
782: a C++ run-time library. All I/O functionality, special class
783: libraries, etc., are available in the libg++ distribution.
784:
785:
786: File: gcc.info, Node: Other Dir, Next: Cross-Compiler, Up: Installation
787:
788: Compilation in a Separate Directory
789: ===================================
790:
791: If you wish to build the object files and executables in a directory
792: other than the one containing the source files, here is what you must
793: do differently:
794:
795: 1. Make sure you have a version of Make that supports the `VPATH'
796: feature. (GNU Make supports it, as do Make versions on most BSD
797: systems.)
798:
799: 2. If you have ever run `configure' in the source directory, you must
800: undo the configuration. Do this by running:
801:
802: make distclean
803:
804: 3. Go to the directory in which you want to build the compiler before
805: running `configure':
806:
807: mkdir gcc-sun3
808: cd gcc-sun3
809:
810: On systems that do not support symbolic links, this directory must
811: be on the same file system as the source code directory.
812:
813: 4. Specify where to find `configure' when you run it:
814:
815: ../gcc/configure ...
816:
817: This also tells `configure' where to find the compiler sources;
818: `configure' takes the directory from the file name that was used to
819: invoke it. But if you want to be sure, you can specify the source
820: directory with the `--srcdir' option, like this:
821:
822: ../gcc/configure --srcdir=../gcc sun3
823:
824: The directory you specify with `--srcdir' need not be the same as
825: the one that `configure' is found in.
826:
827: Now, you can run `make' in that directory. You need not repeat the
828: configuration steps shown above, when ordinary source files change. You
829: must, however, run `configure' again when the configuration files
830: change, if your system does not support symbolic links.
831:
832:
833: File: gcc.info, Node: Cross-Compiler, Next: PA Install, Prev: Other Dir, Up: Installation
834:
835: Building and Installing a Cross-Compiler
836: ========================================
837:
838: GNU CC can function as a cross-compiler for many machines, but not
839: all.
840:
1.1.1.6 ! root 841: * Cross-compilers for the Mips as target using the Mips assembler
! 842: currently do not work, because the auxiliary programs
! 843: `mips-tdump.c' and `mips-tfile.c' can't be compiled on anything
! 844: but a Mips. It does work to cross compile for a Mips if you use
! 845: the GNU assembler and linker.
! 846:
! 847: * Cross-compilers between machines with different floating point
! 848: formats have not all been made to work. GNU CC now has a floating
! 849: point emulator with which these can work, but each target machine
! 850: description needs to be updated to take advantage of it.
! 851:
! 852: * Cross-compilation between machines of different word sizes has not
! 853: really been addressed yet.
1.1.1.5 root 854:
855: Since GNU CC generates assembler code, you probably need a
856: cross-assembler that GNU CC can run, in order to produce object files.
857: If you want to link on other than the target machine, you need a
858: cross-linker as well. You also need header files and libraries suitable
859: for the target machine that you can install on the host machine.
860:
1.1.1.6 ! root 861: * Menu:
1.1 root 862:
1.1.1.6 ! root 863: * Steps of Cross:: Using a cross-compiler involves several steps
! 864: that may be carried out on different machines.
! 865: * Configure Cross:: Configuring a cross-compiler.
! 866: * Tools and Libraries:: Where to put the linker and assembler, and the C library.
! 867: * Cross Headers:: Finding and installing header files
! 868: for a cross-compiler.
! 869: * Cross Runtime:: Supplying arithmetic runtime routines (`libgcc1.a').
! 870: * Build Cross:: Actually compiling the cross-compiler.
1.1 root 871:
1.1.1.3 root 872:
1.1.1.6 ! root 873: File: gcc.info, Node: Steps of Cross, Next: Configure Cross, Up: Cross-Compiler
1.1.1.4 root 874:
1.1.1.6 ! root 875: Steps of Cross-Compilation
! 876: --------------------------
1.1.1.4 root 877:
1.1.1.6 ! root 878: To compile and run a program using a cross-compiler involves several
! 879: steps:
1.1.1.4 root 880:
1.1.1.6 ! root 881: * Run the cross-compiler on the host machine to produce assembler
! 882: files for the target machine. This requires header files for the
! 883: target machine.
! 884:
! 885: * Assemble the files produced by the cross-compiler. You can do this
! 886: either with an assembler on the target machine, or with a
! 887: cross-assembler on the host machine.
! 888:
! 889: * Link those files to make an executable. You can do this either
! 890: with a linker on the target machine, or with a cross-linker on the
! 891: host machine. Whichever machine you use, you need libraries and
! 892: certain startup files (typically `crt....o') for the target
! 893: machine.
! 894:
! 895: It is most convenient to do all of these steps on the same host
! 896: machine, since then you can do it all with a single invocation of GNU
! 897: CC. This requires a suitable cross-assembler and cross-linker. For
! 898: some targets, the GNU assembler and linker are available.
1.1 root 899:
900:
1.1.1.6 ! root 901: File: gcc.info, Node: Configure Cross, Next: Tools and Libraries, Prev: Steps of Cross, Up: Cross-Compiler
1.1 root 902:
1.1.1.6 ! root 903: Configuring a Cross-Compiler
! 904: ----------------------------
1.1.1.4 root 905:
1.1.1.6 ! root 906: To build GNU CC as a cross-compiler, you start out by running
! 907: `configure'. You must specify two different configurations, the host
! 908: and the target. Use the `--host=HOST' option for the host and
! 909: `--target=TARGET' to specify the target type. For example, here is how
! 910: to configure for a cross-compiler that runs on a hypothetical Intel 386
! 911: system and produces code for an HP 68030 system running BSD:
1.1.1.4 root 912:
1.1.1.6 ! root 913: configure --target=m68k-hp-bsd4.3 --host=i386-bozotheclone-bsd4.3
1.1.1.4 root 914:
1.1.1.6 ! root 915:
! 916: File: gcc.info, Node: Tools and Libraries, Next: Cross Headers, Prev: Configure Cross, Up: Cross-Compiler
1.1.1.4 root 917:
1.1.1.6 ! root 918: Tools and Libraries for a Cross-Compiler
! 919: ----------------------------------------
1.1.1.4 root 920:
1.1.1.6 ! root 921: If you have a cross-assembler and cross-linker available, you should
! 922: install them now. Put them in the directory `/usr/local/TARGET/bin'.
! 923: Here is a table of the tools you should put in this directory:
! 924:
! 925: `as'
! 926: This should be the cross-assembler.
! 927:
! 928: `ld'
! 929: This should be the cross-linker.
! 930:
! 931: `ar'
! 932: This should be the cross-archiver: a program which can manipulate
! 933: archive files (linker libraries) in the target machine's format.
! 934:
! 935: `ranlib'
! 936: This should be a program to construct a symbol table in an archive
! 937: file.
! 938:
! 939: The installation of GNU CC will find these programs in that
! 940: directory, and copy or link them to the proper place to for the
! 941: cross-compiler to find them when run later.
! 942:
! 943: The easiest way to provide these files is to build the Binutils
! 944: package and GAS. Configure them with the same `--host' and `--target'
! 945: options that you use for configuring GNU CC, then build and install
! 946: them. They install their executables automatically into the proper
! 947: directory. Alas, they do not support all the targets that GNU CC
! 948: supports.
! 949:
! 950: If you want to install libraries to use with the cross-compiler,
! 951: such as a standard C library, put them in the directory
! 952: `/usr/local/TARGET/lib'; installation of GNU CC copies all all the
! 953: files in that subdirectory into the proper place for GNU CC to find
! 954: them and link with them. Here's an example of copying some libraries
! 955: from a target machine:
! 956:
! 957: ftp TARGET-MACHINE
! 958: lcd /usr/local/TARGET/lib
! 959: cd /lib
! 960: get libc.a
! 961: cd /usr/lib
! 962: get libg.a
! 963: get libm.a
! 964: quit
! 965:
! 966: The precise set of libraries you'll need, and their locations on the
! 967: target machine, vary depending on its operating system.
! 968:
! 969: Many targets require "start files" such as `crt0.o' and `crtn.o'
! 970: which are linked into each executable; these too should be placed in
! 971: `/usr/local/TARGET/lib'. There may be several alternatives for
! 972: `crt0.o', for use with profiling or other compilation options. Check
! 973: your target's definition of `STARTFILE_SPEC' to find out what start
! 974: files it uses. Here's an example of copying these files from a target
! 975: machine:
! 976:
! 977: ftp TARGET-MACHINE
! 978: lcd /usr/local/TARGET/lib
! 979: prompt
! 980: cd /lib
! 981: mget *crt*.o
! 982: cd /usr/lib
! 983: mget *crt*.o
! 984: quit
1.1.1.3 root 985:
1.1.1.6 ! root 986:
! 987: File: gcc.info, Node: Cross Runtime, Next: Build Cross, Prev: Cross Headers, Up: Cross-Compiler
1.1.1.4 root 988:
1.1.1.6 ! root 989: `libgcc.a' and Cross-Compilers
! 990: ------------------------------
1.1.1.4 root 991:
1.1.1.6 ! root 992: Code compiled by GNU CC uses certain runtime support functions
! 993: implicitly. Some of these functions can be compiled successfully with
! 994: GNU CC itself, but a few cannot be. These problem functions are in the
! 995: source file `libgcc1.c'; the library made from them is called
! 996: `libgcc1.a'.
! 997:
! 998: When you build a native compiler, these functions are compiled with
! 999: some other compiler-the one that you use for bootstrapping GNU CC.
! 1000: Presumably it knows how to open code these operations, or else knows how
! 1001: to call the run-time emulation facilities that the machine comes with.
! 1002: But this approach doesn't work for building a cross-compiler. The
! 1003: compiler that you use for building knows about the host system, not the
! 1004: target system.
! 1005:
! 1006: So, when you build a cross-compiler you have to supply a suitable
! 1007: library `libgcc1.a' that does the job it is expected to do.
! 1008:
! 1009: To compile `libgcc1.c' with the cross-compiler itself does not work.
! 1010: The functions in this file are supposed to implement arithmetic
! 1011: operations that GNU CC does not know how to open code, for your target
! 1012: machine. If these functions are compiled with GNU CC itself, they will
! 1013: compile into infinite recursion.
! 1014:
! 1015: On any given target, most of these functions are not needed. If GNU
! 1016: CC can open code an arithmetic operation, it will not call these
! 1017: functions to perform the operation. It is possible that on your target
! 1018: machine, none of these functions is needed. If so, you can supply an
! 1019: empty library as `libgcc1.a'.
! 1020:
! 1021: Many targets need library support only for multiplication and
! 1022: division. If you are linking with a library that contains functions for
! 1023: multiplication and division, you can tell GNU CC to call them directly
! 1024: by defining the macros `MULSI3_LIBCALL', and the like. These macros
! 1025: need to be defined in the target description macro file. For some
! 1026: targets, they are defined already. This may be sufficient to avoid the
! 1027: need for libgcc1.a; if so, you can supply an empty library.
! 1028:
! 1029: Some targets do not have floating point instructions; they need other
! 1030: functions in `libgcc1.a', which do floating arithmetic. Recent
! 1031: versions of GNU CC have a file which emulates floating point. With a
! 1032: certain amount of work, you should be able to construct a floating
! 1033: point emulator that can be used as `libgcc1.a'. Perhaps future
! 1034: versions will contain code to do this automatically and conveniently.
! 1035: That depends on whether someone wants to implement it.
! 1036:
! 1037: If your target system has another C compiler, you can configure GNU
! 1038: CC as a native compiler on that machine, build just `libgcc1.a' with
! 1039: `make libgcc1.a' on that machine, and use the resulting file with the
! 1040: cross-compiler. To do this, execute the following on the target
! 1041: machine:
! 1042:
! 1043: cd TARGET-BUILD-DIR
! 1044: configure --host=sparc --target=sun3
! 1045: make libgcc1.a
! 1046:
! 1047: And then this on the host machine:
! 1048:
! 1049: ftp TARGET-MACHINE
! 1050: binary
! 1051: cd TARGET-BUILD-DIR
! 1052: get libgcc1.a
! 1053: quit
! 1054:
! 1055: Another way to provide the functions you need in `libgcc1.a' is to
! 1056: define the appropriate `perform_...' macros for those functions. If
! 1057: these definitions do not use the C arithmetic operators that they are
! 1058: meant to implement, you should be able to compile them with the
! 1059: cross-compiler you are building. (If these definitions already exist
! 1060: for your target file, then you are all set.)
! 1061:
! 1062: To build `libgcc1.a' using the perform macros, use
! 1063: `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building the compiler.
! 1064: Otherwise, you should place your replacement library under the name
! 1065: `libgcc1.a' in the directory in which you will build the
! 1066: cross-compiler, before you run `make'.
1.1.1.3 root 1067:
1068:
1.1.1.6 ! root 1069: File: gcc.info, Node: Cross Headers, Next: Cross Runtime, Prev: Tools and Libraries, Up: Cross-Compiler
! 1070:
! 1071: Cross-Compilers and Header Files
! 1072: --------------------------------
1.1.1.4 root 1073:
1.1.1.6 ! root 1074: If you are cross-compiling a standalone program or a program for an
! 1075: embedded system, then you may not need any header files except the few
! 1076: that are part of GNU CC (and those of your program). However, if you
! 1077: intend to link your program with a standard C library such as `libc.a',
! 1078: then you probably need to compile with the header files that go with
! 1079: the library you use.
1.1.1.4 root 1080:
1.1.1.6 ! root 1081: The GNU C compiler does not come with these files, because (1) they
! 1082: are system-specific, and (2) they belong in a C library, not in a
! 1083: compiler.
1.1.1.4 root 1084:
1.1.1.6 ! root 1085: If the GNU C library supports your target machine, then you can get
! 1086: the header files from there (assuming you actually use the GNU library
! 1087: when you link your program).
! 1088:
! 1089: If your target machine comes with a C compiler, it probably comes
! 1090: with suitable header files also. If you make these files accessible
! 1091: from the host machine, the cross-compiler can use them also.
! 1092:
! 1093: Otherwise, you're on your own in finding header files to use when
! 1094: cross-compiling.
! 1095:
! 1096: When you have found suitable header files, put them in
! 1097: `/usr/local/TARGET/include', before building the cross compiler. Then
! 1098: installation will run fixincludes properly and install the corrected
! 1099: versions of the header files where the compiler will use them.
! 1100:
! 1101: Provide the header files before you build the cross-compiler, because
! 1102: the build stage actually runs the cross-compiler to produce parts of
! 1103: `libgcc.a'. (These are the parts that *can* be compiled with GNU CC.)
! 1104: Some of them need suitable header files.
! 1105:
! 1106: Here's an example showing how to copy the header files from a target
! 1107: machine. On the target machine, do this:
! 1108:
! 1109: (cd /usr/include; tar cf - .) > tarfile
! 1110:
! 1111: Then, on the host machine, do this:
! 1112:
! 1113: ftp TARGET-MACHINE
! 1114: lcd /usr/local/TARGET/include
! 1115: get tarfile
! 1116: quit
! 1117: tar xf tarfile
1.1 root 1118:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.