home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / gcc.info-7 (.txt) < prev    next >
GNU Info File  |  1996-06-29  |  50KB  |  901 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  5. Boston, MA 02111-1307 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software
  7. Foundation, Inc.
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the sections entitled "GNU General Public License," "Funding for
  14. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  15. included exactly as in the original, and provided that the entire
  16. resulting derived work is distributed under the terms of a permission
  17. notice identical to this one.
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the sections entitled "GNU General Public
  21. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  22. `Look And Feel'", and this permission notice, may be included in
  23. translations approved by the Free Software Foundation instead of in the
  24. original English.
  25. File: gcc.info,  Node: Configurations,  Next: Other Dir,  Up: Installation
  26. Configurations Supported by GNU CC
  27. ==================================
  28.    Here are the possible CPU types:
  29.      1750a, a29k, alpha, arm, cN, clipper, dsp16xx, elxsi, h8300,
  30.      hppa1.0, hppa1.1, i370, i386, i486, i586, i860, i960, m68000, m68k,
  31.      m88k, mips, mipsel, mips64, mips64el, ns32k, powerpc, powerpcle,
  32.      pyramid, romp, rs6000, sh, sparc, sparclite, sparc64, vax, we32k.
  33.    Here are the recognized company names.  As you can see, customary
  34. abbreviations are used rather than the longer official names.
  35.      acorn, alliant, altos, apollo, att, bull, cbm, convergent, convex,
  36.      crds, dec, dg, dolphin, elxsi, encore, harris, hitachi, hp, ibm,
  37.      intergraph, isi, mips, motorola, ncr, next, ns, omron, plexus,
  38.      sequent, sgi, sony, sun, tti, unicom, wrs.
  39.    The company name is meaningful only to disambiguate when the rest of
  40. the information supplied is insufficient.  You can omit it, writing
  41. just `CPU-SYSTEM', if it is not needed.  For example, `vax-ultrix4.2'
  42. is equivalent to `vax-dec-ultrix4.2'.
  43.    Here is a list of system types:
  44.      386bsd, aix, acis, amigados, aos, aout, bosx, bsd, clix, coff,
  45.      ctix, cxux, dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms,
  46.      genix, gnu, gnu/linux, hiux, hpux, iris, irix, isc, luna, lynxos,
  47.      mach, minix, msdos, mvs, netbsd, newsos, nindy, ns, osf, osfrose,
  48.      ptx, riscix, riscos, rtu, sco, sim, solaris, sunos, sym, sysv,
  49.      udi, ultrix, unicos, uniplus, unos, vms, vsta, vxworks, winnt,
  50.      xenix.
  51. You can omit the system type; then `configure' guesses the operating
  52. system from the CPU and company.
  53.    You can add a version number to the system type; this may or may not
  54. make a difference.  For example, you can write `bsd4.3' or `bsd4.4' to
  55. distinguish versions of BSD.  In practice, the version number is most
  56. needed for `sysv3' and `sysv4', which are often treated differently.
  57.    If you specify an impossible combination such as `i860-dg-vms', then
  58. you may get an error message from `configure', or it may ignore part of
  59. the information and do the best it can with the rest.  `configure'
  60. always prints the canonical name for the alternative that it used.  GNU
  61. CC does not support all possible alternatives.
  62.    Often a particular model of machine has a name.  Many machine names
  63. are recognized as aliases for CPU/company combinations.  Thus, the
  64. machine name `sun3', mentioned above, is an alias for `m68k-sun'.
  65. Sometimes we accept a company name as a machine name, when the name is
  66. popularly used for a particular machine.  Here is a table of the known
  67. machine names:
  68.      3300, 3b1, 3bN, 7300, altos3068, altos, apollo68, att-7300,
  69.      balance, convex-cN, crds, decstation-3100, decstation, delta,
  70.      encore, fx2800, gmicro, hp7NN, hp8NN, hp9k2NN, hp9k3NN, hp9k7NN,
  71.      hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin, miniframe,
  72.      mmax, news-3600, news800, news, next, pbd, pc532, pmax, powerpc,
  73.      powerpcle, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3,
  74.      sun4, symmetry, tower-32, tower.
  75. Remember that a machine name specifies both the cpu type and the company
  76. name.  If you want to install your own homemade configuration files,
  77. you can use `local' as the company name to access them.  If you use
  78. configuration `CPU-local', the configuration name without the cpu prefix
  79. is used to form the configuration file names.
  80.    Thus, if you specify `m68k-local', configuration uses files
  81. `m68k.md', `local.h', `m68k.c', `xm-local.h', `t-local', and `x-local',
  82. all in the directory `config/m68k'.
  83.    Here is a list of configurations that have special treatment or
  84. special things you must know:
  85. `1750a-*-*'
  86.      MIL-STD-1750A processors.
  87.      Starting with GCC 2.6.1, the MIL-STD-1750A cross configuration no
  88.      longer supports the Tektronix Assembler, but instead produces
  89.      output for `as1750', an assembler/linker available under the GNU
  90.      Public License for the 1750A. Contact *kellogg@space.otn.dasa.de*
  91.      for more details on obtaining `as1750'.  A similarly licensed
  92.      simulator for the 1750A is available from same address.
  93.      You should ignore a fatal error during the building of libgcc
  94.      (libgcc is not yet implemented for the 1750A.)
  95.      The `as1750' assembler requires the file `ms1750.inc', which is
  96.      found in the directory `config/1750a'.
  97.      GNU CC produced the same sections as the Fairchild F9450 C
  98.      Compiler, namely:
  99.     `Normal'
  100.           The program code section.
  101.     `Static'
  102.           The read/write (RAM) data section.
  103.     `Konst'
  104.           The read-only (ROM) constants section.
  105.     `Init'
  106.           Initialization section (code to copy KREL to SREL).
  107.      The smallest addressable unit is 16 bits (BITS_PER_UNIT is 16).
  108.      This means that type `char' is represented with a 16-bit word per
  109.      character.  The 1750A's "Load/Store Upper/Lower Byte" instructions
  110.      are not used by GNU CC.
  111. `alpha-*-osf1'
  112.      Systems using processors that implement the DEC Alpha architecture
  113.      and are running the DEC Unix (OSF/1) operating system, for example
  114.      the DEC Alpha AXP systems.  (VMS on the Alpha is not currently
  115.      supported by GNU CC.)
  116.      GNU CC writes a `.verstamp' directive to the assembler output file
  117.      unless it is built as a cross-compiler.  It gets the version to
  118.      use from the system header file `/usr/include/stamp.h'.  If you
  119.      install a new version of DEC Unix, you should rebuild GCC to pick
  120.      up the new version stamp.
  121.      Note that since the Alpha is a 64-bit architecture,
  122.      cross-compilers from 32-bit machines will not generate code as
  123.      efficient as that generated when the compiler is running on a
  124.      64-bit machine because many optimizations that depend on being
  125.      able to represent a word on the target in an integral value on the
  126.      host cannot be performed.  Building cross-compilers on the Alpha
  127.      for 32-bit machines has only been tested in a few cases and may
  128.      not work properly.
  129.      `make compare' may fail on old versions of DEC Unix unless you add
  130.      `-save-temps' to `CFLAGS'.  On these systems, the name of the
  131.      assembler input file is stored in the object file, and that makes
  132.      comparison fail if it differs between the `stage1' and `stage2'
  133.      compilations.  The option `-save-temps' forces a fixed name to be
  134.      used for the assembler input file, instead of a randomly chosen
  135.      name in `/tmp'.  Do not add `-save-temps' unless the comparisons
  136.      fail without that option.  If you add `-save-temps', you will have
  137.      to manually delete the `.i' and `.s' files after each series of
  138.      compilations.
  139.      GNU CC now supports both the native (ECOFF) debugging format used
  140.      by DBX and GDB and an encapsulated STABS format for use only with
  141.      GDB.  See the discussion of the `--with-stabs' option of
  142.      `configure' above for more information on these formats and how to
  143.      select them.
  144.      There is a bug in DEC's assembler that produces incorrect line
  145.      numbers for ECOFF format when the `.align' directive is used.  To
  146.      work around this problem, GNU CC will not emit such alignment
  147.      directives while writing ECOFF format debugging information even
  148.      if optimization is being performed.  Unfortunately, this has the
  149.      very undesirable side-effect that code addresses when `-O' is
  150.      specified are different depending on whether or not `-g' is also
  151.      specified.
  152.      To avoid this behavior, specify `-gstabs+' and use GDB instead of
  153.      DBX.  DEC is now aware of this problem with the assembler and
  154.      hopes to provide a fix shortly.
  155. `arm'
  156.      Advanced RISC Machines ARM-family processors.  These are often
  157.      used in embedded applications.  There are no standard Unix
  158.      configurations.  This configuration corresponds to the basic
  159.      instruction sequences and will produce a.out format object modules.
  160.      You may need to make a variant of the file `arm.h' for your
  161.      particular configuration.
  162. `arm-*-riscix'
  163.      The ARM2 or ARM3 processor running RISC iX, Acorn's port of BSD
  164.      Unix.  If you are running a version of RISC iX prior to 1.2 then
  165.      you must specify the version number during configuration.  Note
  166.      that the assembler shipped with RISC iX does not support stabs
  167.      debugging information; a new version of the assembler, with stabs
  168.      support included, is now available from Acorn.
  169. `a29k'
  170.      AMD Am29k-family processors.  These are normally used in embedded
  171.      applications.  There are no standard Unix configurations.  This
  172.      configuration corresponds to AMD's standard calling sequence and
  173.      binary interface and is compatible with other 29k tools.
  174.      You may need to make a variant of the file `a29k.h' for your
  175.      particular configuration.
  176. `a29k-*-bsd'
  177.      AMD Am29050 used in a system running a variant of BSD Unix.
  178. `decstation-*'
  179.      DECstations can support three different personalities: Ultrix, DEC
  180.      OSF/1, and OSF/rose.  To configure GCC for these platforms use the
  181.      following configurations:
  182.     `decstation-ultrix'
  183.           Ultrix configuration.
  184.     `decstation-osf1'
  185.           Dec's version of OSF/1.
  186.     `decstation-osfrose'
  187.           Open Software Foundation reference port of OSF/1 which uses
  188.           the OSF/rose object file format instead of ECOFF.  Normally,
  189.           you would not select this configuration.
  190.      The MIPS C compiler needs to be told to increase its table size
  191.      for switch statements with the `-Wf,-XNg1500' option in order to
  192.      compile `cp/parse.c'.  If you use the `-O2' optimization option,
  193.      you also need to use `-Olimit 3000'.  Both of these options are
  194.      automatically generated in the `Makefile' that the shell script
  195.      `configure' builds.  If you override the `CC' make variable and
  196.      use the MIPS compilers, you may need to add `-Wf,-XNg1500 -Olimit
  197.      3000'.
  198. `elxsi-elxsi-bsd'
  199.      The Elxsi's C compiler has known limitations that prevent it from
  200.      compiling GNU C.  Please contact `mrs@cygnus.com' for more details.
  201. `dsp16xx'
  202.      A port to the AT&T DSP1610 family of processors.
  203. `h8300-*-*'
  204.      The calling convention and structure layout has changed in release
  205.      2.6.  All code must be recompiled.  The calling convention now
  206.      passes the first three arguments in function calls in registers.
  207.      Structures are no longer a multiple of 2 bytes.
  208. `hppa*-*-*'
  209.      There are several variants of the HP-PA processor which run a
  210.      variety of operating systems.  GNU CC must be configured to use
  211.      the correct processor type and operating system, or GNU CC will
  212.      not function correctly.  The easiest way to handle this problem is
  213.      to *not* specify a target when configuring GNU CC, the `configure'
  214.      script will try to automatically determine the right processor
  215.      type and operating system.
  216.      `-g' does not work on HP-UX, since that system uses a peculiar
  217.      debugging format which GNU CC does not know about.  However, `-g'
  218.      will work if you also use GAS and GDB in conjunction with GCC.  We
  219.      highly recommend using GAS for all HP-PA configurations.
  220.      You should be using GAS-2.6 (or later) along with GDB-4.16 (or
  221.      later).  These can be retrieved from all the traditional GNU ftp
  222.      archive sites.
  223.      GAS will need to be installed into a directory before `/bin',
  224.      `/usr/bin', and `/usr/ccs/bin' in your search path.  You should
  225.      install GAS before you build GNU CC.
  226.      To enable debugging, you must configure GNU CC with the
  227.      `--with-gnu-as' option before building.
  228. `i370-*-*'
  229.      This port is very preliminary and has many known bugs.  We hope to
  230.      have a higher-quality port for this machine soon.
  231. `i386-*-linuxoldld'
  232.      Use this configuration to generate a.out binaries on Linux-based
  233.      GNU systems, if you do not have gas/binutils version 2.5.2 or later
  234.      installed.  This is an obsolete configuration.
  235. `i386-*-linuxaout'
  236.      Use this configuration to generate a.out binaries on Linux-based
  237.      GNU systems.  This configuration is being superseded.  You must use
  238.      gas/binutils version 2.5.2 or later.
  239. `i386-*-linux'
  240.      Use this configuration to generate ELF binaries on Linux-based GNU
  241.      systems.  You must use gas/binutils version 2.5.2 or later.
  242. `i386-*-sco'
  243.      Compilation with RCC is recommended.  Also, it may be a good idea
  244.      to link with GNU malloc instead of the malloc that comes with the
  245.      system.
  246. `i386-*-sco3.2v4'
  247.      Use this configuration for SCO release 3.2 version 4.
  248. `i386-*-isc'
  249.      It may be a good idea to link with GNU malloc instead of the
  250.      malloc that comes with the system.
  251.      In ISC version 4.1, `sed' core dumps when building `deduced.h'.
  252.      Use the version of `sed' from version 4.0.
  253. `i386-*-esix'
  254.      It may be good idea to link with GNU malloc instead of the malloc
  255.      that comes with the system.
  256. `i386-ibm-aix'
  257.      You need to use GAS version 2.1 or later, and and LD from GNU
  258.      binutils version 2.2 or later.
  259. `i386-sequent-bsd'
  260.      Go to the Berkeley universe before compiling.  In addition, you
  261.      probably need to create a file named `string.h' containing just
  262.      one line: `#include <strings.h>'.
  263. `i386-sequent-ptx1*'
  264.      Sequent DYNIX/ptx 1.x.
  265. `i386-sequent-ptx2*'
  266.      Sequent DYNIX/ptx 2.x.
  267. `i386-sun-sunos4'
  268.      You may find that you need another version of GNU CC to begin
  269.      bootstrapping with, since the current version when built with the
  270.      system's own compiler seems to get an infinite loop compiling part
  271.      of `libgcc2.c'.  GNU CC version 2 compiled with GNU CC (any
  272.      version) seems not to have this problem.
  273.      See *Note Sun Install::, for information on installing GNU CC on
  274.      Sun systems.
  275. `i[345]86-*-winnt3.5'
  276.      This version requires a GAS that has not let been released.  Until
  277.      it is, you can get a prebuilt binary version via anonymous ftp from
  278.      `cs.washington.edu:pub/gnat' or `cs.nyu.edu:pub/gnat'. You must
  279.      also use the Microsoft header files from the Windows NT 3.5 SDK.
  280.      Find these on the CDROM in the `/mstools/h' directory dated
  281.      9/4/94.  You must use a fixed version of Microsoft linker made
  282.      especially for NT 3.5, which is also is available on the NT 3.5
  283.      SDK CDROM.  If you do not have this linker, can you also use the
  284.      linker from Visual C/C++ 1.0 or 2.0.
  285.      Installing GNU CC for NT builds a wrapper linker, called `ld.exe',
  286.      which mimics the behaviour of Unix `ld' in the specification of
  287.      libraries (`-L' and `-l').  `ld.exe' looks for both Unix and
  288.      Microsoft named libraries.  For example, if you specify `-lfoo',
  289.      `ld.exe' will look first for `libfoo.a' and then for `foo.lib'.
  290.      You may install GNU CC for Windows NT in one of two ways,
  291.      depending on whether or not you have a Unix-like shell and various
  292.      Unix-like utilities.
  293.        1. If you do not have a Unix-like shell and few Unix-like
  294.           utilities, you will use a DOS style batch script called
  295.           `configure.bat'.  Invoke it as `configure winnt' from an
  296.           MSDOS console window or from the program manager dialog box.
  297.           `configure.bat' assumes you have already installed and have
  298.           in your path a Unix-like `sed' program which is used to
  299.           create a working `Makefile' from `Makefile.in'.
  300.           `Makefile' uses the Microsoft Nmake program maintenance
  301.           utility and the Visual C/C++ V8.00 compiler to build GNU CC.
  302.           You need only have the utilities `sed' and `touch' to use
  303.           this installation method, which only automatically builds the
  304.           compiler itself.  You must then examine what `fixinc.winnt'
  305.           does, edit the header files by hand and build `libgcc.a'
  306.           manually.
  307.        2. The second type of installation assumes you are running a
  308.           Unix-like shell, have a complete suite of Unix-like utilities
  309.           in your path, and have a previous version of GNU CC already
  310.           installed, either through building it via the above
  311.           installation method or acquiring a pre-built binary.  In this
  312.           case, use the `configure' script in the normal fashion.
  313. `i860-intel-osf1'
  314.      This is the Paragon.  If you have version 1.0 of the operating
  315.      system, see *Note Installation Problems::, for special things you
  316.      need to do to compensate for peculiarities in the system.
  317. `*-lynx-lynxos'
  318.      LynxOS 2.2 and earlier comes with GNU CC 1.x already installed as
  319.      `/bin/gcc'.  You should compile with this instead of `/bin/cc'.
  320.      You can tell GNU CC to use the GNU assembler and linker, by
  321.      specifying `--with-gnu-as --with-gnu-ld' when configuring.  These
  322.      will produce COFF format object files and executables;  otherwise
  323.      GNU CC will use the installed tools, which produce a.out format
  324.      executables.
  325. `m68000-hp-bsd'
  326.      HP 9000 series 200 running BSD.  Note that the C compiler that
  327.      comes with this system cannot compile GNU CC; contact
  328.      `law@cs.utah.edu' to get binaries of GNU CC for bootstrapping.
  329. `m68k-altos'
  330.      Altos 3068.  You must use the GNU assembler, linker and debugger.
  331.      Also, you must fix a kernel bug.  Details in the file
  332.      `README.ALTOS'.
  333. `m68k-att-sysv'
  334.      AT&T 3b1, a.k.a. 7300 PC.  Special procedures are needed to
  335.      compile GNU CC with this machine's standard C compiler, due to
  336.      bugs in that compiler.  You can bootstrap it more easily with
  337.      previous versions of GNU CC if you have them.
  338.      Installing GNU CC on the 3b1 is difficult if you do not already
  339.      have GNU CC running, due to bugs in the installed C compiler.
  340.      However, the following procedure might work.  We are unable to
  341.      test it.
  342.        1. Comment out the `#include "config.h"' line on line 37 of
  343.           `cccp.c' and do `make cpp'.  This makes a preliminary version
  344.           of GNU cpp.
  345.        2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to
  346.           that file name.
  347.        3. Undo your change in `cccp.c', or reinstall the original
  348.           version, and do `make cpp' again.
  349.        4. Copy this final version of GNU cpp into `/lib/cpp'.
  350.        5. Replace every occurrence of `obstack_free' in the file
  351.           `tree.c' with `_obstack_free'.
  352.        6. Run `make' to get the first-stage GNU CC.
  353.        7. Reinstall the original version of `/lib/cpp'.
  354.        8. Now you can compile GNU CC with itself and install it in the
  355.           normal fashion.
  356. `m68k-bull-sysv'
  357.      Bull DPX/2 series 200 and 300 with BOS-2.00.45 up to BOS-2.01. GNU
  358.      CC works either with native assembler or GNU assembler. You can use
  359.      GNU assembler with native coff generation by providing
  360.      `--with-gnu-as' to the configure script or use GNU assembler with
  361.      dbx-in-coff encapsulation by providing `--with-gnu-as --stabs'.
  362.      For any problem with native assembler or for availability of the
  363.      DPX/2 port of GAS, contact `F.Pierresteguy@frcl.bull.fr'.
  364. `m68k-crds-unox'
  365.      Use `configure unos' for building on Unos.
  366.      The Unos assembler is named `casm' instead of `as'.  For some
  367.      strange reason linking `/bin/as' to `/bin/casm' changes the
  368.      behavior, and does not work.  So, when installing GNU CC, you
  369.      should install the following script as `as' in the subdirectory
  370.      where the passes of GCC are installed:
  371.           #!/bin/sh
  372.           casm $*
  373.      The default Unos library is named `libunos.a' instead of `libc.a'.
  374.      To allow GNU CC to function, either change all references to
  375.      `-lc' in `gcc.c' to `-lunos' or link `/lib/libc.a' to
  376.      `/lib/libunos.a'.
  377.      When compiling GNU CC with the standard compiler, to overcome bugs
  378.      in the support of `alloca', do not use `-O' when making stage 2.
  379.      Then use the stage 2 compiler with `-O' to make the stage 3
  380.      compiler.  This compiler will have the same characteristics as the
  381.      usual stage 2 compiler on other systems.  Use it to make a stage 4
  382.      compiler and compare that with stage 3 to verify proper
  383.      compilation.
  384.      (Perhaps simply defining `ALLOCA' in `x-crds' as described in the
  385.      comments there will make the above paragraph superfluous.  Please
  386.      inform us of whether this works.)
  387.      Unos uses memory segmentation instead of demand paging, so you
  388.      will need a lot of memory.  5 Mb is barely enough if no other
  389.      tasks are running.  If linking `cc1' fails, try putting the object
  390.      files into a library and linking from that library.
  391. `m68k-hp-hpux'
  392.      HP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0 has a
  393.      bug in the assembler that prevents compilation of GNU CC.  To fix
  394.      it, get patch PHCO_4484 from HP.
  395.      In addition, if you wish to use gas `--with-gnu-as' you must use
  396.      gas version 2.1 or later, and you must use the GNU linker version
  397.      2.1 or later.  Earlier versions of gas relied upon a program which
  398.      converted the gas output into the native HP/UX format, but that
  399.      program has not been kept up to date.  gdb does not understand
  400.      that native HP/UX format, so you must use gas if you wish to use
  401.      gdb.
  402. `m68k-sun'
  403.      Sun 3.  We do not provide a configuration file to use the Sun FPA
  404.      by default, because programs that establish signal handlers for
  405.      floating point traps inherently cannot work with the FPA.
  406.      See *Note Sun Install::, for information on installing GNU CC on
  407.      Sun systems.
  408. `m88k-*-svr3'
  409.      Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference port.
  410.      These systems tend to use the Green Hills C, revision 1.8.5, as the
  411.      standard C compiler.  There are apparently bugs in this compiler
  412.      that result in object files differences between stage 2 and stage
  413.      3.  If this happens, make the stage 4 compiler and compare it to
  414.      the stage 3 compiler.  If the stage 3 and stage 4 object files are
  415.      identical, this suggests you encountered a problem with the
  416.      standard C compiler; the stage 3 and 4 compilers may be usable.
  417.      It is best, however, to use an older version of GNU CC for
  418.      bootstrapping if you have one.
  419. `m88k-*-dgux'
  420.      Motorola m88k running DG/UX.  To build 88open BCS native or cross
  421.      compilers on DG/UX, specify the configuration name as
  422.      `m88k-*-dguxbcs' and build in the 88open BCS software development
  423.      environment.  To build ELF native or cross compilers on DG/UX,
  424.      specify `m88k-*-dgux' and build in the DG/UX ELF development
  425.      environment.  You set the software development environment by
  426.      issuing `sde-target' command and specifying either `m88kbcs' or
  427.      `m88kdguxelf' as the operand.
  428.      If you do not specify a configuration name, `configure' guesses the
  429.      configuration based on the current software development
  430.      environment.
  431. `m88k-tektronix-sysv3'
  432.      Tektronix XD88 running UTekV 3.2e.  Do not turn on optimization
  433.      while building stage1 if you bootstrap with the buggy Green Hills
  434.      compiler.  Also, The bundled LAI System V NFS is buggy so if you
  435.      build in an NFS mounted directory, start from a fresh reboot, or
  436.      avoid NFS all together.  Otherwise you may have trouble getting
  437.      clean comparisons between stages.
  438. `mips-mips-bsd'
  439.      MIPS machines running the MIPS operating system in BSD mode.  It's
  440.      possible that some old versions of the system lack the functions
  441.      `memcpy', `memcmp', and `memset'.  If your system lacks these, you
  442.      must remove or undo the definition of `TARGET_MEM_FUNCTIONS' in
  443.      `mips-bsd.h'.
  444.      The MIPS C compiler needs to be told to increase its table size
  445.      for switch statements with the `-Wf,-XNg1500' option in order to
  446.      compile `cp/parse.c'.  If you use the `-O2' optimization option,
  447.      you also need to use `-Olimit 3000'.  Both of these options are
  448.      automatically generated in the `Makefile' that the shell script
  449.      `configure' builds.  If you override the `CC' make variable and
  450.      use the MIPS compilers, you may need to add `-Wf,-XNg1500 -Olimit
  451.      3000'.
  452. `mips-mips-riscos*'
  453.      The MIPS C compiler needs to be told to increase its table size
  454.      for switch statements with the `-Wf,-XNg1500' option in order to
  455.      compile `cp/parse.c'.  If you use the `-O2' optimization option,
  456.      you also need to use `-Olimit 3000'.  Both of these options are
  457.      automatically generated in the `Makefile' that the shell script
  458.      `configure' builds.  If you override the `CC' make variable and
  459.      use the MIPS compilers, you may need to add `-Wf,-XNg1500 -Olimit
  460.      3000'.
  461.      MIPS computers running RISC-OS can support four different
  462.      personalities: default, BSD 4.3, System V.3, and System V.4 (older
  463.      versions of RISC-OS don't support V.4).  To configure GCC for
  464.      these platforms use the following configurations:
  465.     `mips-mips-riscos`rev''
  466.           Default configuration for RISC-OS, revision `rev'.
  467.     `mips-mips-riscos`rev'bsd'
  468.           BSD 4.3 configuration for RISC-OS, revision `rev'.
  469.     `mips-mips-riscos`rev'sysv4'
  470.           System V.4 configuration for RISC-OS, revision `rev'.
  471.     `mips-mips-riscos`rev'sysv'
  472.           System V.3 configuration for RISC-OS, revision `rev'.
  473.      The revision `rev' mentioned above is the revision of RISC-OS to
  474.      use.  You must reconfigure GCC when going from a RISC-OS revision
  475.      4 to RISC-OS revision 5.  This has the effect of avoiding a linker
  476.      bug (see *Note Installation Problems::, for more details).
  477. `mips-sgi-*'
  478.      In order to compile GCC on an SGI running IRIX 4, the "c.hdr.lib"
  479.      option must be installed from the CD-ROM supplied from Silicon
  480.      Graphics.  This is found on the 2nd CD in release 4.0.1.
  481.      In order to compile GCC on an SGI running IRIX 5, the
  482.      "compiler_dev.hdr" subsystem must be installed from the IDO CD-ROM
  483.      supplied by Silicon Graphics.
  484.      `make compare' may fail on version 5 of IRIX unless you add
  485.      `-save-temps' to `CFLAGS'.  On these systems, the name of the
  486.      assembler input file is stored in the object file, and that makes
  487.      comparison fail if it differs between the `stage1' and `stage2'
  488.      compilations.  The option `-save-temps' forces a fixed name to be
  489.      used for the assembler input file, instead of a randomly chosen
  490.      name in `/tmp'.  Do not add `-save-temps' unless the comparisons
  491.      fail without that option.  If you do you `-save-temps', you will
  492.      have to manually delete the `.i' and `.s' files after each series
  493.      of compilations.
  494.      The MIPS C compiler needs to be told to increase its table size
  495.      for switch statements with the `-Wf,-XNg1500' option in order to
  496.      compile `cp/parse.c'.  If you use the `-O2' optimization option,
  497.      you also need to use `-Olimit 3000'.  Both of these options are
  498.      automatically generated in the `Makefile' that the shell script
  499.      `configure' builds.  If you override the `CC' make variable and
  500.      use the MIPS compilers, you may need to add `-Wf,-XNg1500 -Olimit
  501.      3000'.
  502.      On Irix version 4.0.5F, and perhaps on some other versions as well,
  503.      there is an assembler bug that reorders instructions incorrectly.
  504.      To work around it, specify the target configuration
  505.      `mips-sgi-irix4loser'.  This configuration inhibits assembler
  506.      optimization.
  507.      In a compiler configured with target `mips-sgi-irix4', you can turn
  508.      off assembler optimization by using the `-noasmopt' option.  This
  509.      compiler option passes the option `-O0' to the assembler, to
  510.      inhibit reordering.
  511.      The `-noasmopt' option can be useful for testing whether a problem
  512.      is due to erroneous assembler reordering.  Even if a problem does
  513.      not go away with `-noasmopt', it may still be due to assembler
  514.      reordering--perhaps GNU CC itself was miscompiled as a result.
  515.      To enable debugging under Irix 5, you must use GNU as 2.5 or later,
  516.      and use the `--with-gnu-as' configure option when configuring gcc.
  517.      GNU as is distributed as part of the binutils package.
  518. `mips-sony-sysv'
  519.      Sony MIPS NEWS.  This works in NEWSOS 5.0.1, but not in 5.0.2
  520.      (which uses ELF instead of COFF).  Support for 5.0.2 will probably
  521.      be provided soon by volunteers.  In particular, the linker does
  522.      not like the code generated by GCC when shared libraries are
  523.      linked in.
  524. `ns32k-encore'
  525.      Encore ns32000 system.  Encore systems are supported only under
  526.      BSD.
  527. `ns32k-*-genix'
  528.      National Semiconductor ns32000 system.  Genix has bugs in `alloca'
  529.      and `malloc'; you must get the compiled versions of these from GNU
  530.      Emacs.
  531. `ns32k-sequent'
  532.      Go to the Berkeley universe before compiling.  In addition, you
  533.      probably need to create a file named `string.h' containing just
  534.      one line: `#include <strings.h>'.
  535. `ns32k-utek'
  536.      UTEK ns32000 system ("merlin").  The C compiler that comes with
  537.      this system cannot compile GNU CC; contact `tektronix!reed!mason'
  538.      to get binaries of GNU CC for bootstrapping.
  539. `romp-*-aos'
  540. `romp-*-mach'
  541.      The only operating systems supported for the IBM RT PC are AOS and
  542.      MACH.  GNU CC does not support AIX running on the RT.  We
  543.      recommend you compile GNU CC with an earlier version of itself; if
  544.      you compile GNU CC with `hc', the Metaware compiler, it will work,
  545.      but you will get mismatches between the stage 2 and stage 3
  546.      compilers in various files.  These errors are minor differences in
  547.      some floating-point constants and can be safely ignored; the stage
  548.      3 compiler is correct.
  549. `rs6000-*-aix'
  550. `powerpc-*-aix'
  551.      Various early versions of each release of the IBM XLC compiler
  552.      will not bootstrap GNU CC.  Symptoms include differences between
  553.      the stage2 and stage3 object files, and errors when compiling
  554.      `libgcc.a' or `enquire'.  Known problematic releases include:
  555.      xlc-1.2.1.8, xlc-1.3.0.0 (distributed with AIX 3.2.5), and
  556.      xlc-1.3.0.19.  Both xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are
  557.      known to produce working versions of GNU CC, but most other recent
  558.      releases correctly bootstrap GNU CC.  Also, releases of AIX prior
  559.      to AIX 3.2.4 include a version of the IBM assembler which does not
  560.      accept debugging directives: assembler updates are available as
  561.      PTFs.  Also, if you are using AIX 3.2.5 or greater and the GNU
  562.      assembler, you must have a version modified after October 16th,
  563.      1995 in order for the GNU C compiler to build.  See the file
  564.      `README.RS6000' for more details on of these problems.
  565.      GNU CC does not yet support the 64-bit PowerPC instructions.
  566.      Objective C does not work on this architecture because it makes
  567.      assumptions that are incompatible with the calling conventions.
  568.      AIX on the RS/6000 provides support (NLS) for environments outside
  569.      of the United States.  Compilers and assemblers use NLS to support
  570.      locale-specific representations of various objects including
  571.      floating-point numbers ("." vs "," for separating decimal
  572.      fractions).  There have been problems reported where the library
  573.      linked with GNU CC does not produce the same floating-point
  574.      formats that the assembler accepts.  If you have this problem, set
  575.      the LANG environment variable to "C" or "En_US".
  576.      Due to changes in the way that GNU CC invokes the binder (linker)
  577.      for AIX 4.1, you may now receive warnings of duplicate symbols
  578.      from the link step that were not reported before.  The assembly
  579.      files generated by GNU CC for AIX have always included multiple
  580.      symbol definitions for certain global variable and function
  581.      declarations in the original program.  The warnings should not
  582.      prevent the linker from producing a correct library or runnable
  583.      executable.
  584. `powerpc-*-elf'
  585. `powerpc-*-sysv4'
  586.      PowerPC system in big endian mode, running System V.4.
  587.      This configuration is currently under development.
  588. `powerpc-*-eabiaix'
  589.      Embedded PowerPC system in big endian mode with -mcall-aix
  590.      selected as the default.  This system is currently under
  591.      development.
  592. `powerpc-*-eabisim'
  593.      Embedded PowerPC system in big endian mode for use in running
  594.      under the PSIM simulator.  This system is currently under
  595.      development.
  596. `powerpc-*-eabi'
  597.      Embedded PowerPC system in big endian mode.
  598.      This configuration is currently under development.
  599. `powerpcle-*-elf'
  600. `powerpcle-*-sysv4'
  601.      PowerPC system in little endian mode, running System V.4.
  602.      This configuration is currently under development.
  603. `powerpcle-*-sysv4'
  604.      Embedded PowerPC system in little endian mode.
  605.      This system is currently under development.
  606. `powerpcle-*-eabisim'
  607.      Embedded PowerPC system in little endian mode for use in running
  608.      under the PSIM simulator.
  609.      This system is currently under development.
  610. `powerpcle-*-eabi'
  611.      Embedded PowerPC system in little endian mode.
  612.      This configuration is currently under development.
  613. `vax-dec-ultrix'
  614.      Don't try compiling with Vax C (`vcc').  It produces incorrect code
  615.      in some cases (for example, when `alloca' is used).
  616.      Meanwhile, compiling `cp/parse.c' with pcc does not work because of
  617.      an internal table size limitation in that compiler.  To avoid this
  618.      problem, compile just the GNU C compiler first, and use it to
  619.      recompile building all the languages that you want to run.
  620. `sparc-sun-*'
  621.      See *Note Sun Install::, for information on installing GNU CC on
  622.      Sun systems.
  623. `vax-dec-vms'
  624.      See *Note VMS Install::, for details on how to install GNU CC on
  625.      VMS.
  626. `we32k-*-*'
  627.      These computers are also known as the 3b2, 3b5, 3b20 and other
  628.      similar names.  (However, the 3b1 is actually a 68000; see *Note
  629.      Configurations::.)
  630.      Don't use `-g' when compiling with the system's compiler.  The
  631.      system's linker seems to be unable to handle such a large program
  632.      with debugging information.
  633.      The system's compiler runs out of capacity when compiling `stmt.c'
  634.      in GNU CC.  You can work around this by building `cpp' in GNU CC
  635.      first, then use that instead of the system's preprocessor with the
  636.      system's C compiler to compile `stmt.c'.  Here is how:
  637.           mv /lib/cpp /lib/cpp.att
  638.           cp cpp /lib/cpp.gnu
  639.           echo '/lib/cpp.gnu -traditional ${1+"$@"}' > /lib/cpp
  640.           chmod +x /lib/cpp
  641.      The system's compiler produces bad code for some of the GNU CC
  642.      optimization files.  So you must build the stage 2 compiler without
  643.      optimization.  Then build a stage 3 compiler with optimization.
  644.      That executable should work.  Here are the necessary commands:
  645.           make LANGUAGES=c CC=stage1/xgcc CFLAGS="-Bstage1/ -g"
  646.           make stage2
  647.           make CC=stage2/xgcc CFLAGS="-Bstage2/ -g -O"
  648.      You may need to raise the ULIMIT setting to build a C++ compiler,
  649.      as the file `cc1plus' is larger than one megabyte.
  650. File: gcc.info,  Node: Other Dir,  Next: Cross-Compiler,  Prev: Configurations,  Up: Installation
  651. Compilation in a Separate Directory
  652. ===================================
  653.    If you wish to build the object files and executables in a directory
  654. other than the one containing the source files, here is what you must
  655. do differently:
  656.   1. Make sure you have a version of Make that supports the `VPATH'
  657.      feature.  (GNU Make supports it, as do Make versions on most BSD
  658.      systems.)
  659.   2. If you have ever run `configure' in the source directory, you must
  660.      undo the configuration.  Do this by running:
  661.           make distclean
  662.   3. Go to the directory in which you want to build the compiler before
  663.      running `configure':
  664.           mkdir gcc-sun3
  665.           cd gcc-sun3
  666.      On systems that do not support symbolic links, this directory must
  667.      be on the same file system as the source code directory.
  668.   4. Specify where to find `configure' when you run it:
  669.           ../gcc/configure ...
  670.      This also tells `configure' where to find the compiler sources;
  671.      `configure' takes the directory from the file name that was used to
  672.      invoke it.  But if you want to be sure, you can specify the source
  673.      directory with the `--srcdir' option, like this:
  674.           ../gcc/configure --srcdir=../gcc OTHER OPTIONS
  675.      The directory you specify with `--srcdir' need not be the same as
  676.      the one that `configure' is found in.
  677.    Now, you can run `make' in that directory.  You need not repeat the
  678. configuration steps shown above, when ordinary source files change.  You
  679. must, however, run `configure' again when the configuration files
  680. change, if your system does not support symbolic links.
  681. File: gcc.info,  Node: Cross-Compiler,  Next: Sun Install,  Prev: Other Dir,  Up: Installation
  682. Building and Installing a Cross-Compiler
  683. ========================================
  684.    GNU CC can function as a cross-compiler for many machines, but not
  685.    * Cross-compilers for the Mips as target using the Mips assembler
  686.      currently do not work, because the auxiliary programs
  687.      `mips-tdump.c' and `mips-tfile.c' can't be compiled on anything
  688.      but a Mips.  It does work to cross compile for a Mips if you use
  689.      the GNU assembler and linker.
  690.    * Cross-compilers between machines with different floating point
  691.      formats have not all been made to work.  GNU CC now has a floating
  692.      point emulator with which these can work, but each target machine
  693.      description needs to be updated to take advantage of it.
  694.    * Cross-compilation between machines of different word sizes is
  695.      somewhat problematic and sometimes does not work.
  696.    Since GNU CC generates assembler code, you probably need a
  697. cross-assembler that GNU CC can run, in order to produce object files.
  698. If you want to link on other than the target machine, you need a
  699. cross-linker as well.  You also need header files and libraries suitable
  700. for the target machine that you can install on the host machine.
  701. * Menu:
  702. * Steps of Cross::      Using a cross-compiler involves several steps
  703.                           that may be carried out on different machines.
  704. * Configure Cross::     Configuring a cross-compiler.
  705. * Tools and Libraries:: Where to put the linker and assembler, and the C library.
  706. * Cross Headers::       Finding and installing header files
  707.                           for a cross-compiler.
  708. * Cross Runtime::       Supplying arithmetic runtime routines (`libgcc1.a').
  709. * Build Cross::         Actually compiling the cross-compiler.
  710. File: gcc.info,  Node: Steps of Cross,  Next: Configure Cross,  Up: Cross-Compiler
  711. Steps of Cross-Compilation
  712. --------------------------
  713.    To compile and run a program using a cross-compiler involves several
  714. steps:
  715.    * Run the cross-compiler on the host machine to produce assembler
  716.      files for the target machine.  This requires header files for the
  717.      target machine.
  718.    * Assemble the files produced by the cross-compiler.  You can do this
  719.      either with an assembler on the target machine, or with a
  720.      cross-assembler on the host machine.
  721.    * Link those files to make an executable.  You can do this either
  722.      with a linker on the target machine, or with a cross-linker on the
  723.      host machine.  Whichever machine you use, you need libraries and
  724.      certain startup files (typically `crt....o') for the target
  725.      machine.
  726.    It is most convenient to do all of these steps on the same host
  727. machine, since then you can do it all with a single invocation of GNU
  728. CC.  This requires a suitable cross-assembler and cross-linker.  For
  729. some targets, the GNU assembler and linker are available.
  730. File: gcc.info,  Node: Configure Cross,  Next: Tools and Libraries,  Prev: Steps of Cross,  Up: Cross-Compiler
  731. Configuring a Cross-Compiler
  732. ----------------------------
  733.    To build GNU CC as a cross-compiler, you start out by running
  734. `configure'.  Use the `--target=TARGET' to specify the target type.  If
  735. `configure' was unable to correctly identify the system you are running
  736. on, also specify the `--build=BUILD' option.  For example, here is how
  737. to configure for a cross-compiler that produces code for an HP 68030
  738. system running BSD on a system that `configure' can correctly identify:
  739.      ./configure --target=m68k-hp-bsd4.3
  740. File: gcc.info,  Node: Tools and Libraries,  Next: Cross Headers,  Prev: Configure Cross,  Up: Cross-Compiler
  741. Tools and Libraries for a Cross-Compiler
  742. ----------------------------------------
  743.    If you have a cross-assembler and cross-linker available, you should
  744. install them now.  Put them in the directory `/usr/local/TARGET/bin'.
  745. Here is a table of the tools you should put in this directory:
  746.      This should be the cross-assembler.
  747.      This should be the cross-linker.
  748.      This should be the cross-archiver: a program which can manipulate
  749.      archive files (linker libraries) in the target machine's format.
  750. `ranlib'
  751.      This should be a program to construct a symbol table in an archive
  752.      file.
  753.    The installation of GNU CC will find these programs in that
  754. directory, and copy or link them to the proper place to for the
  755. cross-compiler to find them when run later.
  756.    The easiest way to provide these files is to build the Binutils
  757. package and GAS.  Configure them with the same `--host' and `--target'
  758. options that you use for configuring GNU CC, then build and install
  759. them.  They install their executables automatically into the proper
  760. directory.  Alas, they do not support all the targets that GNU CC
  761. supports.
  762.    If you want to install libraries to use with the cross-compiler,
  763. such as a standard C library, put them in the directory
  764. `/usr/local/TARGET/lib'; installation of GNU CC copies all all the
  765. files in that subdirectory into the proper place for GNU CC to find
  766. them and link with them.  Here's an example of copying some libraries
  767. from a target machine:
  768.      ftp TARGET-MACHINE
  769.      lcd /usr/local/TARGET/lib
  770.      cd /lib
  771.      get libc.a
  772.      cd /usr/lib
  773.      get libg.a
  774.      get libm.a
  775.      quit
  776. The precise set of libraries you'll need, and their locations on the
  777. target machine, vary depending on its operating system.
  778.    Many targets require "start files" such as `crt0.o' and `crtn.o'
  779. which are linked into each executable; these too should be placed in
  780. `/usr/local/TARGET/lib'.  There may be several alternatives for
  781. `crt0.o', for use with profiling or other compilation options.  Check
  782. your target's definition of `STARTFILE_SPEC' to find out what start
  783. files it uses.  Here's an example of copying these files from a target
  784. machine:
  785.      ftp TARGET-MACHINE
  786.      lcd /usr/local/TARGET/lib
  787.      prompt
  788.      cd /lib
  789.      mget *crt*.o
  790.      cd /usr/lib
  791.      mget *crt*.o
  792.      quit
  793. File: gcc.info,  Node: Cross Runtime,  Next: Build Cross,  Prev: Cross Headers,  Up: Cross-Compiler
  794. `libgcc.a' and Cross-Compilers
  795. ------------------------------
  796.    Code compiled by GNU CC uses certain runtime support functions
  797. implicitly.  Some of these functions can be compiled successfully with
  798. GNU CC itself, but a few cannot be.  These problem functions are in the
  799. source file `libgcc1.c'; the library made from them is called
  800. `libgcc1.a'.
  801.    When you build a native compiler, these functions are compiled with
  802. some other compiler-the one that you use for bootstrapping GNU CC.
  803. Presumably it knows how to open code these operations, or else knows how
  804. to call the run-time emulation facilities that the machine comes with.
  805. But this approach doesn't work for building a cross-compiler.  The
  806. compiler that you use for building knows about the host system, not the
  807. target system.
  808.    So, when you build a cross-compiler you have to supply a suitable
  809. library `libgcc1.a' that does the job it is expected to do.
  810.    To compile `libgcc1.c' with the cross-compiler itself does not work.
  811. The functions in this file are supposed to implement arithmetic
  812. operations that GNU CC does not know how to open code for your target
  813. machine.  If these functions are compiled with GNU CC itself, they will
  814. compile into infinite recursion.
  815.    On any given target, most of these functions are not needed.  If GNU
  816. CC can open code an arithmetic operation, it will not call these
  817. functions to perform the operation.  It is possible that on your target
  818. machine, none of these functions is needed.  If so, you can supply an
  819. empty library as `libgcc1.a'.
  820.    Many targets need library support only for multiplication and
  821. division.  If you are linking with a library that contains functions for
  822. multiplication and division, you can tell GNU CC to call them directly
  823. by defining the macros `MULSI3_LIBCALL', and the like.  These macros
  824. need to be defined in the target description macro file.  For some
  825. targets, they are defined already.  This may be sufficient to avoid the
  826. need for libgcc1.a; if so, you can supply an empty library.
  827.    Some targets do not have floating point instructions; they need other
  828. functions in `libgcc1.a', which do floating arithmetic.  Recent
  829. versions of GNU CC have a file which emulates floating point.  With a
  830. certain amount of work, you should be able to construct a floating
  831. point emulator that can be used as `libgcc1.a'.  Perhaps future
  832. versions will contain code to do this automatically and conveniently.
  833. That depends on whether someone wants to implement it.
  834.    Some embedded targets come with all the necessary `libgcc1.a'
  835. routines written in C or assembler.  These targets build `libgcc1.a'
  836. automatically and you do not need to do anything special for them.
  837. Other embedded targets do not need any `libgcc1.a' routines since all
  838. the necessary operations are supported by the hardware.
  839.    If your target system has another C compiler, you can configure GNU
  840. CC as a native compiler on that machine, build just `libgcc1.a' with
  841. `make libgcc1.a' on that machine, and use the resulting file with the
  842. cross-compiler.  To do this, execute the following on the target
  843. machine:
  844.      cd TARGET-BUILD-DIR
  845.      ./configure --host=sparc --target=sun3
  846.      make libgcc1.a
  847. And then this on the host machine:
  848.      ftp TARGET-MACHINE
  849.      binary
  850.      cd TARGET-BUILD-DIR
  851.      get libgcc1.a
  852.      quit
  853.    Another way to provide the functions you need in `libgcc1.a' is to
  854. define the appropriate `perform_...' macros for those functions.  If
  855. these definitions do not use the C arithmetic operators that they are
  856. meant to implement, you should be able to compile them with the
  857. cross-compiler you are building.  (If these definitions already exist
  858. for your target file, then you are all set.)
  859.    To build `libgcc1.a' using the perform macros, use
  860. `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building the compiler.
  861. Otherwise, you should place your replacement library under the name
  862. `libgcc1.a' in the directory in which you will build the
  863. cross-compiler, before you run `make'.
  864. File: gcc.info,  Node: Cross Headers,  Next: Cross Runtime,  Prev: Tools and Libraries,  Up: Cross-Compiler
  865. Cross-Compilers and Header Files
  866. --------------------------------
  867.    If you are cross-compiling a standalone program or a program for an
  868. embedded system, then you may not need any header files except the few
  869. that are part of GNU CC (and those of your program).  However, if you
  870. intend to link your program with a standard C library such as `libc.a',
  871. then you probably need to compile with the header files that go with
  872. the library you use.
  873.    The GNU C compiler does not come with these files, because (1) they
  874. are system-specific, and (2) they belong in a C library, not in a
  875. compiler.
  876.    If the GNU C library supports your target machine, then you can get
  877. the header files from there (assuming you actually use the GNU library
  878. when you link your program).
  879.    If your target machine comes with a C compiler, it probably comes
  880. with suitable header files also.  If you make these files accessible
  881. from the host machine, the cross-compiler can use them also.
  882.    Otherwise, you're on your own in finding header files to use when
  883. cross-compiling.
  884.    When you have found suitable header files, put them in
  885. `/usr/local/TARGET/include', before building the cross compiler.  Then
  886. installation will run fixincludes properly and install the corrected
  887. versions of the header files where the compiler will use them.
  888.    Provide the header files before you build the cross-compiler, because
  889. the build stage actually runs the cross-compiler to produce parts of
  890. `libgcc.a'.  (These are the parts that *can* be compiled with GNU CC.)
  891. Some of them need suitable header files.
  892.    Here's an example showing how to copy the header files from a target
  893. machine.  On the target machine, do this:
  894.      (cd /usr/include; tar cf - .) > tarfile
  895.    Then, on the host machine, do this:
  896.      ftp TARGET-MACHINE
  897.      lcd /usr/local/TARGET/include
  898.      get tarfile
  899.      quit
  900.      tar xf tarfile
  901.