home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / info / gcc.info-7 (.txt) < prev    next >
GNU Info File  |  1994-12-22  |  51KB  |  955 lines

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