1 .\" $Id: cc.1,v 1.16 2010/04/05 14:24:06 reed Exp $
5 .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net>
7 .\" Permission to use, copy, modify, and/or distribute this software for any
8 .\" purpose with or without fee is hereby granted, provided that the above
9 .\" copyright notice and this permission notice appear in all copies.
11 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
12 .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
14 .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15 .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16 .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
17 .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
20 .Dd September 14, 2007
25 .Nd front-end to the C compiler
39 .Op Fl D Ar macro[=value]
42 .Op Fl include Ar path
43 .Op Fl isystem Ar path
50 utility provides a front-end to the
51 .Dq portable C compiler .
52 Multiple files may be given on the command line.
53 Unrecognized options are all sent directly to
56 .\" Brief description of its syntax:
57 Filenames that end with
68 Filenames that end with
77 Filenames that end with
84 Filenames that end with
93 Filenames that end with
95 are passed directly to
99 The options are as follows:
102 Define alternate prefix path for
109 .\" TODO: provide an example of -B
113 preprocessor to not discard comments.
115 Only compile or assemble and then stop.
117 The resulting object output is saved
123 Note: cannot be combined with
125 if multiple files are given.
126 .It Fl D Ar macro[=value]
129 preprocessor to define
135 .\" TODO: what is as -dfoo for?
137 Stop after preprocessing with
139 Do not compile, assemble, or link.
140 Output is sent to standard output unless the
145 .\" TODO: document about avoiding machine-specific maximum size?
147 Tells C compiler to generate PIC code
148 and tells assembler that PIC code has been generated.
149 .\" TODO: document difference between PIC and pic
150 .\" other -f GCC compatibility flags are ignored for now
156 to create debug output.
163 preprocessor to add header search directory to override system defaults.
164 .It Fl include Ar file
167 preprocessor to include the
169 during preprocessing.
170 .It Fl isystem Ar path
173 as a system header directory for the
188 to generate dependencies for
191 Target-dependent option.
192 .Bl -tag -width PowerPC
194 \-mlittle-endian \-mbig-endian \-mfpe=fpa \-mfpe=vpf \-msoft-float \-march=armv1 \-march=armv2 \-march=armv2a \-march=armv3 \-march=armv4 \-march=armv4t \-march=armv4tej \-march=armv5 \-march=armv6 \-march=armv6t2 \-march=armv6kz \-march=armv6k \-march=armv7
198 \-mlittle-endian \-mbig-endian \-mhard-float \-msoft-float
205 Do not link with the system startup files (crt0.c, etc.)
207 Do not use the system include paths (/usr/include, etc.)
209 Do not link with the system C library (libc).
210 .\" implies -nostartfiles ??
212 Enable optimizations.
219 Note: this is unset if the
227 .\" TODO: what is this?
228 .\" TODO: Looks like it does cpp only, but I couldn't get it to work for me.
230 Enable profiling on the generated executable.
234 preprocessor directive for
242 Stop after compilation by
244 Do not assemble and do not link.
245 The resulting assembler-language output is saved
251 Note: cannot be combined with
253 if multiple files are given.
255 Do not use dynamic linkage.
256 By default, it will link using the dynamic linker options
257 and/or shared objects for the platform.
259 Create a shared object of the result. Tells the linker not to
260 generate an executable.
266 for traditional C preprocessor syntax.
270 preprocessor to remove the initial macro definition.
272 Outputs the version of
274 and shows what commands will be run with their command line arguments.
276 Options for the linker.
277 .\" what is ignored? llist?
279 Don't remove temporary files on exit.
281 May be used to give separate optimization flags to ccom, see
285 Gcc compatibility option; specify that the language in use is
288 .Ss Predefined Macros
290 macros are predefined by
296 .\" .It __ASSEMBLER__
297 .\" Defined if suffix is .S -- why not with .s? what does this mean?
299 Set to the major version of
301 These macros can be used to select code based on
308 Set to the minor version.
309 .It __PCC_MINORMINOR__
310 Set to the minor-minor version \(em the number after the minor version.
317 Also system- and/or machine-dependent macros may also be predefined;
331 command comes from the original Portable C Compiler by S. C. Johnson,
332 written in the late 70's.
334 This product includes software developed or owned by Caldera