home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.5.8-bin.lha / GNU / info / gcc.info-7 (.txt) < prev    next >
GNU Info File  |  1994-09-02  |  51KB  |  949 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: VMS Install,  Next: Collect2,  Prev: Sun Install,  Up: Installation
  23. Installing GNU CC on VMS
  24. ========================
  25.    The VMS version of GNU CC is distributed in a backup saveset
  26. containing both source code and precompiled binaries.
  27.    To install the `gcc' command so you can use the compiler easily, in
  28. the same manner as you use the VMS C compiler, you must install the VMS
  29. CLD file for GNU CC as follows:
  30.   1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to
  31.      point to the directories where the GNU CC executables
  32.      (`gcc-cpp.exe', `gcc-cc1.exe', etc.) and the C include files are
  33.      kept respectively.  This should be done with the commands:
  34.           $ assign /system /translation=concealed -
  35.             disk:[gcc.] gnu_cc
  36.           $ assign /system /translation=concealed -
  37.             disk:[gcc.include.] gnu_cc_include
  38.      with the appropriate disk and directory names.  These commands can
  39.      be placed in your system startup file so they will be executed
  40.      whenever the machine is rebooted.  You may, if you choose, do this
  41.      via the `GCC_INSTALL.COM' script in the `[GCC]' directory.
  42.   2. Install the `GCC' command with the command line:
  43.           $ set command /table=sys$common:[syslib]dcltables -
  44.             /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc
  45.           $ install replace sys$common:[syslib]dcltables
  46.   3. To install the help file, do the following:
  47.           $ library/help sys$library:helplib.hlb gcc.hlp
  48.      Now you can invoke the compiler with a command like `gcc /verbose
  49.      file.c', which is equivalent to the command `gcc -v -c file.c' in
  50.      Unix.
  51.    If you wish to use GNU C++ you must first install GNU CC, and then
  52. perform the following steps:
  53.   1. Define the VMS logical name `GNU_GXX_INCLUDE' to point to the
  54.      directory where the preprocessor will search for the C++ header
  55.      files.  This can be done with the command:
  56.           $ assign /system /translation=concealed -
  57.             disk:[gcc.gxx_include.] gnu_gxx_include
  58.      with the appropriate disk and directory name.  If you are going to
  59.      be using libg++, this is where the libg++ install procedure will
  60.      install the libg++ header files.
  61.   2. Obtain the file `gcc-cc1plus.exe', and place this in the same
  62.      directory that `gcc-cc1.exe' is kept.
  63.      The GNU C++ compiler can be invoked with a command like `gcc /plus
  64.      /verbose file.cc', which is equivalent to the command `g++ -v -c
  65.      file.cc' in Unix.
  66.    We try to put corresponding binaries and sources on the VMS
  67. distribution tape.  But sometimes the binaries will be from an older
  68. version than the sources, because we don't always have time to update
  69. them.  (Use the `/version' option to determine the version number of
  70. the binaries and compare it with the source file `version.c' to tell
  71. whether this is so.)  In this case, you should use the binaries you get
  72. to recompile the sources.  If you must recompile, here is how:
  73.   1. Execute the command procedure `vmsconfig.com' to set up the files
  74.      `tm.h', `config.h', `aux-output.c', and `md.', and to create files
  75.      `tconfig.h' and `hconfig.h'.  This procedure also creates several
  76.      linker option files used by `make-cc1.com' and a data file used by
  77.      `make-l2.com'.
  78.           $ @vmsconfig.com
  79.   2. Setup the logical names and command tables as defined above.  In
  80.      addition, define the VMS logical name `GNU_BISON' to point at the
  81.      to the directories where the Bison executable is kept.  This
  82.      should be done with the command:
  83.           $ assign /system /translation=concealed -
  84.             disk:[bison.] gnu_bison
  85.      You may, if you choose, use the `INSTALL_BISON.COM' script in the
  86.      `[BISON]' directory.
  87.   3. Install the `BISON' command with the command line:
  88.           $ set command /table=sys$common:[syslib]dcltables -
  89.             /output=sys$common:[syslib]dcltables -
  90.             gnu_bison:[000000]bison
  91.           $ install replace sys$common:[syslib]dcltables
  92.   4. Type `@make-gcc' to recompile everything (alternatively, submit
  93.      the file `make-gcc.com' to a batch queue).  If you wish to build
  94.      the GNU C++ compiler as well as the GNU CC compiler, you must
  95.      first edit `make-gcc.com' and follow the instructions that appear
  96.      in the comments.
  97.   5. In order to use GCC, you need a library of functions which GCC
  98.      compiled code will call to perform certain tasks, and these
  99.      functions are defined in the file `libgcc2.c'.  To compile this
  100.      you should use the command procedure `make-l2.com', which will
  101.      generate the library `libgcc2.olb'.  `libgcc2.olb' should be built
  102.      using the compiler built from the same distribution that
  103.      `libgcc2.c' came from, and `make-gcc.com' will automatically do
  104.      all of this for you.
  105.      To install the library, use the following commands:
  106.           $ library gnu_cc:[000000]gcclib/delete=(new,eprintf)
  107.           $ library gnu_cc:[000000]gcclib/delete=L_*
  108.           $ library libgcc2/extract=*/output=libgcc2.obj
  109.           $ library gnu_cc:[000000]gcclib libgcc2.obj
  110.      The first command simply removes old modules that will be replaced
  111.      with modules from `libgcc2' under different module names.  The
  112.      modules `new' and `eprintf' may not actually be present in your
  113.      `gcclib.olb'--if the VMS librarian complains about those modules
  114.      not being present, simply ignore the message and continue on with
  115.      the next command.  The second command removes the modules that
  116.      came from the previous version of the library `libgcc2.c'.
  117.      Whenever you update the compiler on your system, you should also
  118.      update the library with the above procedure.
  119.   6. You may wish to build GCC in such a way that no files are written
  120.      to the directory where the source files reside.  An example would
  121.      be the when the source files are on a read-only disk.  In these
  122.      cases, execute the following DCL commands (substituting your
  123.      actual path names):
  124.           $ assign dua0:[gcc.build_dir.]/translation=concealed, -
  125.                    dua1:[gcc.source_dir.]/translation=concealed  gcc_build
  126.           $ set default gcc_build:[000000]
  127.      where the directory `dua1:[gcc.source_dir]' contains the source
  128.      code, and the directory `dua0:[gcc.build_dir]' is meant to contain
  129.      all of the generated object files and executables.  Once you have
  130.      done this, you can proceed building GCC as described above.  (Keep
  131.      in mind that `gcc_build' is a rooted logical name, and thus the
  132.      device names in each element of the search list must be an actual
  133.      physical device name rather than another rooted logical name).
  134.   7. *If you are building GNU CC with a previous version of GNU CC, you
  135.      also should check to see that you have the newest version of the
  136.      assembler*.  In particular, GNU CC version 2 treats global constant
  137.      variables slightly diff