c

cc_bundled(1)

cc_bundled(1)

(Bundled C Compiler - Limited Functionality)

NAME

cc - bundled C compiler

SYNOPSIS

cc[options] ®les

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 ®les:

.c Suffix

Arguments whose names end with .c are understood to be C source ®les. Each is compiled and the resulting object ®le is left in a ®le having the corresponding base name, .o instead of .c. However, if a single C ®le is compiled and linked, all in one step, the .o ®le is deleted.

.s Suffix

Arguments whose names end with .s are understood to be assembly source ®les and are assem- bled, producing a .o ®le for each .s ®le.

.i Suffix

Arguments whose names end with .i are assumed to be the output of cpp (see the -Poption below). They are compiled without invoking cpp (see cpp(1)). Each object ®le is left in a ®le having the corresponding base name, but suf®xed with .o instead of .i.

-lxForm

Arguments of the form -lxcause 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 -lis signi®cant. If a ®le contains an unresolved external reference, the library containing the de®nition 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.suf®xcause the linker to search the library libx.sl or libx.a (depending on suf®x) in an attempt to resolve currently unresolved external references. It is similar to the -loption except the current state of the -Wl,-aoption is not important.

Other Suffixes

All other arguments, such as those whose names end with .o or .a, are taken to be relocatable object ®les 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 ®rst 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 speci®es a directory to be used by the compiler for temporary ®les, 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) ®le to be pro-

 

duced for each .c ®le, even if only one program is compiled. Object ®les 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