Annotation of gcc/gcc.info-4, revision 1.1.1.4

1.1.1.4 ! root        1: This is Info file gcc.info, produced by Makeinfo-1.49 from the input
1.1       root        2: file gcc.texi.
                      3: 
                      4:    This file documents the use and the internals of the GNU compiler.
                      5: 
                      6:    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
                      7: 
1.1.1.3   root        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.
1.1       root       11: 
                     12:    Permission is granted to copy and distribute modified versions of
                     13: this manual under the conditions for verbatim copying, provided also
1.1.1.4 ! root       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.
1.1       root       19: 
                     20:    Permission is granted to copy and distribute translations of this
                     21: manual into another language, under the above conditions for modified
1.1.1.3   root       22: versions, except that the sections entitled "GNU General Public
1.1.1.4 ! root       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 `[email protected]' 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:           `[email protected]'.
        !           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:     `i386-sun-sunos4'
        !           501:           You may find that you need another version of GNU CC to begin
        !           502:           bootstrapping with, since the current version when built with
        !           503:           the system's own compiler seems to get an infinite loop
        !           504:           compiling part of `libgcc2.c'.  GNU CC version 2 compiled
        !           505:           with GNU CC (any version) seems not to have this problem.
        !           506: 
        !           507:     `m68000-att'
        !           508:           AT&T 3b1, a.k.a. 7300 PC.  Special procedures are needed to
        !           509:           compile GNU CC with this machine's standard C compiler, due
        !           510:           to bugs in that compiler.  *Note 3b1 Install::.  You can
        !           511:           bootstrap it more easily with previous versions of GNU CC if
        !           512:           you have them.
        !           513: 
        !           514:     `m68000-hp-bsd'
        !           515:           HP 9000 series 200 running BSD.  Note that the C compiler
        !           516:           that comes with this system cannot compile GNU CC; contact
        !           517:           `[email protected]' to get binaries of GNU CC for bootstrapping.
        !           518: 
        !           519:     `m68k-altos'
        !           520:           Altos 3068.  You must use the GNU assembler, linker and
        !           521:           debugger, with COFF-encapsulation.  Also, you must fix a
        !           522:           kernel bug.  Details in the file `README.ALTOS'.
        !           523: 
        !           524:     `m68k-hp-hpux'
        !           525:           HP 9000 series 300 or 400 running HP-UX.  HP-UX version 8.0
        !           526:           has a bug in the assembler that prevents compilation of GNU
        !           527:           CC.  To fix it, get patch PHCO_0800 from HP.
        !           528: 
        !           529:           In addition, `--gas' does not currently work with this
        !           530:           configuration.  Changes in HP-UX have broken the library
        !           531:           conversion tool and the linker.
        !           532: 
        !           533:     `m68k-sun'
        !           534:           Sun 3.  We do not provide a configuration file to use the Sun
        !           535:           FPA by default, because programs that establish signal
        !           536:           handlers for floating point traps inherently cannot work with
        !           537:           the FPA.
        !           538: 
        !           539:     `m88k-svr3'
        !           540:           Motorola m88k running the AT&T/Unisoft/Motorola V.3 reference
        !           541:           port. These systems tend to use the Green Hills C, revision
        !           542:           1.8.5, as the standard C compiler.  There are apparently bugs
        !           543:           in this compiler that result in object files differences
        !           544:           between stage 2 and stage 3.  If this happens, make the stage
        !           545:           4 compiler and compare it to the stage 3 compiler.  If the
        !           546:           stage 3 and stage 4 object files are identical, this suggests
        !           547:           a problem with the standard C compiler.  It is best, however,
        !           548:           to use an older version of GNU CC for bootstrapping.
        !           549: 
        !           550:     `m88k-dgux'
        !           551:           Motorola m88k running DG/UX.  To build native or cross
        !           552:           compilers on DG/UX, you must first change to the 88open BCS
        !           553:           software development environment.  This is done by issuing
        !           554:           this command:
        !           555: 
        !           556:                eval `sde-target m88kbcs`
        !           557: 
        !           558:     `mips-mips-bsd'
        !           559:           MIPS machines running the MIPS operating system in BSD mode. 
        !           560:           It's possible that some old versions of the system lack the
        !           561:           functions `memcpy', `memcmp', and `memset'.  If your system
        !           562:           lacks these, you must remove or undo the definition of
        !           563:           `TARGET_MEM_FUNCTIONS' in `mips-bsd.h'.
        !           564: 
        !           565:     `mips-sony-sysv'
        !           566:           Sony MIPS NEWS.  This works in NEWSOS 5.0.1, but not in 5.0.2
        !           567:           (which uses ELF instead of COFF).  Support for 5.0.2 will
        !           568:           probably be provided soon by volunteers.
        !           569: 
        !           570:     `ns32k-encore'
        !           571:           Encore ns32000 system.  Encore systems are supported only
        !           572:           under BSD.
        !           573: 
        !           574:     `ns32k-*-genix'
        !           575:           National Semiconductor ns32000 system.  Genix has bugs in
        !           576:           `alloca' and `malloc'; you must get the compiled versions of
        !           577:           these from GNU Emacs.
        !           578: 
        !           579:     `ns32k-sequent'
        !           580:           Go to the Berkeley universe before compiling.  In addition,
        !           581:           you probably need to create a file named `string.h'
        !           582:           containing just one line: `#include <strings.h>'.
        !           583: 
        !           584:     `ns32k-utek'
        !           585:           UTEK ns32000 system ("merlin").  The C compiler that comes
        !           586:           with this system cannot compile GNU CC; contact
        !           587:           `tektronix!reed!mason' to get binaries of GNU CC for
        !           588:           bootstrapping.
        !           589: 
        !           590:     `romp-*-aos'
        !           591:     `romp-*-mach'
        !           592:           The only operating systems supported for the IBM RT PC are
        !           593:           AOS and MACH.  GNU CC does not support AIX running on the RT.
        !           594:            We recommend you compile GNU CC with an earlier version of
        !           595:           itself; if you compile GNU CC with `hc', the Metaware
        !           596:           compiler, it will work, but you will get mismatches between
        !           597:           the stage 2 and stage 3 compilers in various files. These
        !           598:           errors are minor differences in some floating-point constants
        !           599:           and can be safely ignored; the stage 3 compiler is correct.
        !           600: 
        !           601:     `rs6000-*-aix'
        !           602:           *Read the file `README.RS6000' for information on how to get
        !           603:           a fix for a problem in the IBM assembler that prevents use of
        !           604:           GNU CC.* You must either obtain the new assembler or avoid
        !           605:           using the `-g' switch.  Note that `Makefile.in' uses `-g' by
        !           606:           default when compiling `libgcc2.c'.
        !           607: 
        !           608:     `vax-dec-ultrix'
        !           609:           Don't try compiling with Vax C (`vcc').  It produces
        !           610:           incorrect code in some cases (for example, when `alloca' is
        !           611:           used).
        !           612: 
        !           613:           Meanwhile, compiling `cp-parse.c' with pcc does not work
        !           614:           because of an internal table size limitation in that
        !           615:           compiler.  To avoid this problem, compile just the GNU C
        !           616:           compiler first, and use it to recompile building all the
        !           617:           languages that you want to run.
        !           618: 
        !           619:      Here we spell out what files will be set up by `configure'. 
        !           620:      Normally you need not be concerned with these files.
        !           621: 
        !           622:         * A symbolic link named `config.h' is made to the top-level
        !           623:           config file for the machine you will run the compiler on
        !           624:           (*note Config::.). This file is responsible for defining
        !           625:           information about the host machine.  It includes `tm.h'.
        !           626: 
        !           627:           The top-level config file is located in the subdirectory
        !           628:           `config'. Its name is always `xm-SOMETHING.h'; usually
        !           629:           `xm-MACHINE.h', but there are some exceptions.
        !           630: 
        !           631:           If your system does not support symbolic links, you might
        !           632:           want to set up `config.h' to contain a `#include' command
        !           633:           which refers to the appropriate file.
        !           634: 
        !           635:         * A symbolic link named `tconfig.h' is made to the top-level
        !           636:           config file for your target machine.  This is used for
        !           637:           compiling certain programs to run on that machine.
        !           638: 
        !           639:         * A symbolic link named `tm.h' is made to the
        !           640:           machine-description macro file for your target machine.  It
        !           641:           should be in the subdirectory `config' and its name is often
        !           642:           `MACHINE.h'.
        !           643: 
        !           644:         * A symbolic link named `md' will be made to the machine
        !           645:           description pattern file.  It should be in the `config'
        !           646:           subdirectory and its name should be `MACHINE.md'; but MACHINE
        !           647:           is often not the same as the name used in the `tm.h' file
        !           648:           because the `md' files are more general.
        !           649: 
        !           650:         * A symbolic link named `aux-output.c' will be made to the
        !           651:           output subroutine file for your machine.  It should be in the
        !           652:           `config' subdirectory and its name should be `MACHINE.c'.
        !           653: 
        !           654:         * The command file `configure' also constructs `Makefile' by
        !           655:           adding some text to the template file `Makefile.in'.  The
        !           656:           additional text comes from files in the `config' directory,
        !           657:           named `t-TARGET' and `h-HOST'.  If these files do not exist,
        !           658:           it means nothing needs to be added for a given target or host.
        !           659: 
        !           660:   4. Make sure the Bison parser generator is installed.  (This is
        !           661:      unnecessary if the Bison output files `c-parse.c' and `cexp.c' are
        !           662:      more recent than `c-parse.y' and `cexp.y' and you do not plan to
        !           663:      change the `.y' files.)
        !           664: 
        !           665:      Bison versions older than Sept 8, 1988 will produce incorrect
        !           666:      output for `c-parse.c'.
        !           667: 
        !           668:   5. Build the compiler.  Just type `make LANGUAGES=c' in the compiler
        !           669:      directory.
        !           670: 
        !           671:      `LANGUAGES=c' specifies that only the C compiler should be
        !           672:      compiled.  The makefile normally builds compilers for all the
        !           673:      supported languages; currently, C, C++ and Objective C.  However,
        !           674:      C is the only language that is sure to work when you build with
        !           675:      other non-GNU C compilers.  In addition, building anything but C
        !           676:      at this stage is a waste of time.
        !           677: 
        !           678:      In general, you can specify the languages to build by typing the
        !           679:      argument `LANGUAGES="LIST"', where LIST is one or more words from
        !           680:      the list `c', `c++', and `objective-c'.
        !           681: 
        !           682:      Ignore any warnings you may see about "statement not reached" in
        !           683:      `insn-emit.c'; they are normal.  Any other compilation errors may
        !           684:      represent bugs in the port to your machine or operating system, and
        !           685:      should be investigated and reported (*note Bugs::.).
        !           686: 
        !           687:      Some commercial compilers fail to compile GNU CC because they have
        !           688:      bugs or limitations.  For example, the Microsoft compiler is said
        !           689:      to run out of macro space.  Some Ultrix compilers run out of
        !           690:      expression space; then you need to break up the statement where
        !           691:      the problem happens.
        !           692: 
        !           693:      If you are building with a previous GNU C compiler, do not use
        !           694:      `CC=gcc' on the make command or by editing the Makefile. Instead,
        !           695:      use a full pathname to specify the compiler, such as
        !           696:      `CC=/usr/local/bin/gcc'.  This is because make might execute the
        !           697:      `gcc' in the current directory before all of the compiler
        !           698:      components have been built.
        !           699: 
        !           700:   6. If you are using COFF-encapsulation, you must convert `libgcc.a' to
        !           701:      a GNU-format library at this point.  See the file `README.ENCAP'
        !           702:      in the directory containing the GNU binary file utilities, for
        !           703:      directions.
        !           704: 
        !           705:   7. If you are building a cross-compiler, stop here.  *Note
        !           706:      Cross-Compiler::.
        !           707: 
        !           708:   8. Move the first-stage object files and executables into a
        !           709:      subdirectory with this command:
        !           710: 
        !           711:           make stage1
        !           712: 
        !           713:      The files are moved into a subdirectory named `stage1'. Once
        !           714:      installation is complete, you may wish to delete these files with
        !           715:      `rm -r stage1'.
        !           716: 
        !           717:   9. Recompile the compiler with itself, with this command:
        !           718: 
        !           719:           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"
        !           720: 
        !           721:      This is called making the stage 2 compiler.
        !           722: 
        !           723:      The command shown above builds compilers for all the supported
        !           724:      languages.  If you don't want them all, you can specify the
        !           725:      languages to build by typing the argument `LANGUAGES="LIST"'.  LIST
        !           726:      should contain one or more words from the list `c', `c++',
        !           727:      `objective-c', and `proto'.  Separate the words with spaces.
        !           728:      `proto' stands for the programs `protoize' and `unprotoize'; they
        !           729:      are not a separate language, but you use `LANGUAGES' to enable or
        !           730:      disable their installation.
        !           731: 
        !           732:      If you are going to build the stage 3 compiler, then you might
        !           733:      want to build only the C language in stage 2.
        !           734: 
        !           735:      Once you have built the stage 2 compiler, if you are short of disk
        !           736:      space, you can delete the subdirectory `stage1'.
        !           737: 
        !           738:      On a 68000 or 68020 system lacking floating point hardware, unless
        !           739:      you have selected a `tm.h' file that expects by default that there
        !           740:      is no such hardware, do this instead:
        !           741: 
        !           742:           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float"
        !           743: 
        !           744:  10. If you wish to test the compiler by compiling it with itself one
        !           745:      more time, do this:
        !           746: 
        !           747:           make stage2
        !           748:           make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
        !           749: 
        !           750:      This is called making the stage 3 compiler.  Aside from the `-B'
        !           751:      option, the compiler options should be the same as when you made
        !           752:      the stage 2 compiler.  But the `LANGUAGES' option need not be the
        !           753:      same.  The command shown above builds compilers for all the
        !           754:      supported languages; if you don't want them all, you can specify
        !           755:      the languages to build by typing the argument `LANGUAGES="LIST"',
        !           756:      as described above.
        !           757: 
        !           758:      Then compare the latest object files with the stage 2 object
        !           759:      files--they ought to be identical, unless they contain time stamps.
        !           760:      You can compare the files, disregarding the time stamps if any,
        !           761:      like this:
        !           762: 
        !           763:           make compare
        !           764: 
        !           765:      This will mention any object files that differ between stage 2 and
        !           766:      stage 3.  Any difference, no matter how innocuous, indicates that
        !           767:      the stage 2 compiler has compiled GNU CC incorrectly, and is
        !           768:      therefore a potentially serious bug which you should investigate
        !           769:      and report (*note Bugs::.).
        !           770: 
        !           771:      If your system does not put time stamps in the object files, then
        !           772:      this is a faster way to compare them (using the Bourne shell):
        !           773: 
        !           774:           for file in *.o; do
        !           775:           cmp $file stage2/$file
        !           776:           done
        !           777: 
        !           778:      If you have built the compiler with the `-mno-mips-tfile' option on
        !           779:      MIPS machines, you will not be able to compare the files.
        !           780: 
        !           781:  11. Install the compiler driver, the compiler's passes and run-time
        !           782:      support. You can use the following command:
        !           783: 
        !           784:           make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="LIST"
        !           785: 
        !           786:      (Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you
        !           787:      used when compiling the files that are being installed.  One
        !           788:      reason this is necessary is that some versions of Make have bugs
        !           789:      and recompile files gratuitously when you do this step.  If you
        !           790:      use the same variable values, those files will be recompiled
        !           791:      properly.
        !           792: 
        !           793:      This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1',
        !           794:      `cpp' and `libgcc.a' in directory
        !           795:      `/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the
        !           796:      compiler driver program looks for them.  Here TARGET is the target
        !           797:      machine type specified when you ran `configure', and VERSION is
        !           798:      the version number of GNU CC.  This naming scheme permits various
        !           799:      versions and/or cross-compilers to coexist.
        !           800: 
        !           801:      It also copies the driver program `gcc' into the directory
        !           802:      `/usr/local/bin', so that it appears in typical execution search
        !           803:      paths.
        !           804: 
        !           805:      On some systems, this command will cause recompilation of some
        !           806:      files. This is usually due to bugs in `make'.  You should either
        !           807:      ignore this problem, or use GNU Make.
        !           808: 
        !           809:      *Warning: there is a bug in `alloca' in the Sun library.  To avoid
        !           810:      this bug, be sure to install the executables of GNU CC that were
        !           811:      compiled by GNU CC.  (That is, the executables from stage 2 or 3,
        !           812:      not stage 1.)  They use `alloca' as a built-in function and never
        !           813:      the one in the library.*
        !           814: 
        !           815:      (It is usually better to install GNU CC executables from stage 2
        !           816:      or 3, since they usually run faster than the ones compiled with
        !           817:      some other compiler.)
        !           818: 
        !           819:  12. Install the Objective C library (if you have built the Objective C
        !           820:      compiler).  Here is the command to do this:
        !           821: 
        !           822:           make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
        !           823: 
        !           824:  13. Correct errors in the header files on your machine.
        !           825: 
        !           826:      Various system header files often contain constructs which are
        !           827:      erroneous, incompatible with ANSI C or otherwise unsuitable, and
        !           828:      they will not work when you compile programs with GNU CC.
        !           829: 
        !           830:      The most common erroneous construct is found in `ioctl.h', where a
        !           831:      macro expects argument values to be substituted for argument names
        !           832:      inside of character constants--something not done in ANSI C.  This
        !           833:      particular problem can be prevented by using `-traditional'.  Other
        !           834:      problems are not so easy to work around.
        !           835: 
        !           836:      GNU CC comes with shell scripts to fix known header file problems.
        !           837:       They install corrected copies of various header files in a
        !           838:      special directory where only GNU CC will normally look for them. 
        !           839:      The scripts adapt to various systems by searching all the system
        !           840:      header files for the problem cases that we know about.
        !           841: 
        !           842:      Use the following command to do this:
        !           843: 
        !           844:           make install-fixincludes
        !           845: 
        !           846:      If you selected a different directory for GNU CC installation when
        !           847:      you installed it, by specifying the Make variable `prefix' or
        !           848:      `libdir', specify it the same way in this command.
        !           849: 
        !           850:      Note that some systems are starting to come with ANSI C system
        !           851:      header files.  On these systems, don't run `install-fixincludes';
        !           852:      it may not work, and is certainly not necessary.  One exception:
        !           853:      there are is a special script for System V release 4, which you
        !           854:      should run.
        !           855: 
        !           856:      It is not the purpose of `install-fixincludes' to add prototypes to
        !           857:      the system header files.  We support headers with ANSI C
        !           858:      prototypes in the GNU C Library, and we have no time to support
        !           859:      adding them to other systems' header files.
        !           860: 
        !           861:  14. If you're going to use C++, it's likely that you need to also
        !           862:      install the `libg++' distribution.  It should be available from
        !           863:      the same place where you got the GCC distribution.  Just as GCC
        !           864:      does not distribute a C runtime library, it also does not include
        !           865:      a C++ run-time library.  All I/O functionality, special class
        !           866:      libraries, etc., are available in the `libg++' distribution.
        !           867: 
        !           868:    If you cannot install the compiler's passes and run-time support in
        !           869: `/usr/local/lib', you can alternatively use the `-B' option to specify
        !           870: a prefix by which they may be found.  The compiler concatenates the
        !           871: prefix with the names  `cpp', `cc1' and `libgcc.a'. Thus, you can put
        !           872: the files in a directory `/usr/foo/gcc' and specify `-B/usr/foo/gcc/'
        !           873: when you run GNU CC.
        !           874: 
        !           875:    Also, you can specify an alternative default directory for these
        !           876: files by setting the Make variable `libdir' when you make GNU CC.
        !           877: 
        !           878: 
        !           879: File: gcc.info,  Node: Other Dir,  Next: Cross-Compiler,  Up: Installation
        !           880: 
        !           881: Compilation in a Separate Directory
        !           882: ===================================
        !           883: 
        !           884:    If you wish to build the object files and executables in a directory
        !           885: other than the one containing the source files, here is what you must
        !           886: do differently:
        !           887: 
        !           888:   1. Make sure you have a version of Make that supports the `VPATH'
        !           889:      feature.  (GNU Make supports it, as do Make versions on most BSD
        !           890:      systems.)
        !           891: 
        !           892:   2. If you have ever run `configure' in the source directory, you must
        !           893:      undo the configuration.  Do this by running:
        !           894: 
        !           895:           make distclean
        !           896: 
        !           897:   3. Go to the directory in which you want to build the compiler before
        !           898:      running `configure':
        !           899: 
        !           900:           mkdir gcc-sun3
        !           901:           cd gcc-sun3
        !           902: 
        !           903:      On systems that do not support symbolic links, this directory must
        !           904:      be on the same file system as the source code directory.
        !           905: 
        !           906:   4. Specify where to find `configure' when you run it:
        !           907: 
        !           908:           ../gcc/configure ...
        !           909: 
        !           910:      This also tells `configure' where to find the compiler sources;
        !           911:      `configure' takes the directory from the file name that was used to
        !           912:      invoke it.  But if you want to be sure, you can specify the source
        !           913:      directory with the `--srcdir' option, like this:
        !           914: 
        !           915:           ../gcc/configure --srcdir=../gcc sun3
        !           916: 
        !           917:      The directory you specify with `--srcdir' need not be the same as
        !           918:      the one that `configure' is found in.
        !           919: 
        !           920:    Now, you can run `make' in that directory.  You need not repeat the
        !           921: configuration steps shown above, when ordinary source files change.  You
        !           922: must, however, run `configure' again when the configuration files
        !           923: change, if your system does not support symbolic links.
1.1.1.3   root      924: 
                    925: 
                    926: File: gcc.info,  Node: Cross-Compiler,  Next: PA Install,  Prev: Other Dir,  Up: Installation
                    927: 
                    928: Building and Installing a Cross-Compiler
                    929: ========================================
                    930: 
                    931:    GNU CC can function as a cross-compiler for many machines, but not
                    932: all.
                    933: 
                    934:    * Cross-compilers for the Mips as target do not work because the
                    935:      auxiliary programs `mips-tdump.c' and `mips-tfile.c' can't be
                    936:      compiled on anything but a Mips.
                    937: 
                    938:    * Cross-compilers to or from the Vax probably don't work completely
                    939:      because the Vax uses an incompatible floating point format (not
                    940:      IEEE format).
                    941: 
                    942:    Since GNU CC generates assembler code, you probably need a
                    943: cross-assembler that GNU CC can run, in order to produce object files.
                    944: If you want to link on other than the target machine, you need a
                    945: cross-linker as well.  You also need header files and libraries suitable
                    946: for the target machine that you can install on the host machine.
                    947: 
                    948:    To build GNU CC as a cross-compiler, you start out by running
1.1.1.4 ! root      949: `configure'.  You must specify two different configurations, the host
1.1.1.3   root      950: and the target.  Use the `--host=HOST' option for the host and
                    951: `--target=TARGET' to specify the target type.  For example, here is how
                    952: to configure for a cross-compiler that runs on a hypothetical Intel 386
                    953: system and produces code for an HP 68030 system running BSD:
                    954: 
                    955:      configure --target=m68k-hp-bsd4.3 --host=i386-bozotheclone-bsd4.3
                    956: 
                    957:    Next you should install the cross-assembler and cross-linker (and
1.1.1.4 ! root      958: `ar' and `ranlib').  Put them in the directory `/usr/local/TARGET/bin'.
        !           959:  The installation of GNU CC will find them there and copy or link them
1.1.1.3   root      960: to the proper place to find them when you run the cross-compiler later.
                    961: 
                    962:    If you want to install any additional libraries to use with the
                    963: cross-compiler, put them in the directory `/usr/local/TARGET/lib'; all
                    964: files in that subdirectory will be installed in the proper place when
                    965: you install the cross-compiler. Likewise, put the header files for the
                    966: target machine in `/usr/local/TARGET/include'.
                    967: 
1.1.1.4 ! root      968:    You must now produce a substitute for `libgcc1.a'.  Normally this
        !           969: file is compiled with the "native compiler" for the target machine;
        !           970: compiling it with GNU CC does not work.  But compiling it with the host
        !           971: machine's compiler also doesn't work--that produces a file that would
        !           972: run on the host, and you need it to run on the target.
1.1.1.3   root      973: 
                    974:    We can't give you any automatic way to produce this substitute.  For
                    975: some targets, the subroutines in `libgcc1.c' are not actually used. You
                    976: need not provide the ones that won't be used.  The ones that most
                    977: commonly are used are the multiplication, division and remainder
                    978: routines--many RISC machines rely on the library for this.  One way to
                    979: make them work is to define the appropriate `perform_...' macros for
                    980: the subroutines that you need.  If these definitions do not use the C
                    981: arithmetic operators that they are meant to implement, you might be
1.1.1.4 ! root      982: able to compile them with the cross-compiler you are building. To do
        !           983: this, specify `LIBGCC1=libgcc1.a OLDCC=./xgcc' when building the
        !           984: compiler.
        !           985: 
        !           986:    Now you can proceed just as for compiling a single-machine compiler
        !           987: through the step of building stage 1.  If you have not provided some
        !           988: sort of `libgcc1.a', then compilation will give up at the point where
        !           989: it needs that file, printing a suitable error message.  If you do
        !           990: provide `libgcc1.a', then building the compiler will automatically
        !           991: compile and link a test program called `cross-test'; if you get errors
        !           992: in the linking, it means that not all of the necessary routines in
        !           993: `libgcc1.a' are available.
        !           994: 
        !           995:    When you are using a cross-compiler configuration, building stage 1
        !           996: does not compile all of GNU CC.  This is because one part of building,
        !           997: the compilation of `libgcc2.c', requires use of the cross-compiler.
        !           998: 
        !           999:    However, when you type `make install' to install the bulk of the
        !          1000: cross-compiler, that will also compile `libgcc2.c' and install the
        !          1001: resulting `libgcc.a'.
1.1.1.3   root     1002: 
                   1003:    Do not try to build stage 2 for a cross-compiler.  It doesn't work to
                   1004: rebuild GNU CC as a cross-compiler using the cross-compiler, because
                   1005: that would produce a program that runs on the target machine, not on the
                   1006: host.  For example, if you compile a 386-to-68030 cross-compiler with
                   1007: itself, the result will not be right either for the 386 (because it was
                   1008: compiled into 68030 code) or for the 68030 (because it was configured
                   1009: for a 386 as the host).  If you want to compile GNU CC into 68030 code,
                   1010: whether you compile it on a 68030 or with a cross-compiler on a 386, you
                   1011: must specify a 68030 as the host when you configure it.
                   1012: 
                   1013: 
                   1014: File: gcc.info,  Node: PA Install,  Next: Sun Install,  Prev: Cross-Compiler,  Up: Installation
                   1015: 
                   1016: Installing GNU CC on the HP Precision Architecture
                   1017: ==================================================
                   1018: 
                   1019:    There are two variants of this CPU, called 1.0 and 1.1, which have
                   1020: different machine descriptions.  You must use the right one for your
                   1021: machine.  All 7NN machines and 8N7 machines use 1.1, while all other
                   1022: 8NN machines use 1.0.
                   1023: 
                   1024:    The easiest way to handle this problem is to use `configure hpNNN'
                   1025: or `configure hpNNN-hpux', where NNN is the model number of the
                   1026: machine.  Then `configure' will figure out if the machine is a 1.0 or
                   1027: 1.1.  Use `uname -a' to find out the model number of your machine.
                   1028: 
                   1029:    `-g' does not work on HP-UX, since that system uses a peculiar
1.1.1.4 ! root     1030: debugging format which GNU CC does not know about.  There are
        !          1031: preliminary versions of GAS and GDB for the HP-PA which do work with
        !          1032: GNU CC for debugging.  You can get them by anonymous ftp from
        !          1033: `jaguar.cs.utah.edu' `dist' subdirectory.  You would need to install
        !          1034: GAS in the file
1.1.1.3   root     1035: 
                   1036:      /usr/local/lib/gcc-lib/CONFIGURATION/GCCVERSION/as
                   1037: 
                   1038: where CONFIGURATION is the configuration name (perhaps `hpNNN-hpux')
1.1.1.4 ! root     1039: and GCCVERSION is the GNU CC version number.  Do this *before* starting
        !          1040: the build process, otherwise you will get errors from the HPUX
        !          1041: assembler while building `libgcc2.a'.  The command
        !          1042: 
        !          1043:      make install-dir
1.1.1.3   root     1044: 
1.1.1.4 ! root     1045: will create the necessary directory hierarchy so you can install GAS
        !          1046: before building GCC.
1.1.1.3   root     1047: 
1.1.1.4 ! root     1048:    If you obtained GAS before October 6, 1992 it is highly recommended
        !          1049: you get a new one to avoid several bugs which have been discovered
        !          1050: recently.
1.1.1.3   root     1051: 
1.1.1.4 ! root     1052:    To enable debugging, configure GNU CC with the `--gas' option before
        !          1053: building.
1.1.1.3   root     1054: 
                   1055: 
                   1056: File: gcc.info,  Node: Sun Install,  Next: 3b1 Install,  Prev: PA Install,  Up: Installation
                   1057: 
                   1058: Installing GNU CC on the Sun
                   1059: ============================
                   1060: 
                   1061:    Make sure the environment variable `FLOAT_OPTION' is not set when
                   1062: you compile `libgcc.a'.  If this option were set to `f68881' when
                   1063: `libgcc.a' is compiled, the resulting code would demand to be linked
                   1064: with a special startup file and would not link properly without special
                   1065: pains.
                   1066: 
                   1067:    There is a bug in `alloca' in certain versions of the Sun library.
                   1068: To avoid this bug, install the binaries of GNU CC that were compiled by
                   1069: GNU CC.  They use `alloca' as a built-in function and never the one in
                   1070: the library.
                   1071: 
                   1072:    Some versions of the Sun compiler crash when compiling GNU CC.  The
                   1073: problem is a segmentation fault in cpp.  This problem seems to be due to
                   1074: the bulk of data in the environment variables.  You may be able to avoid
                   1075: it by using the following command to compile GNU CC with Sun CC:
                   1076: 
                   1077:      make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
                   1078: 
                   1079: 
                   1080: File: gcc.info,  Node: 3b1 Install,  Next: Unos Install,  Prev: Sun Install,  Up: Installation
                   1081: 
                   1082: Installing GNU CC on the 3b1
                   1083: ============================
                   1084: 
                   1085:    Installing GNU CC on the 3b1 is difficult if you do not already have
                   1086: GNU CC running, due to bugs in the installed C compiler.  However, the
                   1087: following procedure might work.  We are unable to test it.
                   1088: 
                   1089:   1. Comment out the `#include "config.h"' line on line 37 of `cccp.c'
                   1090:      and do `make cpp'.  This makes a preliminary version of GNU cpp.
                   1091: 
                   1092:   2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that
                   1093:      file name.
                   1094: 
                   1095:   3. Undo your change in `cccp.c', or reinstall the original version,
                   1096:      and do `make cpp' again.
                   1097: 
                   1098:   4. Copy this final version of GNU cpp into `/lib/cpp'.
                   1099: 
                   1100:   5. Replace every occurrence of `obstack_free' in the file `tree.c'
                   1101:      with `_obstack_free'.
                   1102: 
                   1103:   6. Run `make' to get the first-stage GNU CC.
                   1104: 
                   1105:   7. Reinstall the original version of `/lib/cpp'.
                   1106: 
                   1107:   8. Now you can compile GNU CC with itself and install it in the normal
                   1108:      fashion.
1.1       root     1109: 
                   1110: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.