Annotation of cci/usr/src/man/man1/cc.1, revision 1.1.1.2

1.1       root        1: .TH CC 1 "4 May 1984"
                      2: .UC 4
                      3: .SH NAME
                      4: cc \- C compiler
                      5: .SH SYNOPSIS
                      6: .B cc
                      7: [ option ] ... file ...
                      8: .SH DESCRIPTION
                      9: .I Cc
                     10: is the UNIX C compiler.
                     11: .I Cc
                     12: accepts several types of arguments:
                     13: .PP
                     14: Arguments whose names end with `.c' are taken to be
                     15: C source programs; they are compiled, and
                     16: each object program is left on the file
                     17: whose name is that of the source with `.o' substituted
                     18: for `.c'.
                     19: The `.o' file is normally deleted, however, if a single
                     20: C program is compiled and loaded all at one go.
                     21: .PP
                     22: In the same way,
                     23: arguments whose names end with `.s' are taken to be assembly source programs
                     24: and are assembled, producing a `.o' file.
                     25: .PP
                     26: The following options are interpreted by
                     27: .IR cc .
                     28: See
                     29: .IR ld (1)
                     30: for load-time options.
                     31: .TP 8
                     32: .B \-c
                     33: Suppress the loading phase of the compilation, and force
                     34: an object file to be produced even if only one program is compiled.
                     35: .TP
                     36: .B \-g
                     37: Have the compiler produce additional symbol table information
                     38: for the debugger
                     39: .IR cdb (1).
                     40: .TP
                     41: .B \-go
                     42: Have the compiler produce a shorter version of the additional symbol
                     43: table information
                     44: .TP
                     45: .B \-w
                     46: Suppress warning diagnostics.
                     47: .TP
                     48: .B \-p
                     49: Arrange for the compiler to produce code
                     50: which counts the number of times each routine is called.
                     51: If loading takes place, replace the standard startup
                     52: routine by one which automatically calls
                     53: .IR monitor (3)
                     54: at the start and arranges to write out a
                     55: .I mon.out
                     56: file at normal termination of execution of the object program.
                     57: An execution profile can then be generated by
                     58: use of
                     59: .IR  prof (1).
                     60: .TP
                     61: .SM
                     62: .B \-O
                     63: Invoke an
                     64: object-code improver.
                     65: .TP
                     66: .SM
                     67: .B \-R
                     68: Passed on to
                     69: .I as,
                     70: making initialized variables shared and read-only.
                     71: .TP
                     72: .SM
                     73: .B \-S
                     74: Compile the named C programs, and leave the
                     75: assembler-language output on corresponding files suffixed `.s'.
                     76: .TP
                     77: .SM
                     78: .B \-E
                     79: Run only the macro preprocessor
                     80: on the named C programs, and send the result to the
                     81: standard output.
                     82: .TP
                     83: .SM
                     84: .B \-C
                     85: prevent the macro preprocessor from eliminating comments.
                     86: .TP
                     87: .BI \-o " output"
                     88: Passed on to
                     89: .I ld,
                     90: to name the final output file
                     91: .IR output .
                     92: If this option is used the file `a.out' will be left undisturbed.
                     93: .TP
                     94: .BI \-l \*Sxx
                     95: Passed on to
                     96: .I ld,
                     97: to load the library
                     98: .I libxx.a
