source: mainline/uspace/app/pcc/cc/ccom/ccom.1@ 8a23fef

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 8a23fef was a7de7182, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 14 years ago

Added pcc source tree (contents of pcc-1.0.0.tgz)

  • Property mode set to 100644
File size: 4.6 KB
Line 
1.\" $NetBSD$
2.\" $Id: ccom.1,v 1.9 2010/04/05 13:13:57 reed Exp $
3.\"
4.\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net>
5.\" Permission to use, copy, modify, and/or distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
10.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
12.\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
15.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
16.\" THIS SOFTWARE.
17.Dd September 14, 2007
18.Dt CCOM 1
19.Os
20.Sh NAME
21.Nm ccom
22.Nd C compiler
23.Sh SYNOPSIS
24.Nm
25.Op Fl gs
26.Op Fl W Ar flags
27.Op Fl X Ar flags
28.Op Fl x Ar optimizations
29.Op Fl Z Ar flags
30.Op infile
31.Op outfile
32.Sh DESCRIPTION
33The
34.Nm
35utility provides a C compiler.
36The frontend is usually
37.Xr pcc 1 .
38It is
39.Em not
40intended to be run directly.
41.Pp
42.Nm
43reads the C source from
44.Ar infile
45or standard input and writes the assembler source
46to
47.Ar outfile
48or to standard output.
49.Pp
50The options are as follows:
51.Bl -tag -width Ds
52.It Fl g
53Enable debugging.
54.\" built into binary, explain stabs?
55.It Fl k
56Generate PIC code.
57.It Fl s
58Print statistics to standard error when complete.
59This includes:
60name table entries, name string size, permanent allocated memory,
61temporary allocated memory, lost memory, argument list unions,
62dimension/function unions, struct/union/enum blocks, inline node count,
63inline control blocks, and permanent symtab entries.
64.\" TODO: explain units for above?
65.It Fl v
66Display version.
67.It Fl W Ar flags
68Report warnings.
69(Do some basic checks.)
70.Em NOTE!
71.Em These are subject to change RSN!
72.Ar flags
73is one or more of the following:
74.Bl -tag -width Ds
75.It Sy error
76Report all warnings as errors.
77.It Sy implicit
78Implies
79.Sy implicit-function-declaration
80and
81.Sy implicit-int .
82.It Sy implicit-function-declaration
83Report if no prototype was declared for a function.
84.It Sy implicit-int
85TODO
86.It Sy missing-prototypes
87TODO
88.It Sy strict-prototypes
89TODO
90.It Sy W
91Enable all warnings.
92.El
93.\"
94.It Fl X Ar flags
95C specific debugging where
96.Ar flags
97is one or more of the following:
98.Bl -tag -width Ds
99.It Sy b
100Building of parse trees
101.It Sy d
102Declarations (using multiple
103.Sy d
104flags gives more output)
105.It Sy e
106Pass1 trees at exit
107.It Sy i
108Initializations
109.It Sy n
110Memory allocations
111.It Sy o
112Turn off optimisations
113.It Sy p
114Prototypes
115.It Sy s
116Inlining
117.It Sy t
118Type conversions
119.It Sy x
120Target-specific flag, used in machine-dependent code
121.El
122.\"
123.It Fl x Ar optimizations
124.Ar optimizations
125is one of the following:
126.\" TODO: reword this, since multiple terms don't go with one -x switch??
127.Bl -tag -width deljumps
128.It Sy deljumps
129Delete redundant jumps and dead code.
130.It Sy ssa
131Convert statements into SSA form for optimization.
132Not yet finished.
133.It Sy tailcall
134Currently not implemented.
135.It Sy temps
136Setting this flag allows variables to be put into registers, for further
137optimization by the register allocator.
138.El
139The
140.Fl x
141flag can be passed multiple times to set different options.
142.\"
143.It Fl Z Ar flags
144Code generator (pass2) specific debugging where
145.Ar flags
146is one or more of the following:
147.Bl -tag -width Ds
148.It Sy b
149Basic block and SSA building
150.It Sy c
151Code printout
152.It Sy e
153Trees when entering pass2
154.It Sy f
155Instruction matcher, may provide much output
156.It Sy n
157Memory allocation
158.It Sy o
159Instruction generator
160.It Sy r
161Register allocator
162.It Sy s
163Shape matching in instruction generator
164.It Sy t
165Type matching in instruction generator
166.It Sy u
167Sethi-Ullman computations
168.It Sy x
169Target-specific flag, used in machine-dependent code
170.El
171.El
172.Sh SEE ALSO
173.Xr as 1 ,
174.Xr cpp 1 ,
175.Xr pcc 1
176.Sh HISTORY
177The
178.Nm
179compiler is based on the original Portable C Compiler by S. C. Johnson,
180written in the late 70's.
181Even though much of the compiler has been rewritten, some of the
182basics still remain.
183About 50% of the frontend code and 80% of the backend code has been
184rewritten.
185Most is written by Anders Magnusson, with the exception of
186the data-flow analysis part and the SSA conversion code which is
187written by Peter A Jonsson, and the Mips port that were written as
188part of a project by undergraduate students at Lulea University of
189Technology.
190.Pp
191This product includes software developed or owned by Caldera
192International, Inc.
Note: See TracBrowser for help on using the repository browser.