BBS水木清华站∶精华区
OVERALL OPTIONS
-x language
Specify explicitly the language for the following
input files (rather than choosing a default based
on the file name suffix) . This option applies to
all following input files until the next `-x' op-
tion. Possible values of language are `c',
`objective-c', `c-header', `c++', `cpp-output',
`assembler', and `assembler-with-cpp'.
-x none
Turn off any specification of a language, so that
subsequent files are handled according to their
file name suffixes (as they are if `-x' has not
been used at all).
If you want only some of the four stages (preprocess, com-
pile, assemble, link), you can use `-x' (or filename suf-
fixes) to tell gcc where to start, and one of the options
`-c', `-S', or `-E' to say where gcc is to stop. Note
that some combinations (for example, `-x cpp-output -E')
instruct gcc to do nothing at all.
-c Compile or assemble the source files, but do not
link. The compiler output is an object file corre-
sponding to each source file.
By default, GCC makes the object file name for a
source file by replacing the suffix `.c', `.i',
`.s', etc., with `.o'. Use -o to select another
name.
GCC ignores any unrecognized input files (those
that do not require compilation or assembly) with
the -c option.
-S Stop after the stage of compilation proper; do not
assemble. The output is an assembler code file for
each non-assembler input file specified.
By default, GCC makes the assembler file name for a
source file by replacing the suffix `.c', `.i',
etc., with `.s'. Use -o to select another name.
GCC ignores any input files that don't require com-
pilation.
-E Stop after the preprocessing stage; do not run the
compiler proper. The output is preprocessed source
code, which is sent to the standard output.
GCC ignores input files which don't require prepro-
cessing.
-o file
Place output in file file. This applies regardless
to whatever sort of output GCC is producing,
whether it be an executable file, an object file,
an assembler file or preprocessed C code.
Since only one output file can be specified, it
does not make sense to use `-o' when compiling more
than one input file, unless you are producing an
executable file as output.
If you do not specify `-o', the default is to put
an executable file in `a.out', the object file for
`source.suffix' in `source.o', its assembler file
in `source.s', and all preprocessed C source on
standard output.
-v Print (on standard error output) the commands exe-
cuted to run the stages of compilation. Also print
the version number of the compiler driver program
and of the preprocessor and the compiler proper.
-pipe Use pipes rather than temporary files for communi-
cation between the various stages of compilation.
This fails to work on some systems where the assem-
bler cannot read from a pipe; but the GNU assembler
has no trouble.
BBS水木清华站∶精华区