home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / gcc.info-4 (.txt) < prev    next >
GNU Info File  |  1994-02-06  |  50KB  |  852 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.49 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the sections entitled "GNU General Public License" and "Protect
  11. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  12. original, and provided that the entire resulting derived work is
  13. distributed under the terms of a permission notice identical to this
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the sections entitled "GNU General Public
  17. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  18. permission notice, may be included in translations approved by the Free
  19. Software Foundation instead of in the original English.
  20. File: gcc.info,  Node: Environment Variables,  Next: Running Protoize,  Prev: Code Gen Options,  Up: Invoking GCC
  21. Environment Variables Affecting GNU CC
  22. ======================================
  23.    This section describes several environment variables that affect how
  24. GNU CC operates.  They work by specifying directories or prefixes to use
  25. when searching for various kinds of files.
  26.    Note that you can also specify places to search using options such as
  27. `-B', `-I' and `-L' (*note Directory Options::.).  These take
  28. precedence over places specified using environment variables, which in
  29. turn take precedence over those specified by the configuration of GNU
  30. CC.  *Note Driver::.
  31. `TMPDIR'
  32.      If `TMPDIR' is set, it specifies the directory to use for temporary
  33.      files.  GNU CC uses temporary files to hold the output of one
  34.      stage of compilation which is to be used as input to the next
  35.      stage: for example, the output of the preprocessor, which is the
  36.      input to the compiler proper.
  37. `GCC_EXEC_PREFIX'
  38.      If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
  39.      names of the subprograms executed by the compiler.  No slash is
  40.      added when this prefix is combined with the name of a subprogram,
  41.      but you can specify a prefix that ends with a slash if you wish.
  42.      If GNU CC cannot find the subprogram using the specified prefix, it
  43.      tries looking in the usual places for the subprogram.
  44.      Other prefixes specified with `-B' take precedence over this
  45.      prefix.
  46.      This prefix is also used for finding files such as `crt0.o' that
  47.      are used for linking.
  48.      In addition, the prefix is used in an unusual way in finding the
  49.      directories to search for header files.  For each of the standard
  50.      directories whose name normally begins with
  51.      `/usr/local/lib/gcc-lib' (more precisely, with the value of
  52.      `GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
  53.      specified prefix to produce an alternate directory name.  Thus,
  54.      with `-Bfoo/', GNU CC will search `foo/bar' where it would
  55.      normally search `/usr/local/lib/bar'. These alternate directories
  56.      are searched first; the standard directories come next.
  57. `COMPILER_PATH'
  58.      The value of `COMPILER_PATH' is a colon-separated list of
  59.      directories, much like `PATH'.  GNU CC tries the directories thus
  60.      specified when searching for subprograms, if it can't find the
  61.      subprograms using `GCC_EXEC_PREFIX'.
  62. `LIBRARY_PATH'
  63.      The value of `LIBRARY_PATH' is a colon-separated list of
  64.      directories, much like `PATH'.  GNU CC tries the directories thus
  65.      specified when searching for special linker files, if it can't
  66.      find them using `GCC_EXEC_PREFIX'.  Linking using GNU CC also uses
  67.      these directories when searching for ordinary libraries for the
  68.      `-l' option (but directories specified with `-L' come first).
  69. `C_INCLUDE_PATH'
  70. `CPLUS_INCLUDE_PATH'
  71. `OBJC_INCLUDE_PATH'
  72.      These environment variables pertain to particular languages.  Each
  73.      variable's value is a colon-separated list of directories, much
  74.      like `PATH'.  When GNU CC searches for header files, it tries the
  75.      directories listed in the variable for the language you are using,
  76.      after the directories specified with `-I' but before the standard
  77.      header file directories.
  78. `DEPENDENCIES_OUTPUT'
  79.      If this variable is set, its value specifies how to output
  80.      dependencies for Make based on the header files processed by the
  81.      compiler.  This output looks much like the output from the `-M'
  82.      option (*note Preprocessor Options::.), but it goes to a separate
  83.      file, and is in addition to the usual results of compilation.
  84.      The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
  85.      which case the Make rules are written to that file, guessing the
  86.      target name from the source file name.  Or the value can have the
  87.      form `FILE TARGET', in which case the rules are written to file
  88.      FILE using TARGET as the target name.
  89. File: gcc.info,  Node: Running Protoize,  Prev: Environment Variables,  Up: Invoking GCC
  90. Running Protoize
  91. ================
  92.    The program `protoize' is an optional part of GNU C.  You can use it
  93. to add prototypes to a program, thus converting the program to ANSI C
  94. in one respect.  The companion program `unprotoize' does the reverse:
  95. it removes argument types from any prototypes that are found.
  96.    When you run these programs, you must specify a set of source files
  97. as command line arguments.  The conversion programs start out by
  98. compiling these files to see what functions they define.  The
  99. information gathered about a file FOO is saved in a file named `FOO.X'.
  100.    After scanning comes actual conversion.  The specified files are all
  101. eligible to be converted; any files they include (whether sources or
  102. just headers) are eligible as well.
  103.    But not all the eligible files are converted.  By default,
  104. `protoize' and `unprotoize' convert only source and header files in the
  105. current directory.  You can specify additional directories whose files
  106. should be converted with the `-d DIRECTORY' option.  You can also
  107. specify particular files to exclude with the `-x FILE' option.  A file
  108. is converted if it is eligible, its directory name matches one of the
  109. specified directory names, and its name within the directory has not
  110. been excluded.
  111.    Basic conversion with `protoize' consists of rewriting most function
  112. definitions and function declarations to specify the types of the
  113. arguments.  The only ones not rewritten are those for varargs functions.
  114.    `protoize' optionally inserts prototype declarations at the
  115. beginning of the source file, to make them available for any calls that
  116. precede the function's definition.  Or it can insert prototype
  117. declarations with block scope in the blocks where undeclared functions
  118. are called.
  119.    Basic conversion with `unprotoize' consists of rewriting most
  120. function declarations to remove any argument types, and rewriting
  121. function definitions to the old-style pre-ANSI form.
  122.    Both conversion programs print a warning for any function
  123. declaration or definition that they can't convert.  You can suppress
  124. these warnings with `-q'.
  125.    The output from `protoize' or `unprotoize' replaces the original
  126. source file.  The original file is renamed to a name ending with
  127. `.save'.  If the `.save' file already exists, then the source file is
  128. simply discarded.
  129.    `protoize' and `unprotoize' both depend on GNU CC itself to scan the
  130. program and collect information about the functions it uses. So neither
  131. of these programs will work until GNU CC is installed.
  132.    Here is a table of the options you can use with `protoize' and
  133. `unprotoize'.  Each option works with both programs unless otherwise
  134. stated.
  135. `-B DIRECTORY'
  136.      Look for the file `SYSCALLS.c.X' in DIRECTORY, instead of the
  137.      usual directory (normally `/usr/local/lib').  This file contains
  138.      prototype information about standard system functions.  This option
  139.      applies only to `protoize'.