General Options

-#

Displays each command line to call the compiler, assembler, linker, etc. for processing the input files, without invoking the tools. Same as -dryrun.

@file

Invokes the driver to read options from the named file, separated by spaces, tabs and newlines. All other characters in the file are literal. Note that linker directive files should be passed to the linker by using a known suffix, such as .lnk or .lx, rather than using the @ syntax.

-archive

Invokes the librarian to generate an archive instead of invoking the linker to generate an executable program. This option must be used with the -o filename option, and the suffix of the output filename must be .a. For example:

% ccmcore foo.c -archive -o libfoo.a

-c

Generates only a relocatable object file for each source input file with a filename of filename.o.

-dryrun

Displays the command line to call the compiler, assembler, linker, etc. for processing the input files, without invoking them. See also -v and -#.

-errmax=n

Limits the number of error messages the compiler prints before quitting to n. The default is 100 and the minimum is two.

-fnone

Emits an error when the source file makes use of the floating point. This option also implies -nofloatio. See "Reducing Program Size".

-H

Displays a list of files opened by an #include directive. The output goes to stderr rather than stdout. This option corresponds to the following: click on Options, click Advanced..., select Show Headers.

-Help

Displays to the standard error a detailed list of the compiler driver options to the standard output. The compiler driver ignores all other arguments.

-help

Displays a list of most of the compiler driver options to the standard output. The compiler driver ignores all other arguments.

-I-

The -I- option effects the way #include "file.h" and
#include <system.h> are handled. For example, if both #include directives appear in source.c and -Ihere and -Ithere are both on the command line, then the compiler first searches for file.h in the directory containing source.c. Then, it will search in 'here', and 'there'. The compiler with search for system.h in 'here', and 'there' only.

If the -I- option is added to the command line like this:

-Ihere -I- -Ithere

then the compiler will search for file.h in 'here', and 'there', and the compiler will search for system.h in 'there' only.

-I- causes the compiler to search for files specified with "" in all of the directories listed with -Idir on the command line, but not in the directory containing the source file. Furthermore, -I- causes the compiler to search for files specified with <> only in the

directories listed with -Idir _after_ the -I- option on the command line.

Use the -I option to avoid a fundamental problem with the #include " " directive. In large programming projects, you may make local copies of either source files or header files. If you have a local copy of a header file but do not have a local copy of all source files that include that header file with #include " ", then the local header file will not always be used. To solve this:

Does not delete temporary files after they are used, including the .s files. If you want to generate the .s file in the current directory and not have it deleted, use the -S option. Equivalent to MULTI Builder's "Keep Temp Files" option in the Advanced Options window.

-language=cxx

-language=fortran

Informs the driver of all of the languages which are in use in the program being linked. This option may be specified once for each language. The driver always assumes that at least some files are written in C or assembly language, but it needs to know if any files contain C++ or FORTRAN in order to select the correct libraries and perform any special processing at link time. If C++ or FORTRAN source files appear on the command line, the driver automatically sets this option. If only object files and libraries are on the command line, this option is required.

-ident=string

Passes the arbitrary string, string, to the object file. This is the same as using #pragma ident "string" in C. This can be used to place the date of the source file in the object file.

-o filename

Names the output file of the current driver command. In the simplest case, the linker output file will be named filename. If another file is generated from the linker output file, such as an S-Record file, the -o determines the name of the other file as well. If only one source file is named, -o can be used with either the -S or -c option to name the output of the compiler or assembler. The driver enforces certain suffixes for some types of output files.

-object_dir=foobar

foobar is a directory, often a subdirectory of the current working directory. The driver puts object files there, along with assembly listings, debug information files, inliner files, and other intermediate files which have the same basename as the object file but with a different suffix. Note that the output of the linker and the output of the archiver is never put into object_dir.

-passsource

When used with -S, it interleaves your original source code with the generated assembly code. Not every line of the original source code will appear in the output.

-pg

Generates code to collect extended profiling information for use with MULTI. This option functions similarly to the -p option, except that a call graph report can be produced with the additional information.

-prefixed_msgs

Inserts the words WARNING and ERROR before every warning and error message encountered during compilation. The following Utility Programs support this option: gbincmp, gnm, gstrip, gsrec, and mtrans.

--prelink_objects

Causes the driver to invoke the C++ prelink utility to instantiate templates but not to invoke the linker or archiver. The effect is similar to -c in that only object files are created, but no link is performed. The difference is that the object files contain all template instantiations required by this set of object files. Therefore, they can be linked later without concern for template requirements. --prelink_objects should not be used with any options that prevent the linker from running, such as -E, -P, -S, or -c, nor with the option -template=no_auto_instantiation, which prevents running prelink.

-S

Produces only an assembly file from the source file. For each source language file specified, compile the file into an assembly language output file. The default output filename is basename.s unless -o is used.

-stderr=file

Redirects all warning and error messages into the named file.

-shared

Produce a shared object instead of an executable.

-syntax

Checks syntax but does not generate code.

-T

Truncates all symbol names to eight characters for compatibility with older UNIX compilers and linkers that require this option. This option may affect debugging symbols longer than eight characters.

-V

Causes various programs to print their copyright banner and version number as they are invoked.

-v

Displays the compiler driver command lines to invoke the compiler, assembler, and/or linker as they are executed. See also -dryrun and -#.

-Wx,args

Passes options args to the tool specified by the x argument as follows. The following list describes valid values for x. The first value in the list is the number zero, not the uppercase letter "O".

0 All compilers

2 Compiler but not inliner

L Librarian

C C compiler

F FORTRAN compiler

a Assembler

l Linker

S Linker
Like -Wl, but places arguments before any files in the link line. See -lnk=.

-w

Suppresses compiler warning diagnostics.

-Yx,directory

Specifies the directory containing the executable designated by the x option. Valid options are as follows, with the first argument in the list being the number zero, not the uppercase letter "O":

0 Contains the compiler executable.

I The default directory to search for #include files. The compiler driver will not search the standard Green Hills include directories.

L Specifies the linker's primary search directory.

S Contains the startup module or modules such as crt0.o.

U The secondary default library search directory for the linker.

a Contains the assembler executable.

l Contains the linker executable.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.