01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

;�<br />

CC ( l ) cc (1)<br />

NAME<br />

cc - C compiler<br />

SYNOPSIS<br />

cc [ option ] . . . file<br />

DESCRIPTION<br />

Cc is the UNIX PC Portable C compiler. It accepts several types<br />

of arguments.<br />

Arguments whose names end with .c are taken to be C source programs;<br />

they are compiled, and each object program is left on the<br />

file whose name is that of the source with .o substituted for .c.<br />

The .o file is normally deleted, however, if a single C program is<br />

compiled and loaded all at once.<br />

In the same way, arguments whose names end with .s are taken to<br />

be assembly source programs and are assembled, producing a .o<br />

file.<br />

The following options are interpreted by cc. See ld(l) for link<br />

editor options and cpp(l) for more preprocessor options.<br />

-# Display without executing each command that cc generates.<br />

-c Suppress the link edit phase of the compilation, and force<br />

an object file to be produced even if only one program is<br />

compiled.<br />

-E Run only cpp(l) on the named C programs, and send the<br />

result to the standard output.<br />

-g Cause the compiler to generate additional information<br />

needed for the use of sdb(l).<br />

-ooutfile Produce an output object file named outfile. The name<br />

of the default file is a.out. This is a link editor option.<br />

-0 Invoke an object-code optimizer.<br />

-p Arrange for the compiler to produce code which counts<br />

the number of times each routine is called; also, if link<br />

editing takes place, replace the standard startoff routine<br />

by one which automatically calls monitor(3C) at the<br />

start and arranges to write out a mon.out file at normal<br />

termination of execution of the object program. An execution<br />

profile can then be generated by use of prof( !).<br />

-P Run only cpp(l) on the named C programs, and leave<br />

the result on corresponding files suffixed .i.<br />

-S Compile the named C programs, and leave the<br />

assembler-language output on corresponding files suffixed<br />

.s.<br />

-Wc,argl[,arg2 ••• ]<br />

Hand off the argument[s] argi to pass c where c is one of<br />

[p02al] indicating the preprocessor, complier, optimizer,<br />

assembler, or link editor, respectively. For example,<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!