Annotation of gcc/INSTALL, revision 1.1.1.9

1.1.1.6   root        1: This is a copy of one node from the Info file gcc.info-1.
1.1       root        2: For full information on installing and porting GCC, refer to the
1.1.1.6   root        3: GCC manual:
1.1       root        4: 
1.1.1.6   root        5:   Info file   gcc.info
                      6:   TeX output  gcc.dvi
                      7:   TeX source  gcc.texinfo
                      8: 
1.1       root        9: Installing GNU CC
                     10: *****************
                     11: 
                     12: Here is the procedure for installing GNU CC on a Unix system.
                     13: 
                     14: * Menu:
                     15: 
                     16: * VMS Install::   See below for installation on VMS.
                     17: 
1.1.1.4   root       18:   1. Edit `Makefile'.  If you are using HPUX, or any form of system
                     19:      V, you must make a few changes described in comments at the
1.1.1.8   root       20:      beginning of the file.  Genix requires changes also.
1.1.1.2   root       21: 
                     22:   2. On a Sequent system, go to the Berkeley universe.
1.1       root       23: 
1.1.1.7   root       24:   3. Choose configuration files.  The easy way to do this is to run
                     25:      the command file `config.gcc' with a single argument, which is
1.1.1.8   root       26:      the name of the machine (and operating system, in some cases).
1.1.1.7   root       27: 
1.1.1.8   root       28:      Here is a list of the possible arguments:
                     29: 
                     30:     `vax'
                     31:           Vaxes running BSD.
                     32: 
                     33:     `vms'
                     34:           Vaxes running VMS.
                     35: 
                     36:     `vax-sysv'
                     37:           Vaxes running system V.
                     38: 
                     39:     `i386-sysv'
                     40:           Intel 386 PCs running system V.
                     41: 
1.1.1.9 ! root       42:     `i386-sysv-gas'
        !            43:           Intel 386 PCs running system V, using the GNU assembler and
        !            44:           GNU linker.
        !            45: 
1.1.1.8   root       46:     `sequent-386'
                     47:           Sequent with Intel 386 processors.
                     48: 
                     49:     `sun2'
                     50:           Sun 2 running system version 2 or 3.
                     51: 
                     52:     `sun3'
1.1.1.9 ! root       53:           Sun 3 running system version 2 or 3, with 68881.
        !            54: 
        !            55:     `sun3-nfp'
        !            56:           Sun 3 running system version 2 or 3, without 68881.
        !            57: 
        !            58:     `sun3-fpa'
        !            59:           Sun 3 running system version 2 or 3, with 68881 and fpa.
1.1.1.8   root       60: 
                     61:     `sun4'
                     62:           Sun 4 running system version 2 or 3.
                     63: 
                     64:     `sun2-os4'
                     65:           Sun 2 running system version 4.
                     66: 
                     67:     `sun3-os4'
1.1.1.9 ! root       68:           Sun 3 running system version 4, with 68881.
        !            69: 
        !            70:     `sun3-nfp-os4'
        !            71:           Sun 3 running system version 4, without 68881.
        !            72: 
        !            73:     `sun3-fpa-os4'
        !            74:           Sun 3 running system version 4, with 68881 and fpa.
1.1.1.8   root       75: 
                     76:     `sun4-os4'
                     77:           Sun 4 running system version 4.
                     78: 
                     79:     `sun386'
                     80:           Sun 386 (``roadrunner'').
                     81: 
1.1.1.9 ! root       82:     `alliant'
        !            83:           Alliant FX/8 computer.  Currently, there are bugs in the
        !            84:           support for floating point.  Also note that Alliant's
        !            85:           version of dbx does not manage to work with the output from
        !            86:           GNU CC.
        !            87: 
        !            88:     `convex-c1'
        !            89:           Convex C1 computer.
        !            90: 
        !            91:     `convex-c2'
        !            92:           Convex C2 computer.
        !            93: 
