Commit | Line | Data |
---|---|---|
ee16d671 BJ |
1 | .TH CC 1 "VAX/11" |
2 | .SH NAME | |
3 | cc \- C compiler | |
4 | .SH SYNOPSIS | |
5 | .B cc | |
6 | [ option ] ... file ... | |
7 | .SH DESCRIPTION | |
8 | .I Cc | |
9 | is the UNIX C compiler. | |
10 | It accepts several types of arguments: | |
11 | .PP | |
12 | Arguments whose names end with `.c' are taken to be | |
13 | C source programs; they are compiled, and | |
14 | each object program is left on the file | |
15 | whose name is that of the source with `.o' substituted | |
16 | for `.c'. | |
17 | The `.o' file is normally deleted, however, if a single | |
18 | C program is compiled and loaded all at one go. | |
19 | .PP | |
20 | In the same way, | |
21 | arguments whose names end with `.s' are taken to be assembly source programs | |
22 | and are assembled, producing a `.o' file. | |
23 | .PP | |
24 | The following options are interpreted by | |
25 | .IR cc . | |
26 | See | |
27 | .IR ld (1) | |
28 | for load-time options. | |
29 | .TP 8 | |
30 | .B \-c | |
31 | Suppress the loading phase of the compilation, and force | |
32 | an object file to be produced even if only one program is compiled. | |
33 | .TP | |
34 | .B \-g | |
35 | Have the compiler produce additional symbol table information | |
36 | for | |
37 | .IR sdb (1). | |
38 | Also pass the | |
39 | .B \-lg | |
40 | flag to | |
41 | .IR ld (1). | |
42 | .TP | |
43 | .B \-w | |
44 | Suppress warning diagnostics. | |
45 | .TP | |
46 | .B \-z | |
47 | Create load-on-demand format output (an | |
48 | .IR ld (1) | |
49 | flag); | |
50 | this is important to specify when loading certain very large programs. | |
51 | See | |
52 | .IR ld (1). | |
53 | .TP | |
54 | .B \-p | |
55 | Arrange for the compiler to produce code | |
56 | which counts the number of times each routine is called; | |
57 | also, if loading takes place, replace the standard startup | |
58 | routine by one which automatically calls | |
59 | .IR monitor (3) | |
60 | at the start and arranges to write out a | |
61 | .I mon.out | |
62 | file at normal termination of execution of the object program. | |
63 | An execution profile can then be generated by | |
64 | use of | |
65 | .IR prof (1). | |
66 | .TP | |
67 | .SM | |
68 | .B \-O | |
69 | Invoke an | |
70 | object-code improver. | |
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 | .BI \-o " output" | |
84 | Name the final output file | |
85 | .IR output . | |
86 | If this option is used the file `a.out' will be left undisturbed. | |
87 | .TP | |
88 | .BI \-D name=def | |
89 | .br | |
90 | .ns | |
91 | .TP | |
92 | .SM | |
93 | .BI \-D \*Sname | |
94 | Define the | |
95 | .I name | |
96 | to the preprocessor, | |
97 | as if by | |
98 | `#define'. | |
99 | If no definition is given, the name is defined as "1". | |
100 | .TP | |
101 | .SM | |
102 | .BI \-U \*Sname | |
103 | Remove any initial definition of | |
104 | .IR name . | |
105 | .TP | |
106 | .SM | |
107 | .BI \-I \*Sdir | |
108 | `#include' files | |
109 | whose names do not begin with `/' are always | |
110 | sought first in the directory | |
111 | of the | |
112 | .I file | |
113 | argument, | |
114 | then in directories named in | |
115 | .B \-I | |
116 | options, | |
117 | then in directories on a standard list. | |
118 | .TP | |
119 | .SM | |
120 | .BI \-B \*Sstring | |
121 | Find substitute compiler passes in the files named | |
122 | .I string | |
123 | with the suffixes cpp, ccom and c2. | |
124 | If | |
125 | .I string | |
126 | is empty, use a standard backup version. | |
127 | .TP | |
128 | .BR \-t [ p012 ] | |
129 | Find only the designated compiler passes in the | |
130 | files whose names are constructed by a | |
131 | .B \-B | |
132 | option. | |
133 | In the absence of a | |
134 | .B \-B | |
135 | option, the | |
136 | .I string | |
137 | is taken to be `/usr/c/'. | |
138 | .PP | |
139 | Other arguments | |
140 | are taken | |
141 | to be either loader option arguments, or C-compatible | |
142 | object programs, typically produced by an earlier | |
143 | .I cc | |
144 | run, | |
145 | or perhaps libraries of C-compatible routines. | |
146 | These programs, together with the results of any | |
147 | compilations specified, are loaded (in the order | |
148 | given) to produce an executable program with name | |
149 | .B a.out. | |
150 | .SH FILES | |
151 | .ta \w'/usr/c/occom 'u | |
152 | file.c input file | |
153 | .br | |
154 | file.o object file | |
155 | .br | |
156 | a.out loaded output | |
157 | .br | |
158 | /tmp/ctm? temporary | |
159 | .br | |
160 | /lib/cpp preprocessor | |
161 | .br | |
162 | /lib/ccom compiler | |
163 | .br | |
164 | /usr/c/occom backup compiler | |
165 | .br | |
166 | /usr/c/ocpp backup preprocessor | |
167 | .br | |
168 | /lib/c2 optional optimizer | |
169 | .br | |
170 | /lib/crt0.o runtime startoff | |
171 | .br | |
172 | /lib/mcrt0.o startoff for profiling | |
173 | .br | |
174 | /lib/lib[ac].a standard libraries, see (3) | |
175 | .br | |
176 | /usr/include standard directory for `#include' files | |
177 | .SH "SEE ALSO" | |
178 | B. W. Kernighan and D. M. Ritchie, | |
179 | .I The C Programming Language, | |
180 | Prentice-Hall, | |
181 | 1978 | |
182 | .br | |
183 | B. W. Kernighan, | |
184 | .I | |
185 | Programming in C\(ema tutorial | |
186 | .br | |
187 | D. M. Ritchie, | |
188 | .I | |
189 | C Reference Manual | |
190 | .br | |
191 | monitor(3), prof(1), adb(1), ld(1), sdb(1) | |
192 | .SH DIAGNOSTICS | |
193 | The diagnostics produced by C itself are intended to be | |
194 | self-explanatory. | |
195 | Occasional messages may be produced by the assembler | |
196 | or loader. |