Annotation of gcc/INSTALL, revision 1.1.1.11

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

unix.superglobalmegacorp.com

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