Annotation of gcc/INSTALL, revision 1.1.1.13

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: 
1.1.1.12  root       16: * Other Dir::     Compiling in a separate directory (not where the source is).
                     17: * Sun Install::   See below for installation on the Sun.
                     18: * 3B1 Install::   See below for installation on the 3B1.
1.1       root       19: * VMS Install::   See below for installation on VMS.
1.1.1.13! root       20: * HPUX Install::  See below for installation on HPUX.
1.1       root       21: 
1.1.1.4   root       22:   1. Edit `Makefile'.  If you are using HPUX, or any form of system
                     23:      V, you must make a few changes described in comments at the
1.1.1.13! root       24:      beginning of the file.  Genix requires changes also, and so does
        !            25:      the Pyramid.
1.1.1.2   root       26: 
                     27:   2. On a Sequent system, go to the Berkeley universe.
1.1       root       28: 
1.1.1.7   root       29:   3. Choose configuration files.  The easy way to do this is to run
1.1.1.12  root       30:      the command file `config.gcc' with a single argument, which
                     31:      specifies the type of machine (and in some cases which operating
                     32:      system).
1.1.1.7   root       33: 
1.1.1.8   root       34:      Here is a list of the possible arguments:
                     35: 
                     36:     `vax'
                     37:           Vaxes running BSD.
                     38: 
                     39:     `vms'
                     40:           Vaxes running VMS.
                     41: 
                     42:     `vax-sysv'
                     43:           Vaxes running system V.
                     44: 
                     45:     `i386-sysv'
                     46:           Intel 386 PCs running system V.
                     47: 
1.1.1.9   root       48:     `i386-sysv-gas'
                     49:           Intel 386 PCs running system V, using the GNU assembler and
                     50:           GNU linker.
                     51: 
1.1.1.10  root       52:     `sequent-i386'
1.1.1.8   root       53:           Sequent with Intel 386 processors.
                     54: 
1.1.1.12  root       55:     `i386-aix'
                     56:           Intel 386 PCs or PS/2s running AIX.
                     57: 
1.1.1.8   root       58:     `sun2'
                     59:           Sun 2 running system version 2 or 3.
                     60: 
                     61:     `sun3'
1.1.1.12  root       62:           Sun 3 running system version 2 or 3, with 68881.  Note
                     63:           there we do not provide a configuration file to use an FPA
                     64:           by default, because programs that establish signal handlers
                     65:           for floating point traps inherently cannot work with the FPA.
1.1.1.11  root       66: 
1.1.1.9   root       67:     `sun3-nfp'
                     68:           Sun 3 running system version 2 or 3, without 68881.
                     69: 
1.1.1.8   root       70:     `sun4'
1.1.1.12  root       71:           Sun 4 running system version 2 or 3.  *Note
                     72:           Incompatibilities::, for calling convention
                     73:           incompatibilities on the Sun 4 (sparc).
1.1.1.8   root       74: 
                     75:     `sun2-os4'
                     76:           Sun 2 running system version 4.
                     77: 
                     78:     `sun3-os4'
1.1.1.9   root       79:           Sun 3 running system version 4, with 68881.
                     80: 
                     81:     `sun3-nfp-os4'
                     82:           Sun 3 running system version 4, without 68881.
                     83: 
1.1.1.8   root       84:     `sun4-os4'
1.1.1.12  root       85:           Sun 4 running system version 4.  *Note Incompatibilities::,
                     86:           for calling convention incompatibilities on the Sun 4
                     87:           (sparc).
1.1.1.8   root       88: 
                     89:     `sun386'
                     90:           Sun 386 (``roadrunner'').
                     91: 
