HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

c
cc_bundled_pa(1)
For PA-RISC Systems
cc_bundled_pa(1)
(Bundled C Compiler - Limited Functionality)
NAME
cc_bundled_pa: cc - bundled C compiler
SYNOPSIS
cc [options ] files
DESCRIPTION
This manpage describes the Bundled C compiler. See cc(1), online only, for a description of the ANSI-
compliant HP-UX manual page.
This
cc accepts several types of arguments as files:
.c Suffix Arguments whose names end with .c
are understood to be C source files. Each is com-
piled and the resulting object file is left in a file having the corresponding base name,
.o
instead of .c. However, if a single C file is compiled and linked, all in one step, the
.o
file is deleted.
.s Suffix Arguments whose names end with
.s are understood to be assembly source files and are
assembled, producing a
.o file for each
.s file.
.i Suffix Arguments whose names end with
.i are assumed to be the output of cpp (see the -P
option below). They are compiled without invoking
cpp (see cpp(1)). Each object file is
left in a file having the corresponding base name, but suffixed with
.o instead of .i.
-lx Form Arguments of the form -lx cause the linker to search the library
libx.sl or libx.a in
an attempt to resolve currently unresolved external references. Because a library is
searched when its name is encountered, placement of a
-l is significant. If a file con-
tains an unresolved external reference, the library containing the definition must be
placed after the file on the command line. See ld(1) for further details.
-l:libx.suffix Form
Arguments of the form -l:libx.suffix cause the linker to search the library
libx.sl
or libx.a (depending on suffix) in an attempt to resolve currently unresolved external
references. It is similar to the -l option except the current state of the -Wl,-a option is
not important.
Other Suffixes All other arguments, such as those whose names end with
.o or .a, are taken to be relo-
catable object files that are to be included in the link operation.
Arguments and options can be passed to the compiler through the
CCOPTS environment variable as well
as on the command line. The compiler reads the value of CCOPTS and divides these options into two sets;
options that appear before a vertical bar (|), and options that appear after the vertical bar. The first set
of options are placed before any of the command-line parameters to cc; the second set of options are
placed after the command-line parameters to cc. If the vertical bar is not present, all options are placed
before the command-line parameters. For example (in sh(1) notation),
CCOPTS="-v -lmalloc"
export CCOPTS
cc -w prog.c
is equivalent to
cc -v -w prog.c -lmalloc
When set, the TMPDIR environment variable specifies a directory to be used by the compiler for tem-
porary files, overriding the default directory /var/tmp.
Options
The following options are the only options which are recognized by the bundled C compiler.
-c Suppress the link edit phase of the compilation, and force an object (.o) file to be
produced for each .c file, even if only one program is compiled. Object files pro-
duced from C programs must be linked before being executed.
-C Prevent the preprocessor from stripping C-style comments. See cpp(1) for details.
-Dname=def Define name to the preprocessor, as if by ’#define’. See cpp(1) for details.
-Dname
-E Run only cpp on the named C or assembly files, and send the result to the standard
output.
Section 1−−74 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: September 2004