summaryrefslogtreecommitdiff
path: root/sys/man/1/pcc
blob: 97f1d16beb0f5e58df7d0b5b173b99c8f4c31b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.TH PCC 1 
.SH NAME
pcc \- APE C compiler driver
.SH SYNOPSIS
.B pcc
[
.I option ...
]
[
.I name ...
]
.SH DESCRIPTION
.I Pcc
compiles and loads C programs,
using APE (ANSI C/POSIX) include files and libraries.
Named files ending with
.B .c
are preprocessed with
.IR cpp (1),
then compiled with one of the compilers described in
.IR 2c (1),
as specified by the environment variable
.BR $objtype .
The object files are then loaded using one of the loaders described in
.IR 2l (1).
The options are:
.TP \w'\fL-D\ \fIname=def\ 'u
.BI -o " out"
Place loader output in file
.I out
instead of the default
.BR 2.out ,
.BR v.out ,
etc.
.TP
.B -P
Omit the compilation and loading phases;
leave the result of preprocessing
.IB name .c
in
.IB name .i\f1.
.TP
.B -E
Like
.BR -P ,
but send the result to standard output.
.TP
.B -c
Omit the loading phase.
.TP
.B -p
Insert profiling code into the executable output.
.TP
.B -w
Print compiler warning messages.
.TP
.BI -l lib
Include
.BI / $objtype /lib/ape/lib lib .a
as a library during the linking phase.
.TP
.B -B
Don't complain about functions used without
ANSI function prototypes.
.TP
.B -V
Enable
.B void*
conversion warnings, as in
.IR 2c (1).
.TP
.B -v
Echo the preprocessing, compiling, and loading commands
before they are executed.
.TP
.BI -D name=def
.br
.ns
.TP
.BI -D name
Define the
.I name
to the preprocessor,
as if by
.LR #define .
If no definition is given, the name is defined as
.LR 1 .
.TP
.BI -U name
Undefine the
.I name
to the preprocessor,
as if by
.LR #undef .
.TP
.BI -I dir
.L #include
files whose names do not begin with 
.L /
are always
sought first in the directory 
of the
.I file
argument,
then in directories named in 
.B -I
options,
then in
.BR /$objtype/include/ape .
.TP
.B -N
Don't optimize compiled code.
.TP
.B -S
Print an assembly language version of the object code
on standard output.
.TP
.B -a
Instead of compiling, print on standard output acid functions (see
.IR acid (1))
for examining structures declared in the source files.
.TP
.B -aa
Like
.B -a
except that functions for structures declared in included header files
are omitted.
.TP
.B -F
Enable vararg type checking as described in 
.IR 2c (1).
This is of limited use without the appropriate 
.B #pragma 
definitions.
.PP
The APE environment contains all of the include
files and library routines specified in the ANSI C standard
(X3.159-1989), as well as those specified in the IEEE Portable
Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1).
In order to access the POSIX routines, source programs should
define the preprocessor constant
.BR _POSIX_SOURCE .
.SH FILES
.TF /$objtype/lib/ape/libap.a
.TP
.B /sys/include/ape
directory for machine-independent
.B #include
files.
.TP
.B /$objtype/include/ape
directory for machine-dependent
.B #include
files.
.TP
.B /$objtype/lib/ape/libap.a
ANSI C/POSIX library.
.SH "SEE ALSO"
.IR cpp (1),
.IR 2c (1),
.IR 2a (1),
.IR 2l (1),
.IR mk (1),
.IR nm (1),
.IR acid (1),
.IR db (1),
.IR prof (1)
.PP
Howard Trickey,
``APE \(em The ANSI/POSIX Environment''
.SH SOURCE
.B /sys/src/cmd/pcc.c
.SH BUGS
The locale manipulation functions are minimal.
Signal functions and terminal characteristic
handlers are only minimally implemented.
.IR Link
always fails, because Plan 9 doesn't support multiple links to a file.
The functions related to setting effective user and group ids
cannot be implemented because the concept doesn't exist in Plan 9.