1.1.1.9   root       92:     `alliant'
1.1.1.12  root       93:           Alliant FX/8 computer.  Note that the standard installed C
                     94:           compiler in Concentrix 5.0 has a bug which prevent it from
                     95:           compiling GNU CC correctly.  You can patch the compiler bug
                     96:           as follows:
                     97: 
                     98:                cp /bin/pcc ./pcc
1.1.1.13! root       99:                adb -w ./pcc - << EOF
1.1.1.12  root      100:                15f6?w 6610
                    101:                EOF
                    102: 
                    103:           Then you must use the `-ip12' option when compiling GNU CC
                    104:           with the patched compiler, as shown here:
                    105: 
                    106:                make CC="./pcc -ip12" CFLAGS=-w
                    107: 
                    108:           Note also that Alliant's version of DBX does not manage to
                    109:           work with the output from GNU CC.
                    110: 
                    111:     `tahoe'
                    112:           The tahoe computer (running BSD, and using DBX).
                    113: 
                    114:     `decstation'
                    115:           The DEC 3100 Mips machine (``pmax'').  Note that GNU CC
                    116:           cannot generate debugging information in the unusual format
                    117:           used on the Mips.
                    118: 
                    119:     `mips-sysv'
                    120:           The Mips computer, RS series, with the System V environment
                    121:           as default.  Note that GNU CC cannot generate debugging
                    122:           information in the unusual format used on the Mips.
                    123: 
                    124:     `mips-bsd43'
                    125:           The Mips computer, RS series, with the BSD 4.3 environment
                    126:           as default.  Note that GNU CC cannot generate debugging
                    127:           information in the unusual format used on the Mips.
1.1.1.9   root      128: 
1.1.1.11  root      129:     `mips'
1.1.1.12  root      130:           The Mips computer, M series.  Note that GNU CC cannot
                    131:           generate debugging information in the unusual format used
                    132:           on the Mips.
                    133: 
                    134:     `iris'
                    135:           The Mips computer, as delivered by Iris.  Note that GNU CC
                    136:           cannot generate debugging information in the unusual format
                    137:           used on the Mips.
1.1.1.11  root      138: 
1.1.1.9   root      139:     `convex-c1'
                    140:           Convex C1 computer.
                    141: 
                    142:     `convex-c2'
                    143:           Convex C2 computer.
                    144: 
1.1.1.12  root      145:     `pyramid'
                    146:           Pyramid computer.
                    147: 
1.1.1.8   root      148:     `hp9k320'
1.1.1.11  root      149:           HP 9000 series 300 using HPUX assembler.  Note there is no
                    150:           support in GNU CC for HP's debugger; thus, `-g' is not
                    151:           available in this configuration.
1.1.1.8   root      152: 
1.1.1.12  root      153:     `hp9k320-gas'
1.1.1.8   root      154:           HP 9000 series 300 using GNU assembler, linker and debugger.
1.1.1.11  root      155:           This requires the HP-adapt package, which is available
                    156:           along with the GNU linker as part of the ``binutils''
                    157:           distribution.  This is on the GNU CC distribution tape.
1.1.1.8   root      158: 
1.1.1.12  root      159:     `hp9k320-old'
                    160:           HP 9000 series 300 using HPUX assembler, in operating
                    161:           system versions older than 6.5.  Note there is no support
                    162:           in GNU CC for HP's debugger; thus, `-g' is not available in
                    163:           this configuration.
                    164: 
                    165:     `hp9k320-bsd'
                    166:           HP 9000 series 300 running BSD.
                    167: 
1.1.1.8   root      168:     `isi68'
1.1.1.12  root      169:           ISI 68000 or 68020 system with a 68881.
                    170: 
                    171:     `isi68-nfp'
                    172:           ISI 68000 or 68020 system without a 68881.
1.1.1.8   root      173: 
                    174:     `news800'
                    175:           Sony NEWS 68020 system.
                    176: 
1.1.1.10  root      177:     `next'
                    178:           NeXT system.
                    179: 
1.1.1.11  root      180:     `altos'
                    181:           Altos 3068.  Note that you must use the GNU assembler,
                    182:           linker and debugger, with COFF-encapsulation.  Also, you
                    183:           must fix a kernel bug.  Details in the file `ALTOS-README'.
                    184: 
1.1.1.8   root      185:     `3b1'
1.1.1.12  root      186:           AT&T 3b1, a.k.a. 7300 PC.  Note that special procedures are
                    187:           needed to compile GNU CC with this machine's standard C
                    188:           compiler, due to bugs in that compiler.  *Note 3b1
                    189:           Install::.  You can bootstrap it more easily with previous
                    190:           versions of GNU CC if you have them.