1.1.1.8   root       94:     `hp9k320'
                     95:           HP 9000 series 300 using HPUX assembler.
                     96: 
                     97:     `kp9k320g'
                     98:           HP 9000 series 300 using GNU assembler, linker and debugger.
                     99:           This requires the HP-adapt package which is or will soon be
1.1.1.9 ! root      100:           available along with the linker.
1.1.1.8   root      101: 
                    102:     `isi68'
                    103:           ISI 68000 or 68020 system.
                    104: 
                    105:     `news800'
                    106:           Sony NEWS 68020 system.
                    107: 
                    108:     `3b1'
                    109:           AT&T 3b1, a.k.a. 7300 PC.
                    110: 
                    111:     `sequent-ns32k'
                    112:           Sequent containing ns32000 processors.
                    113: 
                    114:     `encore'
                    115:           Encore ns32000 system.
                    116: 
                    117:     `genix'
                    118:           National Semiconductor ns32000 system.
                    119: 
                    120:     `88000'
                    121:           Motorola 88000 processor.  This port is not finished.
                    122: 
                    123:      Here we spell out what files need to be set up:
1.1       root      124: 
1.1.1.4   root      125:         * Make a symbolic link named `config.h' to the top-level
                    126:           config file for the machine you are using (*note
                    127:           Config::.).  This file is responsible for defining
                    128:           information about the host machine.  It includes `tm.h'.
                    129: 
1.1.1.8   root      130:           The file's name should be `xm-MACHINE.h', with these
1.1.1.4   root      131:           exceptions:
                    132: 
1.1.1.8   root      133:          `xm-vms.h'
1.1.1.4   root      134:                for vaxen running VMS.
                    135: 
1.1.1.8   root      136:          `xm-vaxv.h'
1.1.1.4   root      137:                for vaxen running system V.
                    138: 
1.1.1.8   root      139:          `xm-i386v.h'
1.1.1.4   root      140:                for Intel 80386's running system V.
                    141: 
1.1.1.8   root      142:          `xm-sunos4.h'
1.1.1.5   root      143:                for Suns (model 2, 3 or 4) running *operating system*
1.1.1.8   root      144:                version 4.  (Use `xm-m68k.h' or `xm-sparc.h' for
                    145:                version 3.)
1.1.1.4   root      146: 
1.1.1.8   root      147:          `xm-sun386i.h'
                    148:                for Sun roadrunner running any version of the
                    149:                operating system.
                    150: 
                    151:          `xm-hp9k320.h'
1.1.1.4   root      152:                for the HP 9000 series 300.
                    153: 
1.1.1.8   root      154:          `xm-genix.h'
1.1.1.4   root      155:                for the ns32000 running Genix
                    156: 
                    157:           If your system does not support symbolic links, you might
                    158:           want to set up `config.h' to contain a `#include' command
                    159:           which refers to the appropriate file.
                    160: 
                    161:         * Make a symbolic link named `tm.h' to the
                    162:           machine-description macro file for your machine (its name
                    163:           should be `tm-MACHINE.h').
                    164: 
                    165:           If your system is a 68000, don't use the file `tm-m68k.h'
                    166:           directly.  Instead, use one of these files:
                    167: 
                    168:          `tm-sun3.h'
1.1.1.9 ! root      169:                for Sun 3 machines with 68881.
        !           170: 
        !           171:          `tm-sun3-fpa.h'
        !           172:                for Sun 3 machines with floating point accelerator.
        !           173: 
        !           174:          `tm-sun3-nfp.h'
        !           175:                for Sun 3 machines with no hardware floating point.
1.1.1.4   root      176: 
                    177:          `tm-sun2.h'
                    178:                for Sun 2 machines.
                    179: 
                    180:          `tm-3b1.h'
                    181:                for AT&T 3b1 (aka 7300 Unix PC).
                    182: 
                    183:          `tm-isi68.h'
1.1.1.8   root      184:                for Integrated Solutions systems.  This file assumes
                    185:                you use the GNU assembler.
