home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnuc / info / gcc.info-4 < prev    next >
Encoding:
GNU Info File  |  1992-12-28  |  49.5 KB  |  1,124 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.49 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
  7.  
  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.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gcc.info,  Node: Environment Variables,  Next: Running Protoize,  Prev: Code Gen Options,  Up: Invoking GCC
  29.  
  30. Environment Variables Affecting GNU CC
  31. ======================================
  32.  
  33.    This section describes several environment variables that affect how
  34. GNU CC operates.  They work by specifying directories or prefixes to use
  35. when searching for various kinds of files.
  36.  
  37.    Note that you can also specify places to search using options such as
  38. `-B', `-I' and `-L' (*note Directory Options::.).  These take
  39. precedence over places specified using environment variables, which in
  40. turn take precedence over those specified by the configuration of GNU
  41. CC.  *Note Driver::.
  42.  
  43. `TMPDIR'
  44.      If `TMPDIR' is set, it specifies the directory to use for temporary
  45.      files.  GNU CC uses temporary files to hold the output of one
  46.      stage of compilation which is to be used as input to the next
  47.      stage: for example, the output of the preprocessor, which is the
  48.      input to the compiler proper.
  49.  
  50. `GCC_EXEC_PREFIX'
  51.      If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
  52.      names of the subprograms executed by the compiler.  No slash is
  53.      added when this prefix is combined with the name of a subprogram,
  54.      but you can specify a prefix that ends with a slash if you wish.
  55.  
  56.      If GNU CC cannot find the subprogram using the specified prefix, it
  57.      tries looking in the usual places for the subprogram.
  58.  
  59.      Other prefixes specified with `-B' take precedence over this
  60.      prefix.
  61.  
  62.      This prefix is also used for finding files such as `crt0.o' that
  63.      are used for linking.
  64.  
  65.      In addition, the prefix is used in an unusual way in finding the
  66.      directories to search for header files.  For each of the standard
  67.      directories whose name normally begins with
  68.      `/usr/local/lib/gcc-lib' (more precisely, with the value of
  69.      `GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
  70.      specified prefix to produce an alternate directory name.  Thus,
  71.      with `-Bfoo/', GNU CC will search `foo/bar' where it would
  72.      normally search `/usr/local/lib/bar'. These alternate directories
  73.      are searched first; the standard directories come next.
  74.  
  75. `COMPILER_PATH'
  76.      The value of `COMPILER_PATH' is a colon-separated list of
  77.      directories, much like `PATH'.  GNU CC tries the directories thus
  78.      specified when searching for subprograms, if it can't find the
  79.      subprograms using `GCC_EXEC_PREFIX'.
  80.  
  81. `LIBRARY_PATH'
  82.      The value of `LIBRARY_PATH' is a colon-separated list of
  83.      directories, much like `PATH'.  GNU CC tries the directories thus
  84.      specified when searching for special linker files, if it can't
  85.      find them using `GCC_EXEC_PREFIX'.  Linking using GNU CC also uses
  86.      these directories when searching for ordinary libraries for the
  87.      `-l' option (but directories specified with `-L' come first).
  88.  
  89. `C_INCLUDE_PATH'
  90. `CPLUS_INCLUDE_PATH'
  91. `OBJC_INCLUDE_PATH'
  92.      These environment variables pertain to particular languages.  Each
  93.      variable's value is a colon-separated list of directories, much
  94.      like `PATH'.  When GNU CC searches for header files, it tries the
  95.      directories listed in the variable for the language you are using,
  96.      after the directories specified with `-I' but before the standard
  97.      header file directories.
  98.  
  99. `DEPENDENCIES_OUTPUT'
  100.      If this variable is set, its value specifies how to output
  101.      dependencies for Make based on the header files processed by the
  102.      compiler.  This output looks much like the output from the `-M'
  103.      option (*note Preprocessor Options::.), but it goes to a separate
  104.      file, and is in addition to the usual results of compilation.
  105.  
  106.      The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
  107.      which case the Make rules are written to that file, guessing the
  108.      target name from the source file name.  Or the value can have the
  109.      form `FILE TARGET', in which case the rules are written to file
  110.      FILE using TARGET as the target name.
  111.  
  112. 
  113. File: gcc.info,  Node: Running Protoize,  Prev: Environment Variables,  Up: Invoking GCC
  114.  
  115. Running Protoize
  116. ================
  117.  
  118.    The program `protoize' is an optional part of GNU C.  You can use it
  119. to add prototypes to a program, thus converting the program to ANSI C
  120. in one respect.  The companion program `unprotoize' does the reverse:
  121. it removes argument types from any prototypes that are found.
  122.  
  123.    When you run these programs, you must specify a set of source files
  124. as command line arguments.  The conversion programs start out by
  125. compiling these files to see what functions they define.  The
  126. information gathered about a file FOO is saved in a file named `FOO.X'.
  127.  
  128.    After scanning comes actual conversion.  The specified files are all
  129. eligible to be converted; any files they include (whether sources or
  130. just headers) are eligible as well.
  131.  
  132.    But not all the eligible files are converted.  By default,
  133. `protoize' and `unprotoize' convert only source and header files in the
  134. current directory.  You can specify additional directories whose files
  135. should be converted with the `-d DIRECTORY' option.  You can also
  136. specify particular files to exclude with the `-x FILE' option.  A file
  137. is converted if it is eligible, its directory name matches one of the
  138. specified directory names, and its name within the directory has not
  139. been excluded.
  140.  
  141.    Basic conversion with `protoize' consists of rewriting most function
  142. definitions and function declarations to specify the types of the
  143. arguments.  The only ones not rewritten are those for varargs functions.
  144.  
  145.    `protoize' optionally inserts prototype declarations at the
  146. beginning of the source file, to make them available for any calls that
  147. precede the function's definition.  Or it can insert prototype
  148. declarations with block scope in the blocks where undeclared functions
  149. are called.
  150.  
  151.    Basic conversion with `unprotoize' consists of rewriting most
  152. function declarations to remove any argument types, and rewriting
  153. function definitions to the old-style pre-ANSI form.
  154.  
  155.    Both conversion programs print a warning for any function
  156. declaration or definition that they can't convert.  You can suppress
  157. these warnings with `-q'.
  158.  
  159.    The output from `protoize' or `unprotoize' replaces the original
  160. source file.  The original file is renamed to a name ending with
  161. `.save'.  If the `.save' file already exists, then the source file is
  162. simply discarded.
  163.  
  164.    `protoize' and `unprotoize' both depend on GNU CC itself to scan the
  165. program and collect information about the functions it uses. So neither
  166. of these programs will work until GNU CC is installed.
  167.  
  168.    Here is a table of the options you can use with `protoize' and
  169. `unprotoize'.  Each option works with both programs unless otherwise
  170. stated.
  171.  
  172. `-B DIRECTORY'
  173.      Look for the file `SYSCALLS.c.X' in DIRECTORY, instead of the
  174.      usual directory (normally `/usr/local/lib').  This file contains
  175.      prototype information about standard system functions.  This option
  176.      applies only to `protoize'.
  177.  
  178. `-c COMPILATION-OPTIONS'
  179.      Use  COMPILATION-OPTIONS as the options when running `gcc' to
  180.      produce the `.X' files.  The special option `-aux-info' is always
  181.      passed in addition, to tell `gcc' to write a `.X' file.
  182.  
  183.      Note that the compilation options must be given as a single
  184.      argument to `protoize' or `unprotoize'.  If you want to specify
  185.      several `gcc' options, you must quote the entire set of
  186.      compilation options to make them a single word in the shell.
  187.  
  188.      There are certain `gcc' arguments that you cannot use, because they
  189.      would produce the wrong kind of output.  These include `-g', `-O',
  190.      `-c', `-S', and `-o' If you include these in the
  191.      COMPILATION-OPTIONS, they are ignored.
  192.  
  193. `-C'
  194.      Rename files to end in `.C' instead of `.c'. This is convenient if
  195.      you are converting a C program to C++. This option applies only to
  196.      `protoize'.
  197.  
  198. `-g'
  199.      Add explicit global declarations.  This means inserting explicit
  200.      declarations at the beginning of each source file for each function
  201.      that is called in the file and was not declared.  These
  202.      declarations precede the first function definition that contains a
  203.      call to an undeclared function.  This option applies only to
  204.      `protoize'.
  205.  
  206. `-i STRING'
  207.      Indent old-style parameter declarations with the string STRING.
  208.      This option applies only to `protoize'.
  209.  
  210.      `unprotoize' converts prototyped function definitions to old-style
  211.      function definitions, where the arguments are declared between the
  212.      argument list and the initial `{'.  By default, `unprotoize' uses
  213.      five spaces as the indentation.  If you want to indent with just
  214.      one space instead, use `-i " "'.
  215.  
  216. `-k'
  217.      Keep the `.X' files.  Normally, they are deleted after conversion
  218.      is finished.
  219.  
  220. `-l'
  221.      Add explicit local declarations.  `protoize' with `-l' inserts a
  222.      prototype declaration for each function in each block which calls
  223.      the function without any declaration.  This option applies only to
  224.      `protoize'.
  225.  
  226. `-n'
  227.      Make no real changes.  This mode just prints information about the
  228.      conversions that would have been done without `-n'.
  229.  
  230. `-N'
  231.      Make no `.save' files.  The original files are simply deleted. Use
  232.      this option with caution.
  233.  
  234. `-p PROGRAM'
  235.      Use the program PROGRAM as the compiler.  Normally, the name `gcc'
  236.      is used.
  237.  
  238. `-q'
  239.      Work quietly.  Most warnings are suppressed.
  240.  
  241. `-v'
  242.      Print the version number, just like `-v' for `gcc'.
  243.  
  244.    If you need special compiler options to compile one of your program's
  245. source files, then you should generate that file's `.X' file specially,
  246. by running `gcc' on that source file with the appropriate options and
  247. the option `-aux-info'.  Then run `protoize' on the entire set of
  248. files.  `protoize' will use the existing `.X' file because it is newer
  249. than the source file. For example:
  250.  
  251.      gcc -Dfoo=bar file1.c -aux-info
  252.      protoize *.c
  253.  
  254. You need to include the special files along with the rest in the
  255. `protoize' command, even though their `.X' files already exist, because
  256. otherwise they won't get converted.
  257.  
  258.    *Note Protoize Caveats::, for more information on how to use
  259. `protoize' successfully.
  260.  
  261. 
  262. File: gcc.info,  Node: Installation,  Next: Extensions,  Prev: Invoking GCC,  Up: Top
  263.  
  264. Installing GNU CC
  265. *****************
  266.  
  267.    Here is the procedure for installing GNU CC on a Unix system.
  268.  
  269. * Menu:
  270.  
  271. * Other Dir::     Compiling in a separate directory (not where the source is).
  272. * Cross-Compiler::   Building and installing a cross-compiler.
  273. * PA Install::    See below for installation on the HP Precision Architecture.
  274. * Sun Install::   See below for installation on the Sun.
  275. * 3b1 Install::   See below for installation on the 3b1.
  276. * Unos Install::  See below for installation on Unos (from CRDS).
  277. * VMS Install::   See below for installation on VMS.
  278. * WE32K Install:: See below for installation on the 3b* aside from the 3b1.
  279. * MIPS Install::  See below for installation on the MIPS Architecture.
  280.  
  281.   1. If you have built GNU CC previously in the same directory for a
  282.      different target machine, do `make distclean' to delete all files
  283.      that might be invalid.  One of the files this deletes is
  284.      `Makefile'; if `make distclean' complains that `Makefile' does not
  285.      exist, it probably means that the directory is already suitably
  286.      clean.
  287.  
  288.   2. On a System V release 4 system, make sure `/usr/bin' precedes
  289.      `/usr/ucb' in `PATH'.  The `cc' command in `/usr/ucb' uses
  290.      libraries which have bugs.
  291.  
  292.   3. Specify the host and target machine configurations.  You do this by
  293.      running the file `configure' with appropriate arguments.
  294.  
  295.      If you are building a compiler to produce code for the machine it
  296.      runs on, specify just one machine type.  Use the `--target'
  297.      option; the host type will default to be the same as the target. 
  298.      (For information on building a cross-compiler, see *Note
  299.      Cross-Compiler::.)  The command looks like this:
  300.  
  301.           configure --target=sparc-sun-sunos4.1
  302.  
  303.      A configuration name may be canonical or it may be more or less
  304.      abbreviated.
  305.  
  306.      A canonical configuration name has three parts, separated by
  307.      dashes. It looks like this: `CPU-COMPANY-SYSTEM'. (The three parts
  308.      may themselves contain dashes; `configure' can figure out which
  309.      dashes serve which purpose.)  For example, `m68k-sun-sunos4.1'
  310.      specifies a Sun 3.
  311.  
  312.      You can also replace parts of the configuration by nicknames or
  313.      aliases. For example, `sun3' stands for `m68k-sun', so
  314.      `sun3-sunos4.1' is another way to specify a Sun 3.  You can also
  315.      use simply `sun3-sunos', since the version of SunOS is assumed by
  316.      default to be version 4.  `sun3-bsd' also works, since `configure'
  317.      knows that the only BSD variant on a Sun 3 is SunOS.
  318.  
  319.      You can specify a version number after any of the system types,
  320.      and some of the CPU types.  In most cases, the version is
  321.      irrelevant, and will be ignored.  So you might as well specify the
  322.      version if you know it.
  323.  
  324.      Here are the possible CPU types:
  325.  
  326.           a29k, alpha, arm, cN, elxsi, hppa1.0, hppa1.1, i386, i860,
  327.           i960, m68000, m68k, m88k, mips, ns32k, pyramid, romp, rs6000,
  328.           sparc, vax, we32k.
  329.  
  330.      Here are the recognized company names.  As you can see, customary
  331.      abbreviations are used rather than the longer official names.
  332.  
  333.           alliant, altos, apollo, att, cbm, convergent, convex, crds,
  334.           dec, dg, encore, harris, hp, ibm, mips, motorola, ncr, next,
  335.           ns, omron, sequent, sgi, sony, sun, tti, unicom.
  336.  
  337.      The company name is meaningful only to disambiguate when the rest
  338.      of the information supplied is insufficient.  You can omit it,
  339.      writing just `CPU-SYSTEM', if it is not needed.  For example,
  340.      `vax-ultrix4.2' is equivalent to `vax-dec-ultrix4.2'.
  341.  
  342.      Here is a list of system types:
  343.  
  344.           aix, aos, bsd, ctix, dgux, dynix, genix, hpux, isc, linux,
  345.           luna, mach, minix, newsos, osf, osfrose, riscos, sco, sunos,
  346.           sysv, ultrix, unos, vms.
  347.  
  348.      You can omit the system type; then `configure' guesses the
  349.      operating system from the CPU and company.
  350.  
  351.      You can add a version number to the system type; this may or may
  352.      not make a difference.  For example, you can write `bsd4.3' or
  353.      `bsd4.4' to distinguish versions of BSD.  In practice, the version
  354.      number is most needed for `sysv3' and `sysv4', which are often
  355.      treated differently.
  356.  
  357.      If you specify an impossible combination such as `i860-dg-vms',
  358.      then you may get an error message from `configure', or it may
  359.      ignore part of the information and do the best it can with the
  360.      rest. `configure' always prints the canonical name for the
  361.      alternative that it used.
  362.  
  363.      Often a particular model of machine has a name.  Many machine
  364.      names are recognized as aliases for CPU/company combinations. 
  365.      Thus, the machine name `sun3', mentioned above, is an alias for
  366.      `m68k-sun'. Sometimes we accept a company name as a machine name,
  367.      when the name is popularly used for a particular machine.  Here is
  368.      a table of the known machine names:
  369.  
  370.           3300, 3b1, 3bN, 7300, altos3068, altos, apollo68, att-7300,
  371.           balance, convex-cN, crds, decstation-3100, decstation, delta,
  372.           encore, fx2800, gmicro, hp7NN, hp8NN, hp9k2NN, hp9k3NN,
  373.           hp9k7NN, hp9k8NN, iris4d, iris, isi68, m3230, magnum, merlin,
  374.           miniframe, mmax, news-3600, news800, news, next, pbd, pc532,
  375.           pmax, ps2, risc-news, rtpc, sun2, sun386i, sun386, sun3,
  376.           sun4, symmetry, tower-32, tower.
  377.  
  378.      Remember that a machine name specifies both the cpu type and the
  379.      company name.
  380.  
  381.      There are four additional options you can specify independently to
  382.      describe variant hardware and software configurations.  These are
  383.      `--with-gnu-as', `--with-gnu-ld', `--with-stabs' and `--nfp'.
  384.  
  385.     `--with-gnu-as'
  386.           On certain systems, you must specify whether you want GNU CC
  387.           to work with the usual compilation tools or with the GNU
  388.           compilation tools (including GAS).  Use the `--with-gnu-as'
  389.           argument when you run `configure', if you want to use the GNU
  390.           tools.  (Specify `--with-gnu-ld' as well, since on these
  391.           systems GAS works only with the GNU linker.)  The systems
  392.           where this makes a difference are `i386-ANYTHING-sysv',
  393.           `i860-ANYTHING-bsd', `m68k-hp-hpux', `m68k-sony-bsd',
  394.           `m68k-altos-sysv', `m68000-hp-hpux', and `m68000-att-sysv'. 
  395.           On any other system, `--with-gnu-as' has no effect.
  396.  
  397.     `--with-gnu-ld'
  398.           Specify the option `--with-gnu-ld' if you plan to use the GNU
  399.           linker.  This inhibits the installation of `collect2', a
  400.           program which otherwise serves as a front-end for the
  401.           system's linker on most configurations.
  402.  
  403.     `--with-stabs'
  404.           On MIPS based systems, you must specify whether you want GNU
  405.           CC to create the normal ECOFF debugging format, or to use
  406.           BSD-style stabs passed through the ECOFF symbol table.  The
  407.           normal ECOFF debug format cannot fully handle languages other
  408.           than C.  BSD stabs format can handle other languages, but it
  409.           only works with the GNU debugger GDB.
  410.  
  411.           Normally, GNU CC uses the ECOFF debugging format by default;
  412.           if you prefer BSD stabs, specify `--with-stabs' when you
  413.           configure GNU CC.
  414.  
  415.           No matter which default you choose when you configure GNU CC,
  416.           the user can use the `-gcoff' and `-gstabs+' options to
  417.           specify explicitly the debug format for a particular
  418.           compilation.
  419.  
  420.     `--nfp'
  421.           On certain systems, you must specify whether the machine has
  422.           a floating point unit.  These systems are `m68k-sun-sunosN'
  423.           and `m68k-isi-bsd'.  On any other system, `--nfp' currently
  424.           has no effect, though perhaps there are other systems where
  425.           it could usefully make a difference.
  426.  
  427.      If you want to install your own homemade configuration files, you
  428.      can use `local' as the company name to access them.  If you use
  429.      configuration `CPU-local', the entire configuration name is used
  430.      to form the configuration file names.
  431.  
  432.      Thus, if you specify `m68k-local', then the files used are
  433.      `m68k-local.md', `m68k-local.h', `m68k-local.c',
  434.      `xm-m68k-local.h', `t-m68k-local', and `x-m68k-local'.
  435.  
  436.      Here is a list of configurations that have special treatment or
  437.      special things you must know:
  438.  
  439.     `alpha-*-osf1'
  440.           Systems using processors that implement the DEC Alpha
  441.           architecture and are running the OSF/1 operating system. (VMS
  442.           on the Alpha is not currently supported by GNU CC.)  As of
  443.           this writing, the only Alpha-based product currently
  444.           available from DEC is the 21064 (EV4) processor chip; no
  445.           system-level products can be ordered.  This port is provided
  446.           for those developers who might have early Alpha hardware from
  447.           DEC or other vendors and run the OSF/1 operating system.  It
  448.           has not been extensively tested and both the C++ and
  449.           Objective-C languages may not work, except in a
  450.           cross-compilation environment.
  451.  
  452.           The `ASSEMBLE_FILE_START' macro writes a `.verstamp' directive
  453.           containing the version of the calling sequence.  Currently,
  454.           we use `9 0', which we believe will work until the official
  455.           release by DEC of their system, at which point `3 11' is the
  456.           correct value.  If you get a mismatch error from the
  457.           assembler on a `.verstamp' line, consult the file
  458.           `/usr/include/stamp.h' for the present value.  GNU C on the
  459.           Alpha does not support versions of DEC's OSF/1 earlier than
  460.           BL9; if you are running an older version, we suggest you ask
  461.           your DEC contact for an update.
  462.  
  463.           Note that since the Alpha is a 64-bit architecture,
  464.           cross-compilers from 32-bit machines will not generate as
  465.           efficient code as that generated when the compiler is running
  466.           on a 64-bit machine because many optimizations that depend on
  467.           being able to represent a word on the target in an integral
  468.           value on the host cannot be performed.
  469.  
  470.     `a29k'
  471.           AMD Am29K-family processors.  These are normally used in
  472.           embedded applications.  There are no standard Unix
  473.           configurations. This configuration corresponds to AMD's
  474.           standard calling sequence and binary interface and is
  475.           compatible with other 29K tools.
  476.  
  477.           You may need to make a variant of the file `a29k.h' for your
  478.           particular configuration.
  479.  
  480.     `a29k-*-bsd'
  481.           AMD Am29050 used in a system running a variant of BSD Unix.
  482.  
  483.     `elxsi-elxsi-bsd'
  484.           The Elxsi's C compiler has known limitations that prevent it
  485.           from compiling GNU C.  Please contact `mrs@cygnus.com' for
  486.           more details.
  487.  
  488.     `i386-*-sco'
  489.           Compilation with RCC is recommended.
  490.  
  491.     `i386-ibm-aix'
  492.           You need a version of GAS that you can get from
  493.           `tranle@intellicorp.com'.
  494.  
  495.     `i386-sequent'
  496.           Go to the Berkeley universe before compiling.  In addition,
  497.           you probably need to create a file named `string.h'
  498.           containing just one line: `#include <strings.h>'.
  499.  
  500.     `m68000-att'
  501.           AT&T 3b1, a.k.a. 7300 PC.  Special procedures are needed to
  502.           compile GNU CC with this machine's standard C compiler, due
  503.           to bugs in that compiler.  *Note 3b1 Install::.  You can
  504.           bootstrap it more easily with previous versions of GNU CC if
  505.           you have them.
  506.  
  507.     `m68000-hp-bsd'
  508.           HP 9000 series 200 running BSD.  Note that the C compiler
  509.           that comes with this system cannot compile GNU CC; contact
  510.           `law@cs.utah.edu' to get binaries of GNU CC for bootstrapping.
  511.  
  512.     `m68k-altos'
  513.           Altos 3068.  You must use the GNU assembler, linker and
  514.           debugger, with COFF-encapsulation.  Also, you must fix a
  515.           kernel bug.  Details in the file `README.ALTOS'.
  516.  
  517.     `m68k-hp-hpux'
  518.           HP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0
  519.           has a bug in the assembler that prevents compilation of GNU
  520.           CC.  To fix it, get patch PHCO_0800 from HP.
  521.  
  522.           In addition, `--gas' does not currently work with this
  523.           configuration.  Changes in HP-UX have broken the library
  524.           conversion tool and the linker.
  525.  
  526.     `m68k-sun'
  527.           Sun 3.  We do not provide a configuration file to use the Sun
  528.           FPA by default, because programs that establish signal
  529.           handlers for floating point traps inherently cannot work with
  530.           the FPA.
  531.  
  532.     `m88k-svr3'
  533.           Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference
  534.           port. These systems tend to use the Green Hills C, revision
  535.           1.8.5, as the standard C compiler.  There are apparently bugs
  536.           in this compiler that result in object files differences
  537.           between stage 2 and stage 3.  If this happens, make the stage
  538.           4 compiler and compare it to the stage 3 compiler.  If the
  539.           stage 3 and stage 4 object files are identical, this suggests
  540.           a problem with the standard C compiler.  It is best, however,
  541.           to use an older version of GNU CC for bootstrapping.
  542.  
  543.     `m88k-dgux'
  544.           Motorola m88k running DG/UX.  To build native or cross
  545.           compilers on DG/UX, you must first change to the 88open BCS
  546.           software development environment.  This is done by issuing
  547.           this command:
  548.  
  549.                eval `sde-target m88kbcs`
  550.  
  551.     `mips-mips-bsd'
  552.           MIPS machines running the MIPS operating system in BSD mode. 
  553.           It's possible that some old versions of the system lack the
  554.           functions `memcpy', `memcmp', and `memset'.  If your system
  555.           lacks these, you must remove or undo the definition of
  556.           `TARGET_MEM_FUNCTIONS' in `mips-bsd.h'.
  557.  
  558.     `mips-sony-sysv'
  559.           Sony MIPS NEWS.  This works in NEWSOS 5.0.1, but not in 5.0.2
  560.           (which uses ELF instead of COFF).  Support for 5.0.2 will
  561.           probably be provided soon by volunteers.
  562.  
  563.     `ns32k-encore'
  564.           Encore ns32000 system.  Encore systems are supported only
  565.           under BSD.
  566.  
  567.     `ns32k-*-genix'
  568.           National Semiconductor ns32000 system.  Genix has bugs in
  569.           `alloca' and `malloc'; you must get the compiled versions of
  570.           these from GNU Emacs.
  571.  
  572.     `ns32k-sequent'
  573.           Go to the Berkeley universe before compiling.  In addition,
  574.           you probably need to create a file named `string.h'
  575.           containing just one line: `#include <strings.h>'.
  576.  
  577.     `ns32k-utek'
  578.           UTEK ns32000 system ("merlin").  The C compiler that comes
  579.           with this system cannot compile GNU CC; contact
  580.           `tektronix!reed!mason' to get binaries of GNU CC for
  581.           bootstrapping.
  582.  
  583.     `romp-*-aos'
  584.     `romp-*-mach'
  585.           The only operating systems supported for the IBM RT PC are
  586.           AOS and MACH.  GNU CC does not support AIX running on the RT.
  587.            We recommend you compile GNU CC with an earlier version of
  588.           itself; if you compile GNU CC with `hc', the Metaware
  589.           compiler, it will work, but you will get mismatches between
  590.           the stage 2 and stage 3 compilers in various files. These
  591.           errors are minor differences in some floating-point constants
  592.           and can be safely ignored; the stage 3 compiler is correct.
  593.  
  594.     `rs6000-*-aix'
  595.           *Read the file `README.RS6000' for information on how to get
  596.           a fix for a problem in the IBM assembler that prevents use of
  597.           GNU CC.* You must either obtain the new assembler or avoid
  598.           using the `-g' switch.  Note that `Makefile.in' uses `-g' by
  599.           default when compiling `libgcc2.c'.
  600.  
  601.     `vax-dec-ultrix'
  602.           Don't try compiling with Vax C (`vcc').  It produces
  603.           incorrect code in some cases (for example, when `alloca' is
  604.           used).
  605.  
  606.           Meanwhile, compiling `cp-parse.c' with pcc does not work
  607.           because of an internal table size limitation in that
  608.           compiler.  To avoid this problem, compile just the GNU C
  609.           compiler first, and use it to recompile building all the
  610.           languages that you want to run.
  611.  
  612.      Here we spell out what files will be set up by `configure'. 
  613.      Normally you need not be concerned with these files.
  614.  
  615.         * A symbolic link named `config.h' is made to the top-level
  616.           config file for the machine you will run the compiler on
  617.           (*note Config::.). This file is responsible for defining
  618.           information about the host machine.  It includes `tm.h'.
  619.  
  620.           The top-level config file is located in the subdirectory
  621.           `config'. Its name is always `xm-SOMETHING.h'; usually
  622.           `xm-MACHINE.h', but there are some exceptions.
  623.  
  624.           If your system does not support symbolic links, you might
  625.           want to set up `config.h' to contain a `#include' command
  626.           which refers to the appropriate file.
  627.  
  628.         * A symbolic link named `tconfig.h' is made to the top-level
  629.           config file for your target machine.  This is used for
  630.           compiling certain programs to run on that machine.
  631.  
  632.         * A symbolic link named `tm.h' is made to the
  633.           machine-description macro file for your target machine.  It
  634.           should be in the subdirectory `config' and its name is often
  635.           `MACHINE.h'.
  636.  
  637.         * A symbolic link named `md' will be made to the machine
  638.           description pattern file.  It should be in the `config'
  639.           subdirectory and its name should be `MACHINE.md'; but MACHINE
  640.           is often not the same as the name used in the `tm.h' file
  641.           because the `md' files are more general.
  642.  
  643.         * A symbolic link named `aux-output.c' will be made to the
  644.           output subroutine file for your machine.  It should be in the
  645.           `config' subdirectory and its name should be `MACHINE.c'.
  646.  
  647.         * The command file `configure' also constructs `Makefile' by
  648.           adding some text to the template file `Makefile.in'.  The
  649.           additional text comes from files in the `config' directory,
  650.           named `t-TARGET' and `h-HOST'.  If these files do not exist,
  651.           it means nothing needs to be added for a given target or host.
  652.  
  653.   4. Make sure the Bison parser generator is installed.  (This is
  654.      unnecessary if the Bison output files `c-parse.c' and `cexp.c' are
  655.      more recent than `c-parse.y' and `cexp.y' and you do not plan to
  656.      change the `.y' files.)
  657.  
  658.      Bison versions older than Sept 8, 1988 will produce incorrect
  659.      output for `c-parse.c'.
  660.  
  661.   5. Build the compiler.  Just type `make LANGUAGES=c' in the compiler
  662.      directory.
  663.  
  664.      `LANGUAGES=c' specifies that only the C compiler should be
  665.      compiled.  The makefile normally builds compilers for all the
  666.      supported languages; currently, C, C++ and Objective C.  However,
  667.      C is the only language that is sure to work when you build with
  668.      other non-GNU C compilers.  In addition, building anything but C
  669.      at this stage is a waste of time.
  670.  
  671.      In general, you can specify the languages to build by typing the
  672.      argument `LANGUAGES="LIST"', where LIST is one or more words from
  673.      the list `c', `c++', and `objective-c'.
  674.  
  675.      Ignore any warnings you may see about "statement not reached" in
  676.      `insn-emit.c'; they are normal.  Any other compilation errors may
  677.      represent bugs in the port to your machine or operating system, and
  678.      should be investigated and reported (*note Bugs::.).
  679.  
  680.      Some commercial compilers fail to compile GNU CC because they have
  681.      bugs or limitations.  For example, the Microsoft compiler is said
  682.      to run out of macro space.  Some Ultrix compilers run out of
  683.      expression space; then you need to break up the statement where
  684.      the problem happens.
  685.  
  686.      If you are building with a previous GNU C compiler, do not use
  687.      `CC=gcc' on the make command or by editing the Makefile. Instead,
  688.      use a full pathname to specify the compiler, such as
  689.      `CC=/usr/local/bin/gcc'.  This is because make might execute the
  690.      `gcc' in the current directory before all of the compiler
  691.      components have been built.
  692.  
  693.   6. If you are using COFF-encapsulation, you must convert `libgcc.a' to
  694.      a GNU-format library at this point.  See the file `README.ENCAP'
  695.      in the directory containing the GNU binary file utilities, for
  696.      directions.
  697.  
  698.   7. If you are building a cross-compiler, stop here.  *Note
  699.      Cross-Compiler::.
  700.  
  701.   8. Move the first-stage object files and executables into a
  702.      subdirectory with this command:
  703.  
  704.           make stage1
  705.  
  706.      The files are moved into a subdirectory named `stage1'. Once
  707.      installation is complete, you may wish to delete these files with
  708.      `rm -r stage1'.
  709.  
  710.   9. Recompile the compiler with itself, with this command:
  711.  
  712.           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"
  713.  
  714.      This is called making the stage 2 compiler.
  715.  
  716.      The command shown above builds compilers for all the supported
  717.      languages.  If you don't want them all, you can specify the
  718.      languages to build by typing the argument `LANGUAGES="LIST"'.  LIST
  719.      should contain one or more words from the list `c', `c++',
  720.      `objective-c', and `proto'.  Separate the words with spaces.
  721.      `proto' stands for the programs `protoize' and `unprotoize'; they
  722.      are not a separate language, but you use `LANGUAGES' to enable or
  723.      disable their installation.
  724.  
  725.      If you are going to build the stage 3 compiler, then you might
  726.      want to build only the C language in stage 2.
  727.  
  728.      Once you have built the stage 2 compiler, if you are short of disk
  729.      space, you can delete the subdirectory `stage1'.
  730.  
  731.      On a 68000 or 68020 system lacking floating point hardware, unless
  732.      you have selected a `tm.h' file that expects by default that there
  733.      is no such hardware, do this instead:
  734.  
  735.           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float"
  736.  
  737.  10. If you wish to test the compiler by compiling it with itself one
  738.      more time, do this:
  739.  
  740.           make stage2
  741.           make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
  742.  
  743.      This is called making the stage 3 compiler.  Aside from the `-B'
  744.      option, the compiler options should be the same as when you made
  745.      the stage 2 compiler.  But the `LANGUAGES' option need not be the
  746.      same.  The command shown above builds compilers for all the
  747.      supported languages; if you don't want them all, you can specify
  748.      the languages to build by typing the argument `LANGUAGES="LIST"',
  749.      as described above.
  750.  
  751.      Then compare the latest object files with the stage 2 object
  752.      files--they ought to be identical, unless they contain time stamps.
  753.      You can compare the files, disregarding the time stamps if any,
  754.      like this:
  755.  
  756.           make compare
  757.  
  758.      This will mention any object files that differ between stage 2 and
  759.      stage 3.  Any difference, no matter how innocuous, indicates that
  760.      the stage 2 compiler has compiled GNU CC incorrectly, and is
  761.      therefore a potentially serious bug which you should investigate
  762.      and report (*note Bugs::.).
  763.  
  764.      If your system does not put time stamps in the object files, then
  765.      this is a faster way to compare them (using the Bourne shell):
  766.  
  767.           for file in *.o; do
  768.           cmp $file stage2/$file
  769.           done
  770.  
  771.      If you have built the compiler with the `-mno-mips-tfile' option on
  772.      MIPS machines, you will not be able to compare the files.
  773.  
  774.  11. Install the compiler driver, the compiler's passes and run-time
  775.      support. You can use the following command:
  776.  
  777.           make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="LIST"
  778.  
  779.      (Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you
  780.      used when compiling the files that are being installed.  One
  781.      reason this is necessary is that some versions of Make have bugs
  782.      and recompile files gratuitously when you do this step.  If you
  783.      use the same variable values, those files will be recompiled
  784.      properly.
  785.  
  786.      This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1',
  787.      `cpp' and `libgcc.a' in directory
  788.      `/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the
  789.      compiler driver program looks for them.  Here TARGET is the target
  790.      machine type specified when you ran `configure', and VERSION is
  791.      the version number of GNU CC.  This naming scheme permits various
  792.      versions and/or cross-compilers to coexist.
  793.  
  794.      It also copies the driver program `gcc' into the directory
  795.      `/usr/local/bin', so that it appears in typical execution search
  796.      paths.
  797.  
  798.      On some systems, this command will cause recompilation of some
  799.      files. This is usually due to bugs in `make'.  You should either
  800.      ignore this problem, or use GNU Make.
  801.  
  802.      *Warning: there is a bug in `alloca' in the Sun library.  To avoid
  803.      this bug, be sure to install the executables of GNU CC that were
  804.      compiled by GNU CC.  (That is, the executables from stage 2 or 3,
  805.      not stage 1.)  They use `alloca' as a built-in function and never
  806.      the one in the library.*
  807.  
  808.      (It is usually better to install GNU CC executables from stage 2
  809.      or 3, since they usually run faster than the ones compiled with
  810.      some other compiler.)
  811.  
  812.  12. Install the Objective C library (if you have built the Objective C
  813.      compiler).  Here is the command to do this:
  814.  
  815.           make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
  816.  
  817.  13. Correct errors in the header files on your machine.
  818.  
  819.      Various system header files often contain constructs which are
  820.      erroneous, incompatible with ANSI C or otherwise unsuitable, and
  821.      they will not work when you compile programs with GNU CC.
  822.  
  823.      The most common erroneous construct is found in `ioctl.h', where a
  824.      macro expects argument values to be substituted for argument names
  825.      inside of character constants--something not done in ANSI C.  This
  826.      particular problem can be prevented by using `-traditional'.  Other
  827.      problems are not so easy to work around.
  828.  
  829.      GNU CC comes with shell scripts to fix known header file problems.
  830.       They install corrected copies of various header files in a
  831.      special directory where only GNU CC will normally look for them. 
  832.      The scripts adapt to various systems by searching all the system
  833.      header files for the problem cases that we know about.
  834.  
  835.      Use the following command to do this:
  836.  
  837.           make install-fixincludes
  838.  
  839.      If you selected a different directory for GNU CC installation when
  840.      you installed it, by specifying the Make variable `prefix' or
  841.      `libdir', specify it the same way in this command.
  842.  
  843.      Note that some systems are starting to come with ANSI C system
  844.      header files.  On these systems, don't run `install-fixincludes';
  845.      it may not work, and is certainly not necessary.  One exception:
  846.      there are is a special script for System V release 4, which you
  847.      should run.
  848.  
  849.      It is not the purpose of `install-fixincludes' to add prototypes to
  850.      the system header files.  We support headers with ANSI C
  851.      prototypes in the GNU C Library, and we have no time to support
  852.      adding them to other systems' header files.
  853.  
  854.    If you cannot install the compiler's passes and run-time support in
  855. `/usr/local/lib', you can alternatively use the `-B' option to specify
  856. a prefix by which they may be found.  The compiler concatenates the
  857. prefix with the names  `cpp', `cc1' and `libgcc.a'. Thus, you can put
  858. the files in a directory `/usr/foo/gcc' and specify `-B/usr/foo/gcc/'
  859. when you run GNU CC.
  860.  
  861.    Also, you can specify an alternative default directory for these
  862. files by setting the Make variable `libdir' when you make GNU CC.
  863.  
  864. 
  865. File: gcc.info,  Node: Other Dir,  Next: Cross-Compiler,  Up: Installation
  866.  
  867. Compilation in a Separate Directory
  868. ===================================
  869.  
  870.    If you wish to build the object files and executables in a directory
  871. other than the one containing the source files, here is what you must
  872. do differently:
  873.  
  874.   1. Make sure you have a version of Make that supports the `VPATH'
  875.      feature.  (GNU Make supports it, as do Make versions on most BSD
  876.      systems.)
  877.  
  878.   2. If you have ever run `configure' in the source directory, you must
  879.      undo the configuration.  Do this by running:
  880.  
  881.           make distclean
  882.  
  883.   3. Go to the directory in which you want to build the compiler before
  884.      running `configure':
  885.  
  886.           mkdir gcc-sun3
  887.           cd gcc-sun3
  888.  
  889.      On systems that do not support symbolic links, this directory must
  890.      be on the same file system as the source code directory.
  891.  
  892.   4. Specify where to find `configure' when you run it:
  893.  
  894.           ../gcc/configure ...
  895.  
  896.      This also tells `configure' where to find the compiler sources;
  897.      `configure' takes the directory from the file name that was used to
  898.      invoke it.  But if you want to be sure, you can specify the source
  899.      directory with the `--srcdir' option, like this:
  900.  
  901.           ../gcc/configure --srcdir=../gcc sun3
  902.  
  903.      The directory you specify with `--srcdir' need not be the same as
  904.      the one that `configure' is found in.
  905.  
  906.    Now, you can run `make' in that directory.  You need not repeat the
  907. configuration steps shown above, when ordinary source files change.  You
  908. must, however, run `configure' again when the configuration files
  909. change, if your system does not support symbolic links.
  910.  
  911. 
  912. File: gcc.info,  Node: Cross-Compiler,  Next: PA Install,  Prev: Other Dir,  Up: Installation
  913.  
  914. Building and Installing a Cross-Compiler
  915. ========================================
  916.  
  917.    GNU CC can function as a cross-compiler for many machines, but not
  918. all.
  919.  
  920.    * Cross-compilers for the Mips as target do not work because the
  921.      auxiliary programs `mips-tdump.c' and `mips-tfile.c' can't be
  922.      compiled on anything but a Mips.
  923.  
  924.    * Cross-compilers to or from the Vax probably don't work completely
  925.      because the Vax uses an incompatible floating point format (not
  926.      IEEE format).
  927.  
  928.    Since GNU CC generates assembler code, you probably need a
  929. cross-assembler that GNU CC can run, in order to produce object files.
  930. If you want to link on other than the target machine, you need a
  931. cross-linker as well.  You also need header files and libraries suitable
  932. for the target machine that you can install on the host machine.
  933.  
  934.    To build GNU CC as a cross-compiler, you start out by running
  935. `configure'.  You must specify two different configurations, the host
  936. and the target.  Use the `--host=HOST' option for the host and
  937. `--target=TARGET' to specify the target type.  For example, here is how
  938. to configure for a cross-compiler that runs on a hypothetical Intel 386
  939. system and produces code for an HP 68030 system running BSD:
  940.  
  941.      configure --target=m68k-hp-bsd4.3 --host=i386-bozotheclone-bsd4.3
  942.  
  943.    Next you should install the cross-assembler and cross-linker (and
  944. `ar' and `ranlib').  Put them in the directory `/usr/local/TARGET/bin'.
  945.  The installation of GNU CC will find them there and copy or link them
  946. to the proper place to find them when you run the cross-compiler later.
  947.  
  948.    If you want to install any additional libraries to use with the
  949. cross-compiler, put them in the directory `/usr/local/TARGET/lib'; all
  950. files in that subdirectory will be installed in the proper place when
  951. you install the cross-compiler. Likewise, put the header files for the
  952. target machine in `/usr/local/TARGET/include'.
  953.  
  954.    You must now produce a substitute for `libgcc1.a'.  Normally this
  955. file is compiled with the "native compiler" for the target machine;
  956. compiling it with GNU CC does not work.  But compiling it with the host
  957. machine's compiler also doesn't work--that produces a file that would
  958. run on the host, and you need it to run on the target.
  959.  
  960.    We can't give you any automatic way to produce this substitute.  For
  961. some targets, the subroutines in `libgcc1.c' are not actually used. You
  962. need not provide the ones that won't be used.  The ones that most
  963. commonly are used are the multiplication, division and remainder
  964. routines--many RISC machines rely on the library for this.  One way to
  965. make them work is to define the appropriate `perform_...' macros for
  966. the subroutines that you need.  If these definitions do not use the C
  967. arithmetic operators that they are meant to implement, you might be
  968. able to compile them with the cross-compiler you are building. To do
  969. this, specify `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building the
  970. compiler.
  971.  
  972.    Now you can proceed just as for compiling a single-machine compiler
  973. through the step of building stage 1.  If you have not provided some
  974. sort of `libgcc1.a', then compilation will give up at the point where
  975. it needs that file, printing a suitable error message.  If you do
  976. provide `libgcc1.a', then building the compiler will automatically
  977. compile and link a test program called `cross-test'; if you get errors
  978. in the linking, it means that not all of the necessary routines in
  979. `libgcc1.a' are available.
  980.  
  981.    When you are using a cross-compiler configuration, building stage 1
  982. does not compile all of GNU CC.  This is because one part of building,
  983. the compilation of `libgcc2.c', requires use of the cross-compiler.
  984.  
  985.    However, when you type `make install' to install the bulk of the
  986. cross-compiler, that will also compile `libgcc2.c' and install the
  987. resulting `libgcc.a'.
  988.  
  989.    Do not try to build stage 2 for a cross-compiler.  It doesn't work to
  990. rebuild GNU CC as a cross-compiler using the cross-compiler, because
  991. that would produce a program that runs on the target machine, not on the
  992. host.  For example, if you compile a 386-to-68030 cross-compiler with
  993. itself, the result will not be right either for the 386 (because it was
  994. compiled into 68030 code) or for the 68030 (because it was configured
  995. for a 386 as the host).  If you want to compile GNU CC into 68030 code,
  996. whether you compile it on a 68030 or with a cross-compiler on a 386, you
  997. must specify a 68030 as the host when you configure it.
  998.  
  999. 
  1000. File: gcc.info,  Node: PA Install,  Next: Sun Install,  Prev: Cross-Compiler,  Up: Installation
  1001.  
  1002. Installing GNU CC on the HP Precision Architecture
  1003. ==================================================
  1004.  
  1005.    There are two variants of this CPU, called 1.0 and 1.1, which have
  1006. different machine descriptions.  You must use the right one for your
  1007. machine.  All 7NN machines and 8N7 machines use 1.1, while all other
  1008. 8NN machines use 1.0.
  1009.  
  1010.    The easiest way to handle this problem is to use `configure hpNNN'
  1011. or `configure hpNNN-hpux', where NNN is the model number of the
  1012. machine.  Then `configure' will figure out if the machine is a 1.0 or
  1013. 1.1.  Use `uname -a' to find out the model number of your machine.
  1014.  
  1015.    `-g' does not work on HP-UX, since that system uses a peculiar
  1016. debugging format which GNU CC does not know about.  There are
  1017. preliminary versions of GAS and GDB for the HP-PA which do work with
  1018. GNU CC for debugging.  You can get them by anonymous ftp from
  1019. `jaguar.cs.utah.edu' `dist' subdirectory.  You would need to install
  1020. GAS in the file
  1021.  
  1022.      /usr/local/lib/gcc-lib/CONFIGURATION/GCCVERSION/as
  1023.  
  1024. where CONFIGURATION is the configuration name (perhaps `hpNNN-hpux')
  1025. and GCCVERSION is the GNU CC version number.  Note, if you picked up
  1026. GAS before October 6, 1992 it is highly recommended you get a new one
  1027. to avoid several bugs which have been discovered recently.
  1028.  
  1029.    To enable debugging, configure GNU CC with the `--gas' option before
  1030. building.
  1031.  
  1032. 
  1033. File: gcc.info,  Node: Sun Install,  Next: 3b1 Install,  Prev: PA Install,  Up: Installation
  1034.  
  1035. Installing GNU CC on the Sun
  1036. ============================
  1037.  
  1038.    Make sure the environment variable `FLOAT_OPTION' is not set when
  1039. you compile `libgcc.a'.  If this option were set to `f68881' when
  1040. `libgcc.a' is compiled, the resulting code would demand to be linked
  1041. with a special startup file and would not link properly without special
  1042. pains.
  1043.  
  1044.    There is a bug in `alloca' in certain versions of the Sun library.
  1045. To avoid this bug, install the binaries of GNU CC that were compiled by
  1046. GNU CC.  They use `alloca' as a built-in function and never the one in
  1047. the library.
  1048.  
  1049.    Some versions of the Sun compiler crash when compiling GNU CC.  The
  1050. problem is a segmentation fault in cpp.  This problem seems to be due to
  1051. the bulk of data in the environment variables.  You may be able to avoid
  1052. it by using the following command to compile GNU CC with Sun CC:
  1053.  
  1054.      make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
  1055.  
  1056. 
  1057. File: gcc.info,  Node: 3b1 Install,  Next: Unos Install,  Prev: Sun Install,  Up: Installation
  1058.  
  1059. Installing GNU CC on the 3b1
  1060. ============================
  1061.  
  1062.    Installing GNU CC on the 3b1 is difficult if you do not already have
  1063. GNU CC running, due to bugs in the installed C compiler.  However, the
  1064. following procedure might work.  We are unable to test it.
  1065.  
  1066.   1. Comment out the `#include "config.h"' line on line 37 of `cccp.c'
  1067.      and do `make cpp'.  This makes a preliminary version of GNU cpp.
  1068.  
  1069.   2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that
  1070.      file name.
  1071.  
  1072.   3. Undo your change in `cccp.c', or reinstall the original version,
  1073.      and do `make cpp' again.
  1074.  
  1075.   4. Copy this final version of GNU cpp into `/lib/cpp'.
  1076.  
  1077.   5. Replace every occurrence of `obstack_free' in the file `tree.c'
  1078.      with `_obstack_free'.
  1079.  
  1080.   6. Run `make' to get the first-stage GNU CC.
  1081.  
  1082.   7. Reinstall the original version of `/lib/cpp'.
  1083.  
  1084.   8. Now you can compile GNU CC with itself and install it in the normal
  1085.      fashion.
  1086.  
  1087. 
  1088. File: gcc.info,  Node: Unos Install,  Next: VMS Install,  Prev: 3b1 Install,  Up: Installation
  1089.  
  1090. Installing GNU CC on Unos
  1091. =========================
  1092.  
  1093.    Use `configure unos' for building on Unos.
  1094.  
  1095.    The Unos assembler is named `casm' instead of `as'.  For some
  1096. strange reason linking `/bin/as' to `/bin/casm' changes the behavior,
  1097. and does not work.  So, when installing GNU CC, you should install the
  1098. following script as `as' in the subdirectory where the passes of GCC
  1099. are installed:
  1100.  
  1101.      #!/bin/sh
  1102.      casm $*
  1103.  
  1104.    The default Unos library is named `libunos.a' instead of `libc.a'. 
  1105. To allow GNU CC to function, either change all references to `-lc' in
  1106. `gcc.c' to `-lunos' or link `/lib/libc.a' to `/lib/libunos.a'.
  1107.  
  1108.    When compiling GNU CC with the standard compiler, to overcome bugs in
  1109. the support of `alloca', do not use `-O' when making stage 2. Then use
  1110. the stage 2 compiler with `-O' to make the stage 3 compiler.  This
  1111. compiler will have the same characteristics as the usual stage 2
  1112. compiler on other systems.  Use it to make a stage 4 compiler and
  1113. compare that with stage 3 to verify proper compilation.
  1114.  
  1115.    (Perhaps simply defining `ALLOCA' in `x-crds' as described in the
  1116. comments there will make the above paragraph superfluous.  Please
  1117. inform us of whether this works.)
  1118.  
  1119.    Unos uses memory segmentation instead of demand paging, so you will
  1120. need a lot of memory.  5 Mb is barely enough if no other tasks are
  1121. running. If linking `cc1' fails, try putting the object files into a
  1122. library and linking from that library.
  1123.  
  1124.