1 | .\" dummy line |
---|
2 | .TH CHICKEN 1 "10 Sep 2002" |
---|
3 | |
---|
4 | .SH NAME |
---|
5 | |
---|
6 | chicken \- A Scheme\-to\-C compiler |
---|
7 | |
---|
8 | .SH SYNOPSIS |
---|
9 | |
---|
10 | .B chicken |
---|
11 | .I pathname |
---|
12 | [ |
---|
13 | .I option ... |
---|
14 | ] |
---|
15 | |
---|
16 | .SH DESCRIPTION |
---|
17 | |
---|
18 | .I Chicken |
---|
19 | is a compiler for the programming language |
---|
20 | .I Scheme |
---|
21 | supporting most of the features as described in the |
---|
22 | .I Revised^5 Report on |
---|
23 | .I the Algorithmic Language Scheme |
---|
24 | \. |
---|
25 | |
---|
26 | .SH OPTIONS |
---|
27 | |
---|
28 | .TP |
---|
29 | .B \-analyze\-only |
---|
30 | Stop compilation after first analysis pass. |
---|
31 | |
---|
32 | .B \-benchmark\-mode |
---|
33 | Equivalent to |
---|
34 | .B \-optimize\-level\ 3\ \-fixnum\-arithmetic\ \-disable\-interrupts\ \-lambda\-lift |
---|
35 | .B \-block\ \-no\-lambda\-info |
---|
36 | |
---|
37 | .TP |
---|
38 | .B \-block |
---|
39 | Enable block-compilation. When this option is specified, the compiler assumes that global variables are not modified outside this compilation-unit. |
---|
40 | |
---|
41 | .TP |
---|
42 | .B \-case\-insensitive |
---|
43 | Enables the reader to read symbols case-insensitive. The default is to read case-sensitive (in violation of R5RS). |
---|
44 | This option registers the |
---|
45 | .B case\-insensitive |
---|
46 | feature identifier. |
---|
47 | |
---|
48 | .TP |
---|
49 | .B \-check\-imports |
---|
50 | Search for references to undefined global variables. |
---|
51 | |
---|
52 | .TP |
---|
53 | .B \-check\-syntax |
---|
54 | Aborts compilation process after macro-expansion and syntax checks. |
---|
55 | |
---|
56 | .TP |
---|
57 | .BI \-database\-size \ number |
---|
58 | Specifies the initial size of the analysis-database. Should only be used if extremely large files are to be compiled. |
---|
59 | |
---|
60 | .TP |
---|
61 | .BI \-debug \ modes |
---|
62 | Enables one or more debugging modes. See the User's Manual for more information. |
---|
63 | |
---|
64 | .TP |
---|
65 | .BI \-debug\-level \ level |
---|
66 | Selects amount of debug-information. |
---|
67 | .I level |
---|
68 | should be an integer. |
---|
69 | .P |
---|
70 | .br |
---|
71 | .B \ \ \ \ 0 |
---|
72 | -no-trace -no-lambda-info |
---|
73 | .br |
---|
74 | .B \ \ \ \ 1 |
---|
75 | -no-trace |
---|
76 | .br |
---|
77 | .B \ \ \ \ 2 |
---|
78 | nothing. |
---|
79 | |
---|
80 | .TP |
---|
81 | .B \-disable\-c\-syntax\-checks |
---|
82 | Disable basic syntax checking of embedded C code fragments. |
---|
83 | |
---|
84 | .TP |
---|
85 | .B \-disable\-compiler\-macros |
---|
86 | Disable expansion of compiler macros. |
---|
87 | |
---|
88 | .TP |
---|
89 | .B \-disable\-interrupts |
---|
90 | Equivalent to |
---|
91 | .B \-prelude\ "(declare\ (interrupts-disabled))" |
---|
92 | |
---|
93 | .TP |
---|
94 | .B \-disable\-stack\-overflow\-checks |
---|
95 | Disables detection of stack-overflows. |
---|
96 | |
---|
97 | .TP |
---|
98 | .B \-disable\-warning\ class |
---|
99 | Disables specific class of warnings, may be given multiple times. |
---|
100 | |
---|
101 | .TP |
---|
102 | .B \-dynamic |
---|
103 | This option should be used when compiling files intended to be loaded dynamically into |
---|
104 | a running Scheme program. |
---|
105 | |
---|
106 | .TP |
---|
107 | .BI \-epilogue \ filename |
---|
108 | Includes the file named |
---|
109 | .I filename |
---|
110 | at the end of the compiled source file. |
---|
111 | The include-path is not searched. This option may be given multiple times. |
---|
112 | |
---|
113 | .TP |
---|
114 | .I \-emit\-debug\-info |
---|
115 | Emit additional information for each |
---|
116 | .B lambda |
---|
117 | expression (currently the argument-list, |
---|
118 | after alpha-conversion/renaming). |
---|
119 | |
---|
120 | .TP |
---|
121 | .BI \-emit\-exports\ filename |
---|
122 | Write exported toplevel variables to file |
---|
123 | .B filename |
---|
124 | |
---|
125 | .TP |
---|
126 | .I \-emit\-external\-prototypes\-first |
---|
127 | Emit prototypes for callbacks defined with |
---|
128 | .B define\-external |
---|
129 | before any |
---|
130 | other foreign declarations. This is sometimes useful, when C/C++ code embedded into |
---|
131 | the a Scheme program has to access the callbacks. By default the prototypes are emitted |
---|
132 | after foreign declarations. |
---|
133 | |
---|
134 | .TP |
---|
135 | .I \-emit\-inline\-file\ FILENAME |
---|
136 | Write procedures that can be globally inlined in internal form to FILENAME, |
---|
137 | if global inlining is enabled. Implies "-inline -local". |
---|
138 | |
---|
139 | .TP |
---|
140 | .B \-explicit\-use |
---|
141 | Disables automatic use of the units |
---|
142 | .I library |
---|
143 | and |
---|
144 | .I eval |
---|
145 | \. Use this option if compiling a library unit |
---|
146 | instead of an application unit. |
---|
147 | |
---|
148 | .TP |
---|
149 | .BI \-extend \ filename |
---|
150 | Loads a Scheme file before compilation commences. This feature can be used to extend the compiler. |
---|
151 | |
---|
152 | .TP |
---|
153 | .B \-extension |
---|
154 | Mostly equivalent to |
---|
155 | .B \-prelude\ \'\(define-extension\ NAME\)\' |
---|
156 | where |
---|
157 | .B NAME |
---|
158 | is the basename of the currently compiled file. Note that if you want to compile a file |
---|
159 | as a normal (dynamically loadable) extension library, you should also pass the |
---|
160 | .I \-shared |
---|
161 | option. |
---|
162 | |
---|
163 | .TP |
---|
164 | .BI \-feature \ symbol |
---|
165 | Registers |
---|
166 | .I symbol |
---|
167 | to be a valid feature identifier for |
---|
168 | .B cond\-expand |
---|
169 | |
---|
170 | .TP |
---|
171 | .B \-fixnum\-arithmetic |
---|
172 | Equivalent to |
---|
173 | .B \-prelude\ "(declare\ (fixnum))" |
---|
174 | |
---|
175 | .TP |
---|
176 | .BI \-heap\-size \ number |
---|
177 | Sets the static heap-size of the generated executable to |
---|
178 | .I number |
---|
179 | bytes. The parameter may be |
---|
180 | followed by a |
---|
181 | .B M |
---|
182 | or |
---|
183 | .B K |
---|
184 | suffix which stand for mega- and kilobytes, respectively. The default heap-size is 16 megabytes. |
---|
185 | |
---|
186 | .TP |
---|
187 | .BI \-heap\-initial\-size \ number |
---|
188 | Sets the size that the heap of the compiled application should have at startup time. |
---|
189 | |
---|
190 | .TP |
---|
191 | .BI \-heap\-growth \ percentage |
---|
192 | Sets the heap-growth rate for the compiled program at compile time. |
---|
193 | |
---|
194 | .TP |
---|
195 | .BI \-heap\-shrinkage \ percentage |
---|
196 | Sets the heap-shrinkage rate for the compiled program at compile time. |
---|
197 | |
---|
198 | .TP |
---|
199 | .B \-help |
---|
200 | Print a summary of available options and the format of the command-line parameters and exit the compiler. |
---|
201 | |
---|
202 | .TP |
---|
203 | .BI \-import\ pathname |
---|
204 | Read exports from linked or loaded libraries from given file. Implies |
---|
205 | .B \-check\-imports |
---|
206 | |
---|
207 | .TP |
---|
208 | .BI \-include\-path \ pathname |
---|
209 | Specifies an additional search path for files included via the |
---|
210 | .I include |
---|
211 | special form. This option may be given multiple times. If the environment variable |
---|
212 | .B CHICKEN_INCLUDE_PATH |
---|
213 | is set, it should contain a list of alternative include |
---|
214 | pathnames separated by |
---|
215 | .I \; |
---|
216 | \. |
---|
217 | |
---|
218 | .TP |
---|
219 | .B \-inline |
---|
220 | Enables procedure inlining. |
---|
221 | |
---|
222 | .TP |
---|
223 | .B \-inline\-global |
---|
224 | Enable cross-module inlining. |
---|
225 | |
---|
226 | .TP |
---|
227 | .BI \-inline\-limit threshold |
---|
228 | Sets the maximum size of potentially inlinable procedures. |
---|
229 | |
---|
230 | .TP |
---|
231 | .BI \-keep\-shadowed\-macros |
---|
232 | Do not remove macro definitions with the same name as assigned toplevel variables (the default is to remove the macro definition). |
---|
233 | |
---|
234 | .TP |
---|
235 | .BI \-keyword\-style style |
---|
236 | Enables alternative keyword syntax, where style may be either |
---|
237 | .B prefix |
---|
238 | (as in Common Lisp), |
---|
239 | .B suffix |
---|
240 | (as in DSSSL) or |
---|
241 | .B none |
---|
242 | Any other value is ignored. The default is \texttt{suffix}. |
---|
243 | |
---|
244 | .TP |
---|
245 | .B \-lambda\-lift |
---|
246 | Enable the optimization known as lambda-lifting. |
---|
247 | |
---|
248 | .TP |
---|
249 | .B \-local |
---|
250 | Assume toplevel variables defined in the current compilation unit are |
---|
251 | not externally modified. |
---|
252 | |
---|
253 | .TP |
---|
254 | .B \-no\-trace |
---|
255 | Disable generation of tracing information. If a compiled executable should halt due to a runtime error, |
---|
256 | then a file containing a stack-trace will be written to the current directory under the name |
---|
257 | .I STACKTRACE |
---|
258 | \. Each line in the created file gives the name and the line-number (if available) of a procedure call. |
---|
259 | With this option given, the generated code is slightly faster. |
---|
260 | |
---|
261 | .TP |
---|
262 | .B \-no\-warnings |
---|
263 | Disable generation of compiler warnings. |
---|
264 | |
---|
265 | .TP |
---|
266 | .BI \-nursery \ number |
---|
267 | .TP |
---|
268 | .BI \-stack\-size \ number |
---|
269 | Sets the size of the first heap-generation of the generated executable to |
---|
270 | .I number |
---|
271 | bytes. The parameter may |
---|
272 | be followed by a |
---|
273 | .B M |
---|
274 | or |
---|
275 | .B K |
---|
276 | suffix. The default stack-size depends on the target platform. |
---|
277 | |
---|
278 | .TP |
---|
279 | .BI \-optimize\-leaf\-routines |
---|
280 | Enable leaf routine optimization. |
---|
281 | |
---|
282 | .TP |
---|
283 | .BI \-optimize\-level \ level |
---|
284 | Enables certain sets of optimization options. |
---|
285 | .I level |
---|
286 | should be an integer. Each optimization level corresponds to a certain set of optimization option |
---|
287 | as shown in the following list: |
---|
288 | .P |
---|
289 | .br |
---|
290 | .B \ \ \ \ 0 |
---|
291 | nothing |
---|
292 | .br |
---|
293 | .B \ \ \ \ 1 |
---|
294 | -optimize-leaf-routines |
---|
295 | .br |
---|
296 | .B \ \ \ \ 2 |
---|
297 | -optimize-leaf-routines -usual-integrations |
---|
298 | .br |
---|
299 | .B \ \ \ \ 3 |
---|
300 | -optimize-leaf-routines -usual-integrations -unsafe |
---|
301 | |
---|
302 | .TP |
---|
303 | .BI \-output\-file \ filename |
---|
304 | Specifies the pathname of the generated C file. Default is |
---|
305 | .I FILENAME.c |
---|
306 | \. |
---|
307 | |
---|
308 | .TP |
---|
309 | .BI \-postlude \ expressions |
---|
310 | Add |
---|
311 | .I expressions |
---|
312 | after all other toplevel expressions in the compiled file. |
---|
313 | This option may be given multiple times. Processing of this option takes place after processing of |
---|
314 | .BI \-epilogue |
---|
315 | \. |
---|
316 | |
---|
317 | .TP |
---|
318 | .BI \-prelude \ expressions |
---|
319 | Add |
---|
320 | .I expressions |
---|
321 | before all other toplevel expressions in the compiled file. |
---|
322 | This option may be given multiple times. Processing of this option takes place before processing of |
---|
323 | .B \-prologue |
---|
324 | \. |
---|
325 | |
---|
326 | .TP |
---|
327 | .B \-profile |
---|
328 | .B \-accumulate\-profile |
---|
329 | Instruments the source code to count procedure calls and execution times. After the program terminates |
---|
330 | (either via an explicit |
---|
331 | .B exit |
---|
332 | or implicitly), profiling statistics are written to a file named |
---|
333 | .B PROFILE.<PID> |
---|
334 | where <PID> is the process ID of the program being profiled. |
---|
335 | Each line of the generated file contains a list with the procedure name, |
---|
336 | the number of calls and the time spent executing it. Use the |
---|
337 | .B chicken\-profile |
---|
338 | program to display the profiling information in a more user-friendly form. |
---|
339 | |
---|
340 | .TP |
---|
341 | .B \-profile\-name\ filename |
---|
342 | Specifies the name of the generated profile information file. Only useful |
---|
343 | in combination with the |
---|
344 | .B \-profile |
---|
345 | or |
---|
346 | .B \-accumulate-profile |
---|
347 | options. |
---|
348 | |
---|
349 | .TP |
---|
350 | .BI \-prologue \ filename |
---|
351 | Includes the file named |
---|
352 | .I filename |
---|
353 | at the start of the compiled source file. |
---|
354 | The include-path is not searched. This option may be given multiple times. |
---|
355 | |
---|
356 | .TP |
---|
357 | .B \-quiet |
---|
358 | Disables output of compile information. |
---|
359 | |
---|
360 | .TP |
---|
361 | .B \-release |
---|
362 | Print release number and exit. |
---|
363 | |
---|
364 | .TP |
---|
365 | .BI \-require\-extension \ name |
---|
366 | Loads the syntax-extension |
---|
367 | .I name |
---|
368 | before the source program is processed. This is identical to adding |
---|
369 | .B require\-extension\ NAME |
---|
370 | at the start of |
---|
371 | the compiled program. |
---|
372 | |
---|
373 | .TP |
---|
374 | .B \-run\-time\-macros |
---|
375 | Makes low-level macros (defined with |
---|
376 | .B define\-macro |
---|
377 | also available at run-time. By default |
---|
378 | low-level macros are not available at run-time. Note that highlevel-macros ("syntax-case") |
---|
379 | defined in compiled code are never available at run-time. |
---|
380 | |
---|
381 | .TP |
---|
382 | .B \-to\-stdout |
---|
383 | Write compiled code to standard output instead of creating a |
---|
384 | .I .c |
---|
385 | file. |
---|
386 | |
---|
387 | .TP |
---|
388 | .BI \-unit \ name |
---|
389 | Compile this file as a library unit. |
---|
390 | |
---|
391 | .TP |
---|
392 | .B \-unsafe |
---|
393 | Disable runtime safety checks. |
---|
394 | |
---|
395 | .TP |
---|
396 | .B \-unsafe\-libraries |
---|
397 | Marks the generated file for being linked with the unsafe runtime system. This |
---|
398 | should be used when generating shared object files that are to be loaded |
---|
399 | dynamically. If the marker is present, any attempt to load code compiled with |
---|
400 | this option will signal an error. |
---|
401 | |
---|
402 | .TP |
---|
403 | .BI \-uses \ name |
---|
404 | Use definitions in the given library unit. |
---|
405 | |
---|
406 | .TP |
---|
407 | .B \-usual\-integrations |
---|
408 | Specifies that standard procedures and certain internal procedures are never redefined, and can |
---|
409 | be inlined. This is equivalent to declaring |
---|
410 | .I (usual\-integrations) |
---|
411 | \. |
---|
412 | |
---|
413 | .TP |
---|
414 | .B \-verbose |
---|
415 | Prints progress information to standard output during compilation. |
---|
416 | |
---|
417 | .TP |
---|
418 | .B \-version |
---|
419 | Prints the version and some copyright information and exit the compiler. |
---|
420 | |
---|
421 | .SH ENVIRONMENT\ VARIABLES |
---|
422 | |
---|
423 | .TP |
---|
424 | .B CHICKEN_PREFIX |
---|
425 | Is used as a prefix directory for support files, include-files and libraries. |
---|
426 | |
---|
427 | .TP |
---|
428 | .B CHICKEN_INCLUDE_PATH |
---|
429 | Contains one or more pathnames where the compiler should additionally look for include-files, separated by |
---|
430 | .B \; |
---|
431 | characters. |
---|
432 | |
---|
433 | .TP |
---|
434 | .B CHICKEN_OPTIONS |
---|
435 | Holds a string of default compiler options that should apply to every invocation of |
---|
436 | .B chicken |
---|
437 | \. |
---|
438 | |
---|
439 | .SH DOCUMENTATION |
---|
440 | |
---|
441 | More information can be found in the |
---|
442 | .I Chicken\ User's\ Manual |
---|
443 | |
---|
444 | .SH AUTHORS |
---|
445 | |
---|
446 | Felix L. Winkelmann and The Chicken Team. |
---|
447 | |
---|
448 | .SH SEE ALSO |
---|
449 | |
---|
450 | .BR csc(1) |
---|
451 | .BR chicken-bug(1) |
---|