1.1.1.2 ! root       99: from /lib or /usr/lib into the executable file; an example is
        !           100: `-lm' for the mathematical library.
1.1       root      101: .TP
                    102: .BI \-d \*Sn
                    103: Passed on to
                    104: .I as,
                    105: causing external references to occupy only
                    106: .I n
                    107: bytes, where
                    108: .I n
                    109: is 1, 2 or 4 (default).
                    110: .TP
                    111: .BI \-P
                    112: Passed on to
                    113: .I as,
                    114: to print a listing of the generated machine code into the standard output.
                    115: .TP
                    116: .BI \-L
                    117: Insert the C source line as comments in the `.s' file.
                    118: This option turns off -O.
                    119: .TP
                    120: .SM
                    121: .BI \-D name=def
                    122: .br
                    123: .ns
                    124: .TP
                    125: .SM
                    126: .BI \-D \*Sname
                    127: Define the
                    128: .I name
                    129: to the preprocessor,
                    130: as if by
                    131: `#define'.
                    132: If no definition is given, the name is defined as "1".
                    133: The macro preprocessor predefines `tahoe' (equivalent to
                    134: `-Dtahoe').
                    135: .TP
                    136: .SM
                    137: .BI \-U \*Sname
                    138: Remove any initial definition of
                    139: .IR name .
                    140: .TP
                    141: .SM
                    142: .BI \-I \*Sdir
                    143: `#include' files
                    144: whose names do not begin with `/' are always
                    145: sought first in the directory 
                    146: of the
                    147: .I file
                    148: argument,
                    149: then in directories named in 
                    150: .B \-I
                    151: options,
                    152: then in directories on a standard list.
                    153: .TP
                    154: .SM
                    155: .BI \-B \*Sstring
                    156: Find substitute compiler passes in the files named
                    157: .I string
                    158: with the suffixes cpp, ccom and c2.
                    159: If 
                    160: .I string 
                    161: is empty, use a standard backup version.
                    162: .TP
                    163: .BR \-t [ p012 ]
                    164: Find only the designated compiler passes in the
                    165: files whose names are constructed by a
                    166: .B \-B
                    167: option.
                    168: In the absence of a
                    169: .B \-B 
                    170: option, the
                    171: .I string
                    172: is taken to be `/lib/o'.
                    173: .PP
                    174: Other arguments
                    175: are taken
                    176: to be either loader option arguments, or C-compatible
                    177: object programs, typically produced by an earlier
                    178: .I cc
                    179: run,
                    180: or perhaps libraries of C-compatible routines.
                    181: These programs, together with the results of any
                    182: compilations specified, are loaded (in the order
                    183: given) to produce an executable program with name
                    184: .B a.out.
                    185: .SH FILES
                    186: .ta \w'/usr/lib/libc_p.a  'u
                    187: file.c input file
                    188: .br
                    189: file.o object file
                    190: .br
                    191: a.out  loaded output
                    192: .br
                    193: /tmp/cct?      temporary
                    194: .br
                    195: /lib/cpp       preprocessor
                    196: .br
                    197: /lib/ccom      compiler
                    198: .br
                    199: /lib/c2        optional optimizer
                    200: .br
                    201: /lib/crt0.o    runtime startoff
                    202: .br
                    203: /lib/mcrt0.o   startoff for profiling
                    204: .br
                    205: /usr/bin/alist merging program for -L
                    206: .br
                    207: /lib/libc.a    standard library, see
                    208: .IR intro (3)
                    209: .br
                    210: /usr/lib/libc_p.a      profiling library, see
                    211: .IR intro (3)
                    212: .br
                    213: /usr/include   standard directory for `#include' files
                    214: .br
                    215: mon.out        file produced for analysis by
                    216: .IR prof (1)
                    217: .SH "SEE ALSO"
                    218: B. W. Kernighan and D. M. Ritchie,
                    219: .I The C Programming Language,
                    220: Prentice-Hall,
                    221: 1978
                    222: .br
                    223: B. W. Kernighan,
                    224: .I
                    225: Programming in C\(ema tutorial
                    226: .br
                    227: D. M. Ritchie,
                    228: .I
                    229: C Reference Manual
                    230: .br
                    231: monitor(3), prof(1), adb(1), ld(1), cdb(1), as(1)
                    232: .SH DIAGNOSTICS
                    233: The diagnostics produced by C itself are intended to be
                    234: self-explanatory.
                    235: Occasional messages may be produced by the assembler
                    236: or loader.
                    237: .SH BUGS
                    238: The compiler currently ignores advice to put 
                    239: \fBchar\fR, \fBunsigned char\fR,
                    240: \fBshort\fR or \fBunsigned short\fR variables in registers.
                    241: .PP
                    242: The current version generate emulated code for floating point operations;
                    243: due to the size of the emulator, the standard I/O library is loaded without
                    244: it, and the `-lf' flag is needed for programs that produce floating point
                    245: output.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.