home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
gnu
/
gcc-2.6.3-bin.lha
/
GNU
/
info
/
gcc.info-5
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-12-23
|
33KB
|
563 lines
This is Info file gcc.info, produced by Makeinfo-1.55 from the input
file gcc.texi.
This file documents the use and the internals of the GNU compiler.
Published by the Free Software Foundation 675 Massachusetts Avenue
Cambridge, MA 02139 USA
Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation,
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License," "Funding for
Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License," "Funding for Free Software," and "Protect Your Freedom--Fight
`Look And Feel'", and this permission notice, may be included in
translations approved by the Free Software Foundation instead of in the
original English.
File: gcc.info, Node: Environment Variables, Next: Running Protoize, Prev: Code Gen Options, Up: Invoking GCC
Environment Variables Affecting GNU CC
======================================
This section describes several environment variables that affect how
GNU CC operates. They work by specifying directories or prefixes to use
when searching for various kinds of files.
Note that you can also specify places to search using options such as
`-B', `-I' and `-L' (*note Directory Options::.). These take
precedence over places specified using environment variables, which in
turn take precedence over those specified by the configuration of GNU
CC. *Note Driver::.
`TMPDIR'
If `TMPDIR' is set, it specifies the directory to use for temporary
files. GNU CC uses temporary files to hold the output of one
stage of compilation which is to be used as input to the next
stage: for example, the output of the preprocessor, which is the
input to the compiler proper.
`GCC_EXEC_PREFIX'
If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
names of the subprograms executed by the compiler. No slash is
added when this prefix is combined with the name of a subprogram,
but you can specify a prefix that ends with a slash if you wish.
If GNU CC cannot find the subprogram using the specified prefix, it
tries looking in the usual places for the subprogram.
The default value of `GCC_EXEC_PREFIX' is
`PREFIX/lib/gcc-lib/MACHINE/VERSION/' where PREFIX is the value of
`prefix' when you ran the `configure' script and MACHINE and
VERSION are the configuration name and version number of GNU CC,
respectively.
Other prefixes specified with `-B' take precedence over this
prefix.
This prefix is also used for finding files such as `crt0.o' that
are used for linking.
In addition, the prefix is used in an unusual way in finding the
directories to search for header files. For each of the standard
directories whose name normally begins with
`/usr/local/lib/gcc-lib' (more precisely, with the value of
`GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
specified prefix to produce an alternate directory name. Thus,
with `-Bfoo/', GNU CC will search `foo/bar' where it would
normally search `/usr/local/lib/bar'. These alternate directories
are searched first; the standard directories come next.
`COMPILER_PATH'
The value of `COMPILER_PATH' is a colon-separated list of
directories, much like `PATH'. GNU CC tries the directories thus
specified when searching for subprograms, if it can't find the
subprograms using `GCC_EXEC_PREFIX'.
`LIBRARY_PATH'
The value of `LIBRARY_PATH' is a colon-separated list of
directories, much like `PATH'. GNU CC tries the directories thus
specified when searching for special linker files, if it can't
find them using `GCC_EXEC_PREFIX'. Linking using GNU CC also uses
these directories when searching for ordinary libraries for the
`-l' option (but directories specified with `-L' come first).
`C_INCLUDE_PATH'
`CPLUS_INCLUDE_PATH'
`OBJC_INCLUDE_PATH'
These environment variables pertain to particular languages. Each
variable's value is a colon-separated list of directories, much
like `PATH'. When GNU CC searches for header files, it tries the
directories listed in the variable for the language you are using,
after the directories specified with `-I' but before the standard
header file directories.
`DEPENDENCIES_OUTPUT'
If this variable is set, its value specifies how to output
dependencies for Make based on the header files processed by the
compiler. This output looks much like the output from the `-M'
option (*note Preprocessor Options::.), but it goes to a separate
file, and is in addition to the usual results of compilation.
The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
which case the Make rules are written to that file, guessing the
target name from the source file name. Or the value can have the
form `FILE TARGET', in which case the rules are written to file
FILE using TARGET as the target name.
File: gcc.info, Node: Running Protoize, Prev: Environment Variables, Up: Invoking GCC
Running Protoize
================
The program `protoize' is an optional part of GNU C. You can use it
to add prototypes to a program, thus converting the program to ANSI C
in one respect. The companion program `unprotoize' does the reverse:
it removes argument types from any prototypes that are found.
When you run these programs, you must specify a set of source files
as command line arguments. The conversion programs start out by
compiling these files to see what functions they define. The
information gathered about a file FOO is saved in a file named `FOO.X'.
After scanning comes actual conversion. The specified files are all
eligible to be converted; any files they include (whether sources or
just headers) are eligible as well.
But not all the eligible files are converted. By default,
`protoize' and `unprotoize' convert only source and header files in the
current directory. You can specify additional directories whose files
should be converted with the `-d DIRECTORY' option. You can also
specify particular files to exclude with the `-x FILE' option. A file
is converted if it is eligible, its directory name matches one of the
specified directory names, and its name within the directory has not
been excluded.
Basic conversion with `protoize' consists of rewriting most function
definitions and function declarations to specify the types of the
arguments. The only ones not rewritten are those for varargs functions.
`protoize' optionally inserts prototype declarations at the
beginning of the source file, to make them available for any calls that
precede the function's definition. Or it can insert prototype
declarations with block scope in the blocks where undeclared functions
are called.
Basic conversion with `unprotoize' consists of rewriting most
function declarations to remove any argument types, and rewriting
function definitions to the old-style pre-ANSI form.
Both conversion programs print a warning for any function
declaration or definition that they can't convert. You can suppress
these warnings with `-q'.
The output from `protoize' or `unprotoize' replaces the original
source file. The original file is renamed to a name ending with
`.save'. If the `.save' file already exists, then the source file is
simply discarded.
`protoize' and `unprotoize' both depend on GNU CC itself to scan the
program and collect information about the functions it uses. So
neither of these prog