Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
c
cc_bundled(1) cc_bundled(1)
(Bundled C Compiler - Limited Functionality)
NAME
cc - bundled C compiler
SYNOPSIS
cc [options] files
DESCRIPTION
This manual page 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 compiled 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 assem-
bled, 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 lib
x.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 contains an unresolved exter-
nal reference, the library containing the definition must be placed after the le 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 lib
x.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 relocatable
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 temporary
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 pro-
duced for each .c file, even if only one program is compiled. Object files produced
from C programs must be linked before being executed.
-C Prevent the preprocessor from stripping C-style comments. See cpp(1) for details.
Section 162 1 HP-UX Release 11i: December 2000
___
___