Annotation of gcc/INSTALL, revision 1.1.1.14

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

unix.superglobalmegacorp.com

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