home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / info / gcc.info-5 (.txt) < prev    next >
GNU Info File  |  1994-12-22  |  33KB  |  563 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: Environment Variables,  Next: Running Protoize,  Prev: Code Gen Options,  Up: Invoking GCC
  25. Environment Variables Affecting GNU CC
  26. ======================================
  27.    This section describes several environment variables that affect how
  28. GNU CC operates.  They work by specifying directories or prefixes to use
  29. when searching for various kinds of files.
  30.    Note that you can also specify places to search using options such as
  31. `-B', `-I' and `-L' (*note Directory Options::.).  These take
  32. precedence over places specified using environment variables, which in
  33. turn take precedence over those specified by the configuration of GNU
  34. CC.  *Note Driver::.
  35. `TMPDIR'
  36.      If `TMPDIR' is set, it specifies the directory to use for temporary
  37.      files.  GNU CC uses temporary files to hold the output of one
  38.      stage of compilation which is to be used as input to the next
  39.      stage: for example, the output of the preprocessor, which is the
  40.      input to the compiler proper.
  41. `GCC_EXEC_PREFIX'
  42.      If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
  43.      names of the subprograms executed by the compiler.  No slash is
  44.      added when this prefix is combined with the name of a subprogram,
  45.      but you can specify a prefix that ends with a slash if you wish.
  46.      If GNU CC cannot find the subprogram using the specified prefix, it
  47.      tries looking in the usual places for the subprogram.
  48.      The default value of `GCC_EXEC_PREFIX' is
  49.      `PREFIX/lib/gcc-lib/MACHINE/VERSION/' where PREFIX is the value of
  50.      `prefix' when you ran the `configure' script and MACHINE and
  51.      VERSION are the configuration name and version number of GNU CC,
  52.      respectively.
  53.      Other prefixes specified with `-B' take precedence over this
  54.      prefix.
  55.      This prefix is also used for finding files such as `crt0.o' that
  56.      are used for linking.
  57.      In addition, the prefix is used in an unusual way in finding the
  58.      directories to search for header files.  For each of the standard
  59.      directories whose name normally begins with
  60.      `/usr/local/lib/gcc-lib' (more precisely, with the value of
  61.      `GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
  62.      specified prefix to produce an alternate directory name.  Thus,
  63.      with `-Bfoo/', GNU CC will search `foo/bar' where it would
  64.      normally search `/usr/local/lib/bar'.  These alternate directories
  65.      are searched first; the standard directories come next.
  66. `COMPILER_PATH'
  67.      The value of `COMPILER_PATH' is a colon-separated list of
  68.      directories, much like `PATH'.  GNU CC tries the directories thus
  69.      specified when searching for subprograms, if it can't find the
  70.      subprograms using `GCC_EXEC_PREFIX'.
  71. `LIBRARY_PATH'
  72.      The value of `LIBRARY_PATH' is a colon-separated list of
  73.      directories, much like `PATH'.  GNU CC tries the directories thus
  74.      specified when searching for special linker files, if it can't
  75.      find them using `GCC_EXEC_PREFIX'.  Linking using GNU CC also uses
  76.      these directories when searching for ordinary libraries for the
  77.      `-l' option (but directories specified with `-L' come first).
  78. `C_INCLUDE_PATH'
  79. `CPLUS_INCLUDE_PATH'
  80. `OBJC_INCLUDE_PATH'
  81.      These environment variables pertain to particular languages.  Each
  82.      variable's value is a colon-separated list of directories, much
  83.      like `PATH'.  When GNU CC searches for header files, it tries the
  84.      directories listed in the variable for the language you are using,
  85.      after the directories specified with `-I' but before the standard
  86.      header file directories.
  87. `DEPENDENCIES_OUTPUT'
  88.      If this variable is set, its value specifies how to output
  89.      dependencies for Make based on the header files processed by the
  90.      compiler.  This output looks much like the output from the `-M'
  91.      option (*note Preprocessor Options::.), but it goes to a separate
  92.      file, and is in addition to the usual results of compilation.
  93.      The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
  94.      which case the Make rules are written to that file, guessing the
  95.      target name from the source file name.  Or the value can have the
  96.      form `FILE TARGET', in which case the rules are written to file
  97.      FILE using TARGET as the target name.
  98. File: gcc.info,  Node: Running Protoize,  Prev: Environment Variables,  Up: Invoking GCC
  99. Running Protoize
  100. ================
  101.    The program `protoize' is an optional part of GNU C.  You can use it
  102. to add prototypes to a program, thus converting the program to ANSI C
  103. in one respect.  The companion program `unprotoize' does the reverse:
  104. it removes argument types from any prototypes that are found.
  105.    When you run these programs, you must specify a set of source files
  106. as command line arguments.  The conversion programs start out by
  107. compiling these files to see what functions they define.  The
  108. information gathered about a file FOO is saved in a file named `FOO.X'.
  109.    After scanning comes actual conversion.  The specified files are all
  110. eligible to be converted; any files they include (whether sources or
  111. just headers) are eligible as well.
  112.    But not all the eligible files are converted.  By default,
  113. `protoize' and `unprotoize' convert only source and header files in the
  114. current directory.  You can specify additional directories whose files
  115. should be converted with the `-d DIRECTORY' option.  You can also
  116. specify particular files to exclude with the `-x FILE' option.  A file
  117. is converted if it is eligible, its directory name matches one of the
  118. specified directory names, and its name within the directory has not
  119. been excluded.
  120.    Basic conversion with `protoize' consists of rewriting most function
  121. definitions and function declarations to specify the types of the
  122. arguments.  The only ones not rewritten are those for varargs functions.
  123.    `protoize' optionally inserts prototype declarations at the
  124. beginning of the source file, to make them available for any calls that
  125. precede the function's definition.  Or it can insert prototype
  126. declarations with block scope in the blocks where undeclared functions
  127. are called.
  128.    Basic conversion with `unprotoize' consists of rewriting most
  129. function declarations to remove any argument types, and rewriting
  130. function definitions to the old-style pre-ANSI form.
  131.    Both conversion programs print a warning for any function
  132. declaration or definition that they can't convert.  You can suppress
  133. these warnings with `-q'.
  134.    The output from `protoize' or `unprotoize' replaces the original
  135. source file.  The original file is renamed to a name ending with
  136. `.save'.  If the `.save' file already exists, then the source file is
  137. simply discarded.
  138.    `protoize' and `unprotoize' both depend on GNU CC itself to scan the
  139. program and collect information about the functions it uses.  So
  140. neither of these prog