Annotation of gcc/INSTALL, revision 1.1.1.6

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: 
        !             9: File: gcc.info,  Node: Installation,  Next: Trouble,  Prev: Options,  Up: Top
1.1       root       10: 
                     11: Installing GNU CC
                     12: *****************
                     13: 
                     14: Here is the procedure for installing GNU CC on a Unix system.
                     15: 
                     16: * Menu:
                     17: 
                     18: * VMS Install::   See below for installation on VMS.
                     19: 
1.1.1.4   root       20:   1. Edit `Makefile'.  If you are using HPUX, or any form of system
                     21:      V, you must make a few changes described in comments at the
                     22:      beginning of the file.
1.1.1.2   root       23: 
                     24:   2. On a Sequent system, go to the Berkeley universe.
1.1       root       25: 
1.1.1.2   root       26:   3. Choose configuration files.
1.1       root       27: 
1.1.1.4   root       28:         * Make a symbolic link named `config.h' to the top-level
                     29:           config file for the machine you are using (*note
                     30:           Config::.).  This file is responsible for defining
                     31:           information about the host machine.  It includes `tm.h'.
                     32: 
                     33:           The file's name should be `config-MACHINE.h', with these
                     34:           exceptions:
                     35: 
                     36:          `config-vms.h'
                     37:                for vaxen running VMS.
                     38: 
                     39:          `config-vaxv.h'
                     40:                for vaxen running system V.
                     41: 
                     42:          `config-i386v.h'
                     43:                for Intel 80386's running system V.
                     44: 
                     45:          `config-sun4.h'
1.1.1.5   root       46:                for Suns (model 2, 3 or 4) running *operating system*
1.1.1.4   root       47:                version 4.
                     48: 
                     49:          `config-hp9k3.h'
                     50:                for the HP 9000 series 300.
                     51: 
                     52:          `config-gnx.h'
                     53:                for the ns32000 running Genix
                     54: 
                     55:           If your system does not support symbolic links, you might
                     56:           want to set up `config.h' to contain a `#include' command
                     57:           which refers to the appropriate file.
                     58: 
                     59:         * Make a symbolic link named `tm.h' to the
                     60:           machine-description macro file for your machine (its name
                     61:           should be `tm-MACHINE.h').
                     62: 
                     63:           If your system is a 68000, don't use the file `tm-m68k.h'
                     64:           directly.  Instead, use one of these files:
                     65: 
                     66:          `tm-sun3.h'
                     67:                for Sun 3 machines.
                     68: 
                     69:          `tm-sun2.h'
                     70:                for Sun 2 machines.
                     71: 
                     72:          `tm-3b1.h'
                     73:                for AT&T 3b1 (aka 7300 Unix PC).
                     74: 
                     75:          `tm-isi68.h'
                     76:                for Integrated Solutions systems.
                     77: 
                     78:          `tm-news800.h'
                     79:                for SONY News systems.
                     80: 
                     81:          `tm-hp9k320.h'
                     82:                for HPUX systems, if you are using GNU CC with the
                     83:                system's assembler and linker.
                     84: 
                     85:          `tm-hp9k320g.h'
                     86:                for HPUX systems, if you are using the GNU assembler,
                     87:                linker and other utilities.  Not all of the pieces of
                     88:                GNU software needed for this mode of operation are as
                     89:                yet in distribution; full instructions will appear
                     90:                here in the future.
                     91: 
                     92:           For the vax, use `tm-vax.h' on BSD Unix, `tm-vaxv.h' on
                     93:           system V, or `tm-vms.h' on VMS.
                     94: 
                     95:           For the SPARC (Sun 4), use `tm-sparc.h'.
                     96: 
                     97:           For the Motorola 88000, use `tm-m88k.h'.  The support for
                     98:           the 88000 has a few unfinished spots because there was no
                     99:           way to run the output.  Bugs are suspected in handling of
                    100:           branch-tables and in the function prologue and epilogue.
                    101: 
                    102:           For the 80386, don't use `tm-i386.h' directly.  Use
                    103:           `tm-i386v.h' if the target machine is running system V,
                    104:           `tm-seq386.h' for a Sequent 386 system, or `tm-compaq.h'
                    105:           for a Compaq.
                    106: 
                    107:           For the 32000, use `tm-sequent.h' if you are using a
                    108:           Sequent machine, or `tm-encore.h' for an Encore machine, or
                    109:           `tm-gnx.h' if you are using Genix version 3; otherwise,
                    110:           perhaps `tm-ns32k.h' will work for you.
                    111: 
                    112:           Note that Genix has bugs in `alloca' and `malloc'; you must
                    113:           get the compiled versions of these from GNU Emacs and edit
                    114:           GNU CC's `Makefile' to use them.
1.1       root      115: 
1.1.1.2   root      116:           Note that Encore systems are supported only under BSD.
1.1       root      117: 
                    118:         * Make a symbolic link named `md' to the machine description
                    119:           pattern file (its name should be `MACHINE.md').
                    120: 
                    121:         * Make a symbolic link named `aux-output.c' to the output
                    122:           subroutine file for your machine (its name should be
1.1.1.4   root      123:           `output-MACHINE.c').
1.1       root      124: 
1.1.1.4   root      125:   4. Make sure the Bison parser generator is installed.  (This is
                    126:      unnecessary if the Bison output files `c-parse.tab.c' and
                    127:      `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you
                    128:      do not plan to change the `.y' files.)
                    129: 
1.1.1.5   root      130:      Bison versions older that Sept 8, 1988 will produce incorrect
                    131:      output for `c-parse.tab.c'.
1.1       root      132: 
1.1.1.2   root      133:   5. If you are using a Sun, make sure the environment variable
1.1.1.4   root      134:      `FLOAT_OPTION' is not set.  If this option were set to `f68881'
                    135:      when `gnulib' is compiled, the resulting code would demand to be
                    136:      linked with a special startup file and will not link properly
                    137:      without special pains.
1.1       root      138: 
1.1.1.2   root      139:   6. Build the compiler.  Just type `make' in the compiler directory.
1.1       root      140: 
1.1.1.4   root      141:   7. Move the first-stage object files and executables into a
                    142:      subdirectory with this command:
1.1       root      143: 
                    144:           make stage1
                    145: 
                    146:      The files are moved into a subdirectory named `stage1'.  Once
1.1.1.4   root      147:      installation is complete, you may wish to delete these files
                    148:      with `rm -r stage1'.
1.1       root      149: 
1.1.1.2   root      150:   8. Recompile the compiler with itself, with this command:
1.1       root      151: 
                    152:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"
                    153: 
1.1.1.4   root      154:      On a 68000 or 68020 system lacking floating point hardware,
                    155:      unless you have selected a `tm.h' file that expects by default
                    156:      that there is no such hardware, do this instead:
1.1       root      157: 
                    158:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float"
                    159: 
1.1.1.4   root      160:   9. If you wish to test the compiler by compiling it with itself one
                    161:      more time, do this:
1.1       root      162: 
                    163:           make stage2
1.1.1.6 ! root      164:           make CC=stage2/gcc CFLAGS="-g -O -Bstage2/"
1.1       root      165:           foreach file (*.o)
                    166:           cmp $file stage2/$file
                    167:           end
                    168: 
1.1.1.4   root      169:      This will notify you if any of these stage 3 object files
                    170:      differs from those of stage 2.  Any difference, no matter how
                    171:      innocuous, indicates that the stage 2 compiler has compiled GNU
                    172:      CC incorrectly, and is therefore a potentially serious bug which
                    173:      you should investigate and report (*note Bugs::.).
1.1       root      174: 
1.1.1.4   root      175:      Aside from the `-B' option, the options should be the same as
                    176:      when you made stage 2.
                    177: 
                    178:  10. Install the compiler driver, the compiler's passes and run-time
                    179:      support.  You can use the following command:
1.1       root      180: 
                    181:           make install
                    182: 
1.1.1.4   root      183:      This copies the files `cc1', `cpp' and `gnulib' to files
                    184:      `gcc-cc1', `gcc-cpp' and `gcc-gnulib' in directory
                    185:      `/usr/local/lib', which is where the compiler driver program
                    186:      looks for them.  It also copies the driver program `gcc' into
                    187:      the directory `/usr/local', so that it appears in typical
                    188:      execution search paths.
                    189: 
                    190:      *Warning: there is a bug in `alloca' in the Sun library.  To
                    191:      avoid this bug, install the binaries of GNU CC that were
                    192:      compiled by GNU CC.  They use `alloca' as a built-in function
                    193:      and never the one in the library.*
                    194: 
                    195:      *Warning: the GNU CPP may not work for `ioctl.h', `ttychars.h'
                    196:      and other system header files unless the `-traditional' option
                    197:      is used.*  The bug is in the header files: at least on some
                    198:      machines, they rely on behavior that is incompatible with ANSI
                    199:      C.  This behavior consists of substituting for macro argument
                    200:      names when they appear inside of character constants.  The
                    201:      `-traditional' option tells GNU CC to behave the way these
                    202:      headers expect.
1.1       root      203: 
1.1.1.4   root      204:      Because of this problem, you might prefer to configure GNU CC to
                    205:      use the system's own C preprocessor.  To do so, make the file
1.1       root      206:      `/usr/local/lib/gcc-cpp' a link to `/lib/cpp'.
                    207: 
1.1.1.4   root      208:      Alternatively, on Sun systems and 4.3BSD at least, you can
                    209:      correct the include files by running the shell script
                    210:      `fixincludes'.  This installs modified, corrected copies of the
                    211:      files `ioctl.h', `ttychars.h' and many others, in a special
                    212:      directory where only GNU CC will normally look for them.
1.1       root      213: 
1.1.1.4   root      214:      See the file `fixincludes' for a list of all the files we know
                    215:      to require correction.
1.1       root      216: 
                    217: If you cannot install the compiler's passes and run-time support in
1.1.1.4   root      218: `/usr/local/lib', you can alternatively use the `-B' option to
                    219: specify a prefix by which they may be found.  The compiler
                    220: concatenates the prefix with the names  `cpp', `cc1' and `gnulib'. 
                    221: Thus, you can put the files in a directory `/usr/foo/gcc' and specify
                    222: `-B/usr/foo/gcc/' when you run GNU CC.
                    223: 
                    224: Also, you can specify an alternative default directory for these
                    225: files by setting the Make variable `libdir' when you make GNU CC.
1.1       root      226: 
1.1.1.2   root      227: 
1.1.1.6 ! root      228: 
        !           229: File: gcc.info,  Node: VMS Install,  Prev: Installation,  Up: Installation
1.1.1.2   root      230: 
1.1       root      231: Installing GNU CC on VMS
                    232: ========================
                    233: 
1.1.1.4   root      234: The VMS version of GNU CC is distributed in an unusual tape format
                    235: which consists of several tape files.  The first is a command file;
                    236: the second is an executable program which reads Unix tar format; the
                    237: third is another command file which uses this program to read the
                    238: remainder of the tape.
                    239: 
                    240: To load the tape, it suffices to mount it `/foreign' and then do
                    241: `@mta0:' to execute the command file at the beginning of the tape.
                    242: 
                    243: The tape contains executables and object files as well as sources, so
                    244: no compilation is necessary unless you change the sources.  (This is
                    245: a good thing, since you probably don't have any other C compiler.) 
                    246: If you must recompile, here is how:
                    247: 
                    248:   1. Copy the file `tm-vms.h' to `tm.h', `config-vms.h' to
                    249:      `config.h', `vax.md' to `md.' and `output-vax.c' to
                    250:      `aux-output.c'.
1.1       root      251: 
                    252:   2. Type `@make' to do recompile everything.
1.1.1.2   root      253: 
1.1.1.4   root      254: To install the `GCC' command so you can use the compiler easily, in
                    255: the same manner as you use the VMS C compiler, you must install the
                    256: VMS CLD file for GNU CC as follows:
                    257: 
                    258:   1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to
                    259:      point to the directories where the GNU CC executables
                    260:      (`gcc-cpp', `gcc-cc1', etc.) and the C include files are kept. 
                    261:      This should be done with the commands:
1.1.1.2   root      262: 
                    263:           $ assign /super /system disk:[gcc] gnu_cc
                    264:           $ assign /super /system disk:[gcc.include] gnu_cc_include
                    265: 
1.1.1.4   root      266:      with the appropriate disk and directory names.  These commands
                    267:      can be placed in your system startup file so they will be
                    268:      executed whenever the machine is rebooted.
1.1.1.2   root      269: 
                    270:   2. Install the `GCC' command with the command line:
                    271: 
                    272:           $ set command /table=sys$library:dcltables gnu_cc:gcc
                    273: 
1.1.1.4   root      274:      Now you can invoke the compiler with a command like `gcc
                    275:      /verbose file.c', which is equivalent to the command `gcc -v -c
                    276:      file.c' in Unix.

unix.superglobalmegacorp.com

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