1.1.1.8   root      191: 
1.1.1.13! root      192:     `3b1-gas'
        !           193:           AT&T 3b1 using the GNU assembler.
        !           194: 
1.1.1.8   root      195:     `sequent-ns32k'
                    196:           Sequent containing ns32000 processors.
                    197: 
                    198:     `encore'
                    199:           Encore ns32000 system.
                    200: 
                    201:     `genix'
                    202:           National Semiconductor ns32000 system.
                    203: 
                    204:     `88000'
                    205:           Motorola 88000 processor.  This port is not finished.
                    206: 
                    207:      Here we spell out what files need to be set up:
1.1       root      208: 
1.1.1.4   root      209:         * Make a symbolic link named `config.h' to the top-level
                    210:           config file for the machine you are using (*note
                    211:           Config::.).  This file is responsible for defining
                    212:           information about the host machine.  It includes `tm.h'.
                    213: 
1.1.1.11  root      214:           The file is located in the subdirectory `config'.  Its name
                    215:           should be `xm-MACHINE.h', with these exceptions:
1.1.1.4   root      216: 
1.1.1.8   root      217:          `xm-vms.h'
1.1.1.4   root      218:                for vaxen running VMS.
                    219: 
1.1.1.8   root      220:          `xm-vaxv.h'
1.1.1.4   root      221:                for vaxen running system V.
                    222: 
1.1.1.8   root      223:          `xm-i386v.h'
1.1.1.4   root      224:                for Intel 80386's running system V.
                    225: 
1.1.1.8   root      226:          `xm-sun386i.h'
                    227:                for Sun roadrunner running any version of the
                    228:                operating system.
                    229: 
                    230:          `xm-hp9k320.h'
1.1.1.4   root      231:                for the HP 9000 series 300.
                    232: 
1.1.1.8   root      233:          `xm-genix.h'
1.1.1.4   root      234:                for the ns32000 running Genix
                    235: 
                    236:           If your system does not support symbolic links, you might
                    237:           want to set up `config.h' to contain a `#include' command
                    238:           which refers to the appropriate file.
                    239: 
                    240:         * Make a symbolic link named `tm.h' to the
1.1.1.11  root      241:           machine-description macro file for your machine.  It should
                    242:           be in the subdirectory `config' and its name should be
                    243:           `tm-MACHINE.h'.
1.1.1.4   root      244: 
                    245:           If your system is a 68000, don't use the file `tm-m68k.h'
                    246:           directly.  Instead, use one of these files:
                    247: 
                    248:          `tm-sun3.h'
1.1.1.9   root      249:                for Sun 3 machines with 68881.
                    250: 
                    251:          `tm-sun3-nfp.h'
                    252:                for Sun 3 machines with no hardware floating point.
1.1.1.4   root      253: 
1.1.1.12  root      254:          `tm-sun3os3.h'
                    255:                for Sun 3 machines with 68881, running Sunos version 3.
                    256: 
                    257:          `tm-sun3os3nf.h'
                    258:                for Sun 3 machines with no hardware floating point,
                    259:                running Sunos version 3.
                    260: 
1.1.1.4   root      261:          `tm-sun2.h'
                    262:                for Sun 2 machines.
                    263: 
                    264:          `tm-3b1.h'
                    265:                for AT&T 3b1 (aka 7300 Unix PC).
                    266: 
                    267:          `tm-isi68.h'
1.1.1.8   root      268:                for Integrated Solutions systems.  This file assumes
                    269:                you use the GNU assembler.
1.1.1.4   root      270: 
1.1.1.12  root      271:          `tm-isi68-nfp.h'
                    272:                for Integrated Solutions systems without a 68881. 
                    273:                This file assumes you use the GNU assembler.
                    274: 
1.1.1.4   root      275:          `tm-news800.h'
1.1.1.12  root      276:                for Sony NEWS systems.
1.1.1.4   root      277: 
                    278:          `tm-hp9k320.h'
                    279:                for HPUX systems, if you are using GNU CC with the
                    280:                system's assembler and linker.
                    281: 
                    282:          `tm-hp9k320g.h'
                    283:                for HPUX systems, if you are using the GNU assembler,
                    284:                linker and other utilities.  Not all of the pieces of
                    285:                GNU software needed for this mode of operation are as
                    286:                yet in distribution; full instructions will appear
                    287:                here in the future.
                    288: 
                    289:           For the vax, use `tm-vax.h' on BSD Unix, `tm-vaxv.h' on
                    290:           system V, or `tm-vms.h' on VMS.
                    291: 
                    292:           For the Motorola 88000, use `tm-m88k.h'.  The support for
1.1.1.13! root      293:           the 88000 does not currently work; it requires extensive
        !           294:           changes which we hope to reconcile in version 2.
1.1.1.4   root      295: 
                    296:           For the 80386, don't use `tm-i386.h' directly.  Use
                    297:           `tm-i386v.h' if the target machine is running system V,
1.1.1.9   root      298:           `tm-i386gas.h' if it is running system V but you are using
                    299:           the GNU assembler and linker, `tm-seq386.h' for a Sequent
                    300:           386 system, or `tm-compaq.h' for a Compaq, or
                    301:           `tm-sun386i.h' for a Sun 386 system.
1.1.1.4   root      302: 
1.1.1.12  root      303:           For the Mips computer, there are five choices: `tm-mips.h'
                    304:           for the M series, `tm-mips-bsd.h' for the RS series with
                    305:           BSD, `tm-mips-sysv.h' for the RS series with System V,
                    306:           `tm-iris.h' for the Iris version of the machine, and
                    307:           `tm-decstatn.h' for the Decstation.
                    308: 
1.1.1.4   root      309:           For the 32000, use `tm-sequent.h' if you are using a
                    310:           Sequent machine, or `tm-encore.h' for an Encore machine, or
1.1.1.8   root      311:           `tm-genix.h' if you are using Genix version 3; otherwise,
1.1.1.4   root      312:           perhaps `tm-ns32k.h' will work for you.
                    313: 
                    314:           Note that Genix has bugs in `alloca' and `malloc'; you must
                    315:           get the compiled versions of these from GNU Emacs and edit
                    316:           GNU CC's `Makefile' to use them.
1.1       root      317: 
1.1.1.2   root      318:           Note that Encore systems are supported only under BSD.
1.1       root      319: 
1.1.1.10  root      320:           For Sparc (Sun 4) machines, use `tm-sparc.h' with operating
                    321:           system version 4, and `tm-sun4os3.h' with system version 3.
                    322: 
1.1       root      323:         * Make a symbolic link named `md' to the machine description
1.1.1.11  root      324:           pattern file.  It should be in the `config' subdirectory
                    325:           and its name should be `MACHINE.md'; but MACHINE is often
                    326:           not the same as the name used in the `tm.h' file because
                    327:           the `md' files are more general.
1.1       root      328: 
                    329:         * Make a symbolic link named `aux-output.c' to the output
1.1.1.11  root      330:           subroutine file for your machine.  It should be in the
                    331:           `config' subdirectory and its name should be `out-MACHINE.c'.
1.1       root      332: 
1.1.1.4   root      333:   4. Make sure the Bison parser generator is installed.  (This is
                    334:      unnecessary if the Bison output files `c-parse.tab.c' and
                    335:      `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you
                    336:      do not plan to change the `.y' files.)
                    337: 
1.1.1.13! root      338:      Bison versions older than Sept 8, 1988 will produce incorrect
1.1.1.5   root      339:      output for `c-parse.tab.c'.
1.1       root      340: 
1.1.1.12  root      341:   5. Build the compiler.  Just type `make' in the compiler directory.
1.1       root      342: 
1.1.1.7   root      343:      Ignore any warnings you may see about ``statement not reached''
                    344:      in the `insn-emit.c'; they are normal.  Any other compilation
                    345:      errors may represent bugs in the port to your machine or
                    346:      operating system, and should be investigated and reported (*note
                    347:      Bugs::.).
                    348: 
1.1.1.13! root      349:      Some commercial compilers fail to compile GNU CC because they
        !           350:      have bugs or limitations.  For example, the Microsoft compiler
        !           351:      is said to run out of macro space.  Some Ultrix compilers run
        !           352:      out of expression space; then you need to break up the statement
        !           353:      where the problem happens.
1.1.1.11  root      354: 
1.1.1.13! root      355:   6. If you are using COFF-encapsulation, you must convert `gnulib'
1.1.1.9   root      356:      to a GNU-format library at this point.  See the file
                    357:      `README-ENCAP' in the directory containing the GNU binary file
                    358:      utilities, for directions.
                    359: 
1.1.1.13! root      360:   7. Move the first-stage object files and executables into a
1.1.1.4   root      361:      subdirectory with this command:
1.1       root      362: 
                    363:           make stage1
                    364: 
                    365:      The files are moved into a subdirectory named `stage1'.  Once
1.1.1.4   root      366:      installation is complete, you may wish to delete these files
                    367:      with `rm -r stage1'.
1.1       root      368: 
1.1.1.13! root      369:   8. Recompile the compiler with itself, with this command:
1.1       root      370: 
                    371:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"
                    372: 
1.1.1.4   root      373:      On a 68000 or 68020 system lacking floating point hardware,
                    374:      unless you have selected a `tm.h' file that expects by default
                    375:      that there is no such hardware, do this instead:
1.1       root      376: 
                    377:           make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float"
                    378: 
1.1.1.13! root      379:   9. If you wish to test the compiler by compiling it with itself one
1.1.1.11  root      380:      more time, do this (in C shell):
1.1       root      381: 
                    382:           make stage2
1.1.1.6   root      383:           make CC=stage2/gcc CFLAGS="-g -O -Bstage2/"
1.1       root      384:           foreach file (*.o)
                    385:           cmp $file stage2/$file
                    386:           end
                    387: 
1.1.1.4   root      388:      Aside from the `-B' option, the options should be the same as
                    389:      when you made stage 2.
                    390: 
1.1.1.11  root      391:      The `foreach' command (written in C shell) will notify you if
                    392:      any of these stage 3 object files differs from those of stage 2.
                    393:      On BSD systems, any difference, no matter how innocuous,
                    394:      indicates that the stage 2 compiler has compiled GNU CC
                    395:      incorrectly, and is therefore a potentially serious bug which
                    396:      you should investigate and report (*note Bugs::.).
                    397: 
                    398:      On systems that use COFF object files, bytes 5 to 8 will always
                    399:      be different, since it is a timestamp.  On these systems, you
                    400:      can do the comparison as follows (in Bourne shell):
                    401: 
                    402:           for file in *.o; do
                    403:           echo $file
                    404:           tail +10 $file > foo1
                    405:           tail +10 stage2/$file > foo2
                    406:           cmp foo1 foo2
                    407:           done
                    408: 
1.1.1.13! root      409:  10. Install the compiler driver, the compiler's passes and run-time
1.1.1.4   root      410:      support.  You can use the following command:
1.1       root      411: 
                    412:           make install
                    413: 
1.1.1.4   root      414:      This copies the files `cc1', `cpp' and `gnulib' to files
                    415:      `gcc-cc1', `gcc-cpp' and `gcc-gnulib' in directory
                    416:      `/usr/local/lib', which is where the compiler driver program
                    417:      looks for them.  It also copies the driver program `gcc' into
1.1.1.10  root      418:      the directory `/usr/local/bin', so that it appears in typical
1.1.1.4   root      419:      execution search paths.
                    420: 
                    421:      *Warning: there is a bug in `alloca' in the Sun library.  To
                    422:      avoid this bug, install the binaries of GNU CC that were
                    423:      compiled by GNU CC.  They use `alloca' as a built-in function
                    424:      and never the one in the library.*
                    425: 
                    426:      *Warning: the GNU CPP may not work for `ioctl.h', `ttychars.h'
                    427:      and other system header files unless the `-traditional' option
                    428:      is used.*  The bug is in the header files: at least on some
                    429:      machines, they rely on behavior that is incompatible with ANSI
                    430:      C.  This behavior consists of substituting for macro argument
                    431:      names when they appear inside of character constants.  The
                    432:      `-traditional' option tells GNU CC to behave the way these
                    433:      headers expect.
1.1       root      434: 
1.1.1.4   root      435:      Because of this problem, you might prefer to configure GNU CC to
                    436:      use the system's own C preprocessor.  To do so, make the file
1.1       root      437:      `/usr/local/lib/gcc-cpp' a link to `/lib/cpp'.
                    438: 
1.1.1.4   root      439:      Alternatively, on Sun systems and 4.3BSD at least, you can
                    440:      correct the include files by running the shell script
                    441:      `fixincludes'.  This installs modified, corrected copies of the
                    442:      files `ioctl.h', `ttychars.h' and many others, in a special
1.1.1.7   root      443:      directory where only GNU CC will normally look for them.  This
1.1.1.10  root      444:      script will work on various systems because it chooses the files
1.1.1.7   root      445:      by searching all the system headers for the problem cases that
                    446:      we know about.
1.1       root      447: 
                    448: If you cannot install the compiler's passes and run-time support in
1.1.1.4   root      449: `/usr/local/lib', you can alternatively use the `-B' option to
                    450: specify a prefix by which they may be found.  The compiler
                    451: concatenates the prefix with the names  `cpp', `cc1' and `gnulib'. 
                    452: Thus, you can put the files in a directory `/usr/foo/gcc' and specify
                    453: `-B/usr/foo/gcc/' when you run GNU CC.
                    454: 
                    455: Also, you can specify an alternative default directory for these
                    456: files by setting the Make variable `libdir' when you make GNU CC.
1.1       root      457: 
1.1.1.2   root      458: 
1.1.1.11  root      459: 
1.1.1.12  root      460: File: gcc.info,  Node: Other Dir,  Next: Sun Install,  Prev: Installation,  Up: Installation
1.1.1.2   root      461: 
1.1.1.12  root      462: Compilation in a Separate Directory
                    463: ===================================
1.1       root      464: 
1.1.1.12  root      465: If you wish to build the object files and executables in a directory
                    466: other than the one containing the source files, here is what you must
                    467: do differently:
1.1.1.8   root      468: 
1.1.1.12  root      469:   1. Go to that directory before running `config.gcc':
1.1.1.4   root      470: 
1.1.1.12  root      471:           mkdir gcc-sun3
                    472:           cd gcc-sun3
1.1       root      473: 
1.1.1.12  root      474:      On systems that do not support symbolic links, this directory
                    475:      must be on the same file system as the source code directory.
1.1.1.2   root      476: 
1.1.1.12  root      477:   2. Specify where to find `config.gcc' when you run it:
                    478: 
                    479:           ../gcc-1.36/config.gcc ...
                    480: 
                    481:   3. Specify where to find the sources, as an argument to `config.gcc':
                    482: 
                    483:           ../gcc-1.36/config.gcc -srcdir=../gcc-1.36 sun3
                    484: 
                    485:      The `-srcdir=DIR' option is not needed when the source directory
                    486:      is the parent of the current directory, because `config.gcc'
                    487:      detects that case automatically.
                    488: 
                    489: Now, you can run `make' in that directory.  You need not repeat the
                    490: configuration steps shown above, when ordinary source files change. 
                    491: You must, however, run `config.gcc' again when the configuration
                    492: files change, if your system does not support symbolic links.
                    493: 
                    494: 
                    495: 
                    496: File: gcc.info,  Node: Sun Install,  Next: 3b1 Install,  Prev: Other Dir,  Up: Installation
                    497: 
                    498: Installing GNU CC on the Sun
                    499: ============================
                    500: 
                    501: Make sure the environment variable `FLOAT_OPTION' is not set when you
                    502: compile `gnulib'.  If this option were set to `f68881' when `gnulib'
                    503: is compiled, the resulting code would demand to be linked with a
                    504: special startup file and would not link properly without special
                    505: pains.
                    506: 
                    507: There is a bug in `alloca' in certain versions of the Sun library. 
                    508: To avoid this bug, install the binaries of GNU CC that were compiled
                    509: by GNU CC.  They use `alloca' as a built-in function and never the
                    510: one in the library.
                    511: 
                    512: Some versions of the Sun compiler crash when compiling GNU CC.  The
                    513: problem is a segmentation fault in cpp.
                    514: 
                    515: This problem seems to be due to the bulk of data in the environment
                    516: variables.  You may be able to avoid it by using the following
                    517: command to compile GNU CC with Sun CC:
                    518: 
                    519:      make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
                    520: 
                    521: 
                    522: 
                    523: File: gcc.info,  Node: 3b1 Install,  Next: VMS Install,  Prev: Sun Install,  Up: Installation
                    524: 
                    525: Installing GNU CC on the 3b1
                    526: ============================
                    527: 
                    528: Installing GNU CC on the 3b1 is difficult if you do not already have
                    529: GNU CC running, due to bugs in the installed C compiler.  However,
                    530: the following procedure might work.  We are unable to test it.
                    531: 
                    532:   1. Comment out the `#include "config.h"' line on line 37 of
                    533:      `cccp.c' and do `make cpp'.  This makes a preliminary version of
                    534:      GNU cpp.
                    535: 
                    536:   2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that
                    537:      file name.
                    538: 
                    539:   3. Undo your change in `cccp.c', or reinstall the original version,
                    540:      and do `make cpp' again.
                    541: 
                    542:   4. Copy this final version of GNU cpp into `/lib/cpp'.
                    543: 
1.1.1.13! root      544:   5. Replace every occurrence of `obstack_free' in `tree.c' with
1.1.1.12  root      545:      `_obstack_free'.
                    546: 
                    547:   6. Run `make' to get the first-stage GNU CC.
                    548: 
                    549:   7. Reinstall the original version of `/lib/cpp'.
                    550: 
                    551:   8. Now you can compile GNU CC with itself and install it in the
                    552:      normal fashion.
                    553: 
1.1.1.13! root      554: If you have installed an earlier version of GCC, you can compile the
        !           555: newer version with that.  However, you will run into trouble
        !           556: compiling `gnulib', since that is normally compiled with CC.  To
        !           557: solve the problem, uncomment this line in `Makefile':
        !           558: 
        !           559:      CCLIBFLAGS = -B/usr/local/lib/gcc- -tp -Wp,-traditional
        !           560: 
1.1.1.12  root      561: 
                    562: 
1.1.1.13! root      563: File: gcc.info,  Node: VMS Install,  Next: HPUX Install,  Prev: 3B1 Install,  Up: Installation
1.1.1.12  root      564: 
                    565: Installing GNU CC on VMS
                    566: ========================
1.1.1.9   root      567: 
1.1.1.12  root      568: The VMS version of GNU CC is distributed in a backup saveset
                    569: containing both source code and precompiled binaries.
                    570: 
                    571: To install the `gcc' command so you can use the compiler easily, in
1.1.1.4   root      572: the same manner as you use the VMS C compiler, you must install the
                    573: VMS CLD file for GNU CC as follows:
                    574: 
                    575:   1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to
                    576:      point to the directories where the GNU CC executables
                    577:      (`gcc-cpp', `gcc-cc1', etc.) and the C include files are kept. 
                    578:      This should be done with the commands:
1.1.1.2   root      579: 
1.1.1.12  root      580:           $ assign /super /system disk:[gcc.] gnu_cc
                    581:           $ assign /super /system disk:[gcc.include.] gnu_cc_include
1.1.1.2   root      582: 
1.1.1.4   root      583:      with the appropriate disk and directory names.  These commands
                    584:      can be placed in your system startup file so they will be
1.1.1.12  root      585:      executed whenever the machine is rebooted.  You may, if you
                    586:      choose, do this via the `GCC_INSTALL.COM' script in the `[GCC]'
                    587:      directory.
1.1.1.2   root      588: 
                    589:   2. Install the `GCC' command with the command line:
                    590: 
1.1.1.12  root      591:           $ set command /table=sys$library:dcltables gnu_cc:[000000]gcc
1.1.1.2   root      592: 
1.1.1.11  root      593:   3. To install the help file, do the following:
                    594: 
                    595:           $ lib/help sys$library:helplib.hlb gcc.hlp
                    596: 
1.1.1.4   root      597:      Now you can invoke the compiler with a command like `gcc
                    598:      /verbose file.c', which is equivalent to the command `gcc -v -c
                    599:      file.c' in Unix.
1.1.1.9   root      600: 
1.1.1.12  root      601: We try to put corresponding binaries and sources on the VMS
                    602: distribution tape.  But sometimes the binaries will be from an older
                    603: version that the sources, because we don't always have time to update
                    604: them.  (Use the `/verbose' option to determine the version number of
                    605: the binaries and compare it with the source file `version.c' to tell
                    606: whether this is so.)  In this case, you should use the binaries you
                    607: get to recompile the sources.  If you must recompile, here is how:
                    608: 
                    609:   1. Copy the file `tm-vms.h' to `tm.h', `xm-vms.h' to `config.h',
                    610:      `vax.md' to `md.' and `out-vax.c' to `aux-output.c'.  The files
                    611:      to be copied are found in the subdirectory named `config'; they
                    612:      should be copied to the main directory of GNU CC.
                    613: 
                    614:   2. Setup the logical names and command tables as defined above.  In
                    615:      addition, define the vms logical name `GNU_BISON' to point at
                    616:      the to the directories where the Bison executable is kept.  This
                    617:      should be done with the command:
                    618: 
                    619:           $ assign /super /system disk:[bison.] gnu_bison
                    620: 
                    621:      You may, if you choose, use the `INSTALL_BISON.COM' script in
                    622:      the `[BISON]' directory.
                    623: 
                    624:   3. Install the `BISON' command with the command line:
                    625: 
                    626:           $ set command /table=sys$library:dcltables gnu_bison:[000000]bison
                    627: 
                    628:   4. Type `@make' to do recompile everything.
                    629: 
                    630:      If you are compiling with a version of GNU CC older than 1.33,
                    631:      specify `/DEFINE=("inline=")' as an option in all the
                    632:      compilations.  This requires editing all the `gcc' commands in
                    633:      `make-cc1.com'.  (The older versions had problems supporting
                    634:      `inline'.)  Once you have a working 1.33 or newer GNU CC, you
                    635:      can change this file back.
                    636: 
1.1.1.9   root      637: There is a known problem on VMS: `const' global variables don't work
                    638: compatibly with the VMS C compiler; we don't know a way to get them
                    639: to the linker properly.
1.1.1.11  root      640: 
                    641: Note that GNU CC on VMS does not generate debugging information to
                    642: describe the program's symbols.  It is not straightforward to
                    643: implement this, and we have no time to spend on it, but we might
                    644: consent to install a very modular implementation if you write it. 
                    645: You will probably have to modify GAS as well as GNU CC.
1.1.1.13! root      646: 
        !           647: 
        !           648: 
        !           649: File: gcc.info,  Node: HPUX Install,  Prev: VMS Install,  Up: Installation
        !           650: 
        !           651: Installing GNU CC on HPUX
        !           652: =========================
        !           653: 
        !           654: To install GNU CC on HPUX, you must start by editing the file
        !           655: `Makefile'.  Search for the string `HPUX' to find comments saying
        !           656: what to change.  You need to change some variable definitions and (if
        !           657: you are using GAS) some lines in the rule for the target `gnulib'.
        !           658: 
        !           659: To compile with the HPUX C compiler, you must specify get the file
        !           660: `alloca.c' from GNU Emacs.  Then, when you run `make', use this
        !           661: argument:
        !           662: 
        !           663:      make ALLOCA=alloca.o
        !           664: 
        !           665: When recompiling GNU CC with itself, do not define `ALLOCA'. 
        !           666: Instead, an `-I' option needs to be added to `CFLAGS' as follows:
        !           667: 
        !           668:      make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -I../binutils/hp-include"

unix.superglobalmegacorp.com

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