1.1.1.4   root      186: 
                    187:          `tm-news800.h'
                    188:                for SONY News systems.
                    189: 
                    190:          `tm-hp9k320.h'
                    191:                for HPUX systems, if you are using GNU CC with the
                    192:                system's assembler and linker.
                    193: 
                    194:          `tm-hp9k320g.h'
                    195:                for HPUX systems, if you are using the GNU assembler,
                    196:                linker and other utilities.  Not all of the pieces of
                    197:                GNU software needed for this mode of operation are as
                    198:                yet in distribution; full instructions will appear
                    199:                here in the future.
                    200: 
                    201:           For the vax, use `tm-vax.h' on BSD Unix, `tm-vaxv.h' on
                    202:           system V, or `tm-vms.h' on VMS.
                    203: 
                    204:           For the Motorola 88000, use `tm-m88k.h'.  The support for
                    205:           the 88000 has a few unfinished spots because there was no
                    206:           way to run the output.  Bugs are suspected in handling of
                    207:           branch-tables and in the function prologue and epilogue.
                    208: 
                    209:           For the 80386, don't use `tm-i386.h' directly.  Use
                    210:           `tm-i386v.h' if the target machine is running system V,
1.1.1.9 ! root      211:           `tm-i386gas.h' if it is running system V but you are using
        !           212:           the GNU assembler and linker, `tm-seq386.h' for a Sequent
        !           213:           386 system, or `tm-compaq.h' for a Compaq, or
        !           214:           `tm-sun386i.h' for a Sun 386 system.
1.1.1.4   root      215: 
                    216:           For the 32000, use `tm-sequent.h' if you are using a
                    217:           Sequent machine, or `tm-encore.h' for an Encore machine, or
1.1.1.8   root      218:           `tm-genix.h' if you are using Genix version 3; otherwise,
1.1.1.4   root      219:           perhaps `tm-ns32k.h' will work for you.
                    220: 
                    221:           Note that Genix has bugs in `alloca' and `malloc'; you must
                    222:           get the compiled versions of these from GNU Emacs and edit
                    223:           GNU CC's `Makefile' to use them.
1.1       root      224: 
1.1.1.2   root      225:           Note that Encore systems are supported only under BSD.
1.1       root      226: 
                    227:         * Make a symbolic link named `md' to the machine description
1.1.1.7   root      228:           pattern file.  Its name should be `MACHINE.md', but MACHINE
                    229:           is often not the same as the name used in the `tm.h' file
                    230:           because the `md' files are more general.
1.1       root      231: 
                    232:         * Make a symbolic link named `aux-output.c' to the output
                    233:           subroutine file for your machine (its name should be
1.1.1.4   root      234:           `output-MACHINE.c').
1.1       root      235: 
1.1.1.4   root      236:   4. Make sure the Bison parser generator is installed.  (This is
                    237:      unnecessary if the Bison output files `c-parse.tab.c' and
                    238:      `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you
                    239:      do not plan to change the `.y' files.)
                    240: 
1.1.1.5   root      241:      Bison versions older that Sept 8, 1988 will produce incorrect
                    242:      output for `c-parse.tab.c'.
1.1       root      243: 
1.1.1.2   root      244:   5. If you are using a Sun, make sure the environment variable
1.1.1.4   root      245:      `FLOAT_OPTION' is not set.  If this option were set to `f68881'
                    246:      when `gnulib' is compiled, the resulting code would demand to be
                    247:      linked with a special startup file and will not link properly
                    248:      without special pains.
1.1       root      249: 
1.1.1.2   root      250:   6. Build the compiler.  Just type `make' in the compiler directory.
1.1       root      251: 
1.1.1.7   root      252:      Ignore any warnings you may see about ``statement not reached''
                    253:      in the `insn-emit.c'; they are normal.  Any other compilation
                    254:      errors may represent bugs in the port to your machine or
                    255:      operating system, and should be investigated and reported (*note
                    256:      Bugs::.).
                    257: 
1.1.1.9 ! root      258:   7. If you are using COFF-encapsulation, you must convert `gnulib'
        !           259:      to a GNU-format library at this point.  See the file
        !           260:      `README-ENCAP' in the directory containing the GNU binary file
        !           261:      utilities, for directions.
        !           262: 
        !           263:   8. Move the first-stage object files and executables into a
1.1.1.4   root      264:      subdirectory with this command:
1.1       root      265: 
                    266:           make stage1
                    267: 
                    268:      The files are moved into a subdirectory named `stage1'.  Once
1.1.1.4   root      269:      installation is complete, you may wish to delete these files
                    270:      with `rm -r stage1'.
1.1       root      271: 
1.1.1.9 ! root      272:   9. Recompile the compiler with itself, with this command:
1.1       root      273: 
                    274:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"
                    275: 
1.1.1.4   root      276:      On a 68000 or 68020 system lacking floating point hardware,
                    277:      unless you have selected a `tm.h' file that expects by default
                    278:      that there is no such hardware, do this instead:
1.1       root      279: 
                    280:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float"
                    281: 
1.1.1.9 ! root      282:  10. If you wish to test the compiler by compiling it with itself one
1.1.1.4   root      283:      more time, do this:
1.1       root      284: 
                    285:           make stage2
1.1.1.6   root      286:           make CC=stage2/gcc CFLAGS="-g -O -Bstage2/"
1.1       root      287:           foreach file (*.o)
                    288:           cmp $file stage2/$file
                    289:           end
                    290: 
1.1.1.4   root      291:      This will notify you if any of these stage 3 object files
                    292:      differs from those of stage 2.  Any difference, no matter how
                    293:      innocuous, indicates that the stage 2 compiler has compiled GNU
                    294:      CC incorrectly, and is therefore a potentially serious bug which
                    295:      you should investigate and report (*note Bugs::.).
1.1       root      296: 
1.1.1.4   root      297:      Aside from the `-B' option, the options should be the same as
                    298:      when you made stage 2.
                    299: 
1.1.1.9 ! root      300:  11. Install the compiler driver, the compiler's passes and run-time
1.1.1.4   root      301:      support.  You can use the following command:
1.1       root      302: 
                    303:           make install
                    304: 
1.1.1.4   root      305:      This copies the files `cc1', `cpp' and `gnulib' to files
                    306:      `gcc-cc1', `gcc-cpp' and `gcc-gnulib' in directory
                    307:      `/usr/local/lib', which is where the compiler driver program
                    308:      looks for them.  It also copies the driver program `gcc' into
                    309:      the directory `/usr/local', so that it appears in typical
                    310:      execution search paths.
                    311: 
                    312:      *Warning: there is a bug in `alloca' in the Sun library.  To
                    313:      avoid this bug, install the binaries of GNU CC that were
                    314:      compiled by GNU CC.  They use `alloca' as a built-in function
                    315:      and never the one in the library.*
                    316: 
                    317:      *Warning: the GNU CPP may not work for `ioctl.h', `ttychars.h'
                    318:      and other system header files unless the `-traditional' option
                    319:      is used.*  The bug is in the header files: at least on some
                    320:      machines, they rely on behavior that is incompatible with ANSI
                    321:      C.  This behavior consists of substituting for macro argument
                    322:      names when they appear inside of character constants.  The
                    323:      `-traditional' option tells GNU CC to behave the way these
                    324:      headers expect.
1.1       root      325: 
1.1.1.4   root      326:      Because of this problem, you might prefer to configure GNU CC to
                    327:      use the system's own C preprocessor.  To do so, make the file
1.1       root      328:      `/usr/local/lib/gcc-cpp' a link to `/lib/cpp'.
                    329: 
1.1.1.4   root      330:      Alternatively, on Sun systems and 4.3BSD at least, you can
                    331:      correct the include files by running the shell script
                    332:      `fixincludes'.  This installs modified, corrected copies of the
                    333:      files `ioctl.h', `ttychars.h' and many others, in a special
1.1.1.7   root      334:      directory where only GNU CC will normally look for them.  This
                    335:      script will work on various systems because it choose the files
                    336:      by searching all the system headers for the problem cases that
                    337:      we know about.
1.1       root      338: 
                    339: If you cannot install the compiler's passes and run-time support in
1.1.1.4   root      340: `/usr/local/lib', you can alternatively use the `-B' option to
                    341: specify a prefix by which they may be found.  The compiler
                    342: concatenates the prefix with the names  `cpp', `cc1' and `gnulib'. 
                    343: Thus, you can put the files in a directory `/usr/foo/gcc' and specify
                    344: `-B/usr/foo/gcc/' when you run GNU CC.
                    345: 
                    346: Also, you can specify an alternative default directory for these
                    347: files by setting the Make variable `libdir' when you make GNU CC.
1.1       root      348: 
1.1.1.2   root      349: 
1.1.1.9 ! root      350: 
1.1.1.6   root      351: File: gcc.info,  Node: VMS Install,  Prev: Installation,  Up: Installation
1.1.1.2   root      352: 
1.1       root      353: Installing GNU CC on VMS
                    354: ========================
                    355: 
1.1.1.8   root      356: The VMS version of GNU CC is distributed in a backup saveset
                    357: containing both source code and precompiled binaries.
                    358: 
                    359: Sometimes the binaries will be from an older version that the
                    360: sources, because we don't always have time to update them.  In this
                    361: case, you should use the binaries you get to recompile the sources. 
1.1.1.4   root      362: If you must recompile, here is how:
                    363: 
1.1.1.8   root      364:   1. Copy the file `tm-vms.h' to `tm.h', `xm-vms.h' to `config.h',
                    365:      `vax.md' to `md.' and `output-vax.c' to `aux-output.c'.
1.1       root      366: 
                    367:   2. Type `@make' to do recompile everything.
1.1.1.2   root      368: 
1.1.1.9 ! root      369:      If you are compiling with a version of GCC older than 1.33,
        !           370:      specify `/DEFINE=("inline=")' as an option in all the
        !           371:      compilations.  This requires editing all the `gcc' commands in
        !           372:      `make-cc1.com'.  (The older versions had problems supporting
        !           373:      `inline'.)  Once you have a working 1.33 or newer GCC, you can
        !           374:      change this file back.
        !           375: 
1.1.1.4   root      376: To install the `GCC' command so you can use the compiler easily, in
                    377: the same manner as you use the VMS C compiler, you must install the
                    378: VMS CLD file for GNU CC as follows:
                    379: 
                    380:   1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to
                    381:      point to the directories where the GNU CC executables
                    382:      (`gcc-cpp', `gcc-cc1', etc.) and the C include files are kept. 
                    383:      This should be done with the commands:
1.1.1.2   root      384: 
                    385:           $ assign /super /system disk:[gcc] gnu_cc
                    386:           $ assign /super /system disk:[gcc.include] gnu_cc_include
                    387: 
1.1.1.4   root      388:      with the appropriate disk and directory names.  These commands
                    389:      can be placed in your system startup file so they will be
                    390:      executed whenever the machine is rebooted.
1.1.1.2   root      391: 
                    392:   2. Install the `GCC' command with the command line:
                    393: 
                    394:           $ set command /table=sys$library:dcltables gnu_cc:gcc
                    395: 
1.1.1.4   root      396:      Now you can invoke the compiler with a command like `gcc
                    397:      /verbose file.c', which is equivalent to the command `gcc -v -c
                    398:      file.c' in Unix.
1.1.1.9 ! root      399: 
        !           400: There is a known problem on VMS: `const' global variables don't work
        !           401: compatibly with the VMS C compiler; we don't know a way to get them
        !           402: to the linker properly.

unix.superglobalmegacorp.com

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