Quick Search:

Mode

Context

Displaying the whole file. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.40
 
1.41
 
MAIN:plunky:20140620073314
 
cc.1
_>11 .\"     $Id$
 22 .\"
 33 .\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net>
 44 .\"
 55 .\" Permission to use, copy, modify, and/or distribute this software for any
 66 .\" purpose with or without fee is hereby granted, provided that the above
 77 .\" copyright notice and this permission notice appear in all copies.
 88 .\"
 99 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
 1010 .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
 1111 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
 1212 .\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
 1313 .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
 1414 .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 1515 .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
 1616 .\" THIS SOFTWARE.
 1717 .\"
 1818 .Dd September 12, 2012
 1919 .Dt CC 1
 2020 .Os
 2121 .Sh NAME
 2222 .Nm cc
 2323 .Nd front-end to the C compiler
 2424 .Sh SYNOPSIS
 2525 .Nm
 2626 .Op Fl cEgkMPStvX
 2727 .Op Fl B Ns Ar prefix
 2828 .Op Fl D Ar macro Ns Oo = Ns Ar value Oc
<> 29+.Op Fl d Ns Ar flags
2930 .Op Fl f Ns Ar feature
 3031 .Op Fl I Ar path
 3132 .Op Fl include Ar file
 3233 .Op Fl isystem Ar path
 3334 .Op Fl L Ns Ar path
 3435 .Op Fl m Ns Ar option
 3536 .Op Fl nodefaultlibs
 3637 .Op Fl nostartfiles
 3738 .Op Fl nostdinc
 3839 .Op Fl nostdlib
 3940 .Op Fl O Ns Oo Ar level Oc
 4041 .Op Fl o Ar outfile
 4142 .Op Fl pg
 4243 .Op Fl pthread
 4344 .Op Fl shared
 4445 .Op Fl static
 4546 .Op Fl U Ar macro
 4647 .Op Fl Wa Ns , Ns Ar options
 4748 .Op Fl Wc Ns , Ns Ar options
 4849 .Op Fl Wl Ns , Ns Ar options
 4950 .Op Fl Wp Ns , Ns Ar options
 5051 .Op Fl x Ar language
 5152 .Op Ar
 5253 .Sh DESCRIPTION
 5354 The
 5455 .Nm
 5556 utility provides a front-end to the
 5657 .Dq portable C compiler .
 5758 Multiple files may be given on the command line.
 5859 Unrecognized options are all sent directly to
 5960 .Xr ld 1 .
 6061 .Pp
 6162 .\" Brief description of its syntax:
 6263 Filenames that end with
 6364 .Sy \&.c
 6465 are passed via
 6566 .Xr cpp 1
 6667 \(->
 6768 .Xr ccom 1
 6869 \(->
 6970 .Xr as 1
 7071 \(->
 7172 .Xr ld 1 .
 7273 .Pp
 7374 Filenames that end with
 7475 .Sy \&.i
 7576 are passed via
 7677 .Xr ccom 1
 7778 \(->
 7879 .Xr as 1
 7980 \(->
 8081 .Xr ld 1 .
 8182 .Pp
 8283 Filenames that end with
 8384 .Sy \&.s
 8485 are passed via
 8586 .Xr as 1
 8687 \(->
 8788 .Xr ld 1 .
 8889 .Pp
 8990 Filenames that end with
 9091 .Sy \&.S
 9192 are passed via
 9293 .Xr cpp 1
 9394 \(->
 9495 .Xr as 1
 9596 \(->
 9697 .Xr ld 1 .
 9798 .Pp
 9899 Filenames that end with
 99100 .Sy \&.o
 100101 are passed directly to
 101102 .Xr ld 1 .
 102103 .Pp
 103104 .\"
 104105 The options are as follows:
 105106 .Bl -tag -width Ds
 106107 .It Fl B Ns Ar prefix
 107108 Define alternate prefix path for
 108109 .Xr cpp 1 ,
 109110 .Xr ccom 1 ,
 110111 .Xr as 1 ,
 111112 or
 112113 .Xr ld 1
 113114 executables.
 114115 .\" TODO: provide an example of -B
 115116 .It Fl C
 116117 Passed to the
 117118 .Xr cpp 1
 118119 preprocessor to not discard comments.
 119120 .It Fl c
 120121 Stop after generating object code with
 121122 .Xr as 1 .
 122123 Do not link.
 123124 The resulting object output is saved
 124125 as a filename with a
 125126 .Dq \&.o
 126127 suffix unless
 127128 .Fl o
 128129 option is used.
 129130 Note: cannot be combined with
 130131 .Fl o
 131132 if multiple files are given.
 132133 .It Fl D Ar macro Ns Oo = Ns Ar value Oc
 133134 Passed to the
 134135 .Xr cpp 1
 135136 preprocessor to define
 136137 .Ar macro
 137138 with an optional
 138139 .Ar value .
<> 140+.It Fl d Ns Ar flags
  141+Debug options.
  142+.Ar flags
  143+is a string of characters, which signify the following actions.
  144+.Bl -tag -width ".Sy M"
  145+.It Sy M
  146+Cause the preprocessor to output a list of macro definitions.
  147+.El
  148+.Lp
  149+any unknown flags are ignored.
<_139150 .It Fl E
 140151 Stop after preprocessing with
 141152 .Xr cpp 1 .
 142153 Do not compile, assemble, or link.
 143154 Output is sent to standard output unless the
 144155 .Fl o
 145156 option is used.
 146157 .It Fl ffreestanding
 147158 Assume a freestanding environment.
 148159 .It Fl fPIC
 149160 Generate PIC code.
 150161 .\" TODO: document about avoiding machine-specific maximum size?
 151162 .It Fl fpic
 152163 Tells C compiler to generate PIC code
 153164 and tells assembler that PIC code has been generated.
 154165 .\" TODO: document difference between PIC and pic
 155166 .\" other -f GCC compatibility flags are ignored for now
 156167 .It Fl g
 157168 Send
 158169 .Fl g
 159170 flag to
 160171 .Xr ccom 1
 161172 to create debug output.
 162173 Debug information output can be disabled with
 163174 .Fl g0 .
 164175 .It Fl I Ar path
 165176 Passed to the
 166177 .Xr cpp 1
 167178 preprocessor to add header search directory to override system defaults.
 168179 .It Fl include Ar file
 169180 Tells the
 170181 .Xr cpp 1
 171182 preprocessor to include the
 172183 .Ar file
 173184 during preprocessing.
 174185 .It Fl isystem Ar path
 175186 Defines
 176187 .Ar path
 177188 as a system header directory for the
 178189 .Xr cpp 1
 179190 preprocessor.
 180191 .It Fl k
 181192 Generate PIC code.
 182193 See
 183194 .Fl fpic
 184195 option.
 185196 .It Fl L Ns Ar path
 186197 Passed to the linker, to add
 187198 .Ar path
 188199 to the list of directories searched for shared libraries.
 189200 .It Fl M
 190201 Pass
 191202 .Fl M
 192203 flag to
 193204 .Xr cpp 1
 194205 to generate dependencies for
 195206 .Xr make 1 .
 196207 .It Fl m Ns Ar option
 197208 Target-dependent options.
 198209 Multiple
 199210 .Fl m
 200211 options can be given, the following are supported:
 201212 .Bl -tag -width PowerPC
 202213 .It ARM
 203214 \-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
 204215 .It HPPA
 205216 .It i386
 206217 .It MIPS
 207218 \-mlittle-endian \-mbig-endian \-mhard-float \-msoft-float
 208219 .It PDP-10
 209220 .It PowerPC
 210221 .It Sparc64
 211222 .It VAX
 212223 .El
 213224 .It Fl nodefaultlibs
 214225 Do not link with the system default libraries (libc, etc.)
 215226 .It Fl nostartfiles
 216227 Do not link with the system startup files (crt0.c, etc.)
 217228 .It Fl nostdinc
 218229 Do not use the system include paths (/usr/include, etc.)
 219230 .It Fl nostdlib
 220231 Do not link with the system default libraries or startup files.
 221232 .It Fl O Ns Oo Ar level Oc
 222233 Enable compiler optimizations.
 223234 Currently, for levels higher than zero,
 224235 this defines
 225236 .Dv __OPTIMIZE__
 226237 in the
 227238 .Xr cpp 1
 228239 preprocessor, and passes
 229240 .Fl xdce ,
 230241 .Fl xdeljumps ,
 231242 .Fl xtemps
 232243 and
 233244 .Fl xinline
 234245 to
 235246 .Xr ccom 1 .
 236247 If no level is given the optimization level is increased, or
 237248 optimizations can be disabled using
 238249 .Fl O0 .
 239250 .It Fl o Ar outfile
 240251 Save result to
 241252 .Ar outfile .
 242253 .It Fl P
 243254 Inhibit generation of line markers in preprocessor output.
 244255 This is sometimes useful when running the preprocessor on something other than C code.
 245256 .It Fl pg
 246257 Enable profiling on the generated executable.
 247258 .It Fl pthread
 248259 Defines the
 249260 .Dv _PTHREADS
 250261 preprocessor identifier for
 251262 .Xr cpp 1 , and
 252263 adds
 253264 .Fl lpthread
 254265 to the
 255266 .Xr ld 1
 256267 linker arguments.
 257268 .It Fl S
 258269 Stop after compilation by
 259270 .Xr ccom 1 .
 260271 Do not assemble and do not link.
 261272 The resulting assembler-language output is saved
 262273 as a filename with a
 263274 .Dq \&.s
 264275 suffix unless the
 265276 .Fl o
 266277 option is used.
 267278 Note: cannot be combined with
 268279 .Fl o
 269280 if multiple files are given.
 270281 .It Fl shared
 271282 Create a shared object of the result.
 272283 Tells the linker not to generate an executable.
 273284 .It Fl static
 274285 Do not use dynamic linkage.
 275286 By default, it will link using the dynamic linker options
 276287 and/or shared objects for the platform.
 277288 .It Fl t
 278289 Passed to
 279290 .Xr cpp 1
 280291 to suppress some default macro definitions and enable use
 281292 of traditional C preprocessor syntax.
 282293 .It Fl U Ar macro
 283294 Passes to the
 284295 .Xr cpp 1
 285296 preprocessor to remove the initial macro definition.
 286297 .It Fl v
 287298 Outputs the version of
 288299 .Nm
 289300 and shows what commands will be run with their command line arguments.
 290301 .It Fl Wa Ns , Ns Ar options
 291302 Comma separated list of options for the assembler.
 292303 .It Fl Wc Ns , Ns Ar options
 293304 Comma separated list of options for the compiler.
 294305 .It Fl Wl Ns , Ns Ar options
 295306 Comma separated list of options for the linker.
 296307 .It Fl Wp Ns , Ns Ar options
 297308 Comma separated list of options for the preprocessor.
 298309 .It Fl X
 299310 Don't remove temporary files on exit.
 300311 .It Fl x Ar language
 301312 GCC compatibility option; specify the language in use rather than
 302313 interpreting the filename extension.
 303314 Currently known language values are
 304315 .Sy none ,
 305316 .Sy c ,
 306317 .Sy c++ ,
 307318 .Sy assembler
 308319 and
 309320 .Sy assembler-with-cpp .
 310321 Any unknown
 311322 .Fl x
 312323 options are passed to
 313324 .Xr ccom 1 .
 314325 .El
 315326 .Ss Predefined Macros
 316327 A few
 317328 macros are predefined by
 318329 .Nm
 319330 when sent to
 320331 .Xr cpp 1 .
 321332 .Bl -diag
 322333 .It __PCC__
 323334 Set to the major version of
 324335 .Xr pcc 1 .
 325336 These macros can be used to select code based on
 326337 .Xr pcc 1
 327338 compatibility.
 328339 See the
 329340 .Fl v
 330341 option.
 331342 .It __PCC_MINOR__
 332343 Set to the minor version.
 333344 .It __PCC_MINORMINOR__
 334345 Set to the minor-minor version \(em the number after the minor version.
 335346 .It _PTHREADS
 336347 Defined when
 337348 .Fl pthread
 338349 switch is used.
 339350 .It __ASSEMBLER__
 340351 Defined when input files have a .S suffix, or if the
 341352 .Fl x Ns assembler-with-cpp
 342353 option is specified.
 343354 .El
 344355 .Pp
 345356 Also system- and/or machine-dependent macros may also be predefined;
 346357 for example:
 347358 .Dv __NetBSD__ ,
 348359 .Dv __ELF__ ,
 349360 and
 350361 .Dv __i386__ .
 351362 .Sh SEE ALSO
 352363 .Xr as 1 ,
 353364 .Xr ccom 1 ,
 354365 .Xr cpp 1 ,
 355366 .Xr ld 1
 356367 .Sh HISTORY
 357368 The
 358369 .Nm
 359370 command comes from the original Portable C Compiler by
 360371 .An "S. C. Johnson" ,
 361372 written in the late 70's.
 362373 .Pp
 363374 This product includes software developed or owned by Caldera
 364375 International, Inc.
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 05:52 +0100