1CSC(1) BSD General Commands Manual CSC(1)
2
4 csc — driver program for the CHICKEN Scheme compiler
5
7 csc [OPTION ...] [FILENAME ...]
8
10 csc is a program that invokes the CHICKEN compiler and the host systems C
11 compiler to generate an executable from a Scheme source file or C files
12 generated by CHICKEN.
13
14 FILENAME is a Scheme source file name with optional extension or a
15 C/C++/Objective-C source, object or library file name with extension.
16 OPTION may be one of the following:
17
18 General options:
19
20 -h, -help
21 Display usage text and exit.
22
23 -v, -verbose
24 Show compiler notes and tool-invocations.
25
26 -vv Display information about translation progress.
27
28 -vvv Display information about all compilation stages.
29
30 -version
31 Display Scheme compiler version and exit.
32
33 -release
34 Display release number and exit.
35
36 File and pathname options:
37
38 -o FILENAME, -output-file FILENAME
39 Specifies target executable name.
40
41 -I PATHNAME, -include-path PATHNAME
42 Specifies alternative path for included files.
43
44 -to-stdout
45 Write compiler to stdout (implies -t).
46
47 -s, -shared, -dynamic
48 Generate dynamically loadable shared object file.
49
50 Language options:
51
52 -D SYMBOL, -feature SYMBOL
53 Register feature identifier.
54
55 -no-feature SYMBOL
56 Disable builtin feature identifier.
57
58 -c++ Compile via a C++ source file (.cpp).
59
60 -objc Compile via Objective-C source file (.m).
61
62 Syntax related options:
63
64 -i, -case-insensitive
65 Don't preserve case of read symbols.
66
67 -K, -keyword-style STYLE
68 Enable alternative keyword-syntax (prefix, suffix or none).
69
70 -no-parentheses-synonyms
71 Disables list delimiter synonyms.
72
73 -no-symbol-escape
74 Disables support for escaped symbols.
75
76 -r5rs-syntax
77 Disables the CHICKEN extensions to R5RS syntax.
78
79 -compile-syntax
80 Macros are made available at run-time.
81
82 -j MODULE, -emit-import-library MODULE
83 Write compile-time module information into separate file.
84
85 -J, -emit-all-import-libraries
86 Emit import-libraries for all defined modules.
87
88 -no-compiler-syntax
89 Disable expansion of compiler-macros.
90
91 -m NAME, -module NAME
92 Wrap compiled code in module of the given name.
93
94 -M, -module-registration
95 Always generate module registration code, even when import li‐
96 braries are emitted.
97
98 -N, -no-module-registration
99 Do not generate module registration code. Overrides
100 -module-registration.
101
102 Translation options:
103
104 -x, -explicit-use
105 Do not use units ‘library’ and ‘eval’ by default.
106
107 -P, -check-syntax
108 Stop compilation after macro-expansion.
109
110 -A, -analyze-only
111 Stop compilation after first analysis pass.
112
113 Debugging options:
114
115 -w, -no-warnings
116 Disable warnings.
117
118 -d0, -d1, -d2, -d3, -debug-level NUMBER
119 Set level of available debugging information.
120
121 -no-trace
122 Disable rudimentary debugging information.
123
124 -profile
125 Executable emits profiling information.
126
127 -accumulate-profile
128 Executable emits profiling information in append mode.
129
130 -profile-name FILENAME
131 Name of the generated profile information file.
132
133 -types FILENAME
134 Load additional type database.
135
136 Optimization options:
137
138 -O, -O0, -O1, -O2, -O3, -O4, -O5, -optimize-level NUMBER
139 Enable certain sets of optimization options.
140
141 -optimize-leaf-routines
142 Enable leaf routine optimization.
143
144 -no-usual-integrations
145 Standard procedures may be redefined.
146
147 -u, -unsafe
148 Disable safety checks.
149
150 -local Assume globals are only modified in current file.
151
152 -b, -block
153 Enable block-compilation.
154
155 -disable-interrupts
156 Disable interrupts in compiled code.
157
158 -f, -fixnum-arithmetic
159 Assume all numbers are fixnums.
160
161 -disable-stack-overflow-checks
162 Disables detection of stack-overflows.
163
164 -inline
165 Enable inlining.
166
167 -inline-limit LIMIT
168 Set inlining threshold.
169
170 -inline-global
171 Enable cross-module inlining.
172
173 -specialize
174 Perform type-based specialization of primitive calls.
175
176 -oi FILENAME, -emit-inline-file FILENAME
177 Generate file with globally inlinable procedures (implies -inline
178 -local).
179
180 -consult-inline-file FILENAME
181 Explicitly load inline file.
182
183 -ot FILENAME, -emit-types-file FILENAME
184 Write type-declaration information into file.
185
186 -no-argc-checks
187 Disable argument count checks.
188
189 -no-bound-checks
190 Disable bound variable checks.
191
192 -no-procedure-checks
193 Disable procedure call checks.
194
195 -no-procedure-checks-for-usual-bindings
196 Disable procedure call checks only for usual bindings.
197
198 -no-procedure-checks-for-toplevel-bindings
199 Disable procedure call checks for toplevel bindings.
200
201 -strict-types
202 Assume variable do not change their type.
203
204 -clustering
205 Combine groups of local procedures into dispatch loop.
206
207 -lfa2 Perform additional lightweight flow-analysis pass.
208
209 -unroll-limit LIMIT
210 Specifies inlining limit for self-recursive calls.
211
212 Configuration options:
213
214 -unit NAME
215 Compile file as a library unit.
216
217 -uses NAME
218 Declare library unit as used.
219
220 -heap-size NUMBER
221 Specifies heap-size of compiled executable.
222
223 -nursery NUMBER -stack-size NUMBER
224 Specifies nursery size of compiled executable.
225
226 -X FILENAME, -extend FILENAME
227 Load file before compilation commences.
228
229 -prelude EXPRESSION
230 Add expression to beginning of source file.
231
232 -postlude EXPRESSION
233 Add expression to end of source file.
234
235 -prologue FILENAME
236 Include file before main source file.
237
238 -epilogue FILENAME
239 Include file after main source file.
240
241 -e, -embedded
242 Compile as embedded (don't generate ‘main()’).
243
244 -gui Compile as GUI application.
245
246 -link NAME
247 Link extension with compiled executable (implies ‘-uses’).
248
249 -R NAME, -require-extension NAME
250 Require extension and import in compiled code.
251
252 -dll, -library
253 Compile multiple units into a dynamic library.
254
255 -libdir DIRECTORY
256 Override location of runtime library directory.
257
258 Options to other passes:
259
260 -C OPTION
261 Pass option to C compiler.
262
263 -L OPTION
264 Pass option to linker.
265
266 -I<DIR>
267 Pass “-I<DIR>” to C compiler (add include path).
268
269 -L<DIR>
270 Pass “-L<DIR>” to linker (add library path).
271
272 -k Keep intermediate files.
273
274 -c Stop after compilation to object files.
275
276 -t Stop after translation to C.
277
278 -cc COMPILER
279 Select a C compiler other than the default.
280
281 -cxx COMPILER
282 Select a C++ compiler other than the default.
283
284 -ld COMPILER
285 Select a linker other than the default.
286
287 -static-libs
288 Link with static CHICKEN libraries and extensions.
289
290 -F<DIR>
291 Pass “-F<DIR>” to C compiler (add framework header path on Mac OS
292 X).
293
294 -framework NAME
295 Passed to linker on Mac OS X.
296
297 -rpath PATHNAME
298 Add directory to runtime library search path.
299
300 -Wl,...
301 Pass linker options.
302
303 -strip Strip resulting binary.
304
305 Inquiry options:
306
307 -home Show home-directory (where support files go).
308
309 -cflags
310 Show required C-compiler flags and exit.
311
312 -ldflags
313 Show required linker flags and exit.
314
315 -libs Show required libraries and exit.
316
317 -cc-name
318 Show name of default C compiler used.
319
320 -cxx-name
321 Show name of default C++ compiler used.
322
323 -ld-name
324 Show name of default linker used.
325
326 -dry-run
327 Just show commands executed, don't run them (implies ‘-v’).
328
329 Obscure options:
330
331 -debug MODES
332 Display debugging output for the given modes.
333
334 -compiler PATHNAME
335 Use a compiler other than the default ‘chicken’.
336
337 -raw Do not generate implicit init- and exit code.
338
339 -emit-external-prototypes-first
340 Emit prototypes for callbacks before foreign declarations.
341
342 -regenerate-import-libraries
343 Always emit import libraries, even when their contents haven't
344 changed. The default behaviour is to preserve existing import
345 libraries.
346
347 -ignore-repository
348 Do not refer to repository for extensions.
349
350 -keep-shadowed-macros
351 Do not remove shadowed macros.
352
353 -host Compile for host when configured for cross-compiling.
354
355 -private-repository
356 Load extensions from executable path.
357
358 -deployed
359 Link support file to be used from a deployed executable (sets
360 ‘rpath’ accordingly, if supported on this platform.)
361
362 -no-elevation
363 Embed manifest on Windows to supress elevation warnings for pro‐
364 grams named ‘install’ or ‘setup’.
365
366 Options can be collapsed if unambiguous, so “-vkfO” is the same as “-v -k
367 -fixnum-arithmetic -optimize”.
368
370 The following environment variables change the behaviour of csc:
371
372 CSC_OPTIONS Can hold default options that should be passed to every in‐
373 vocation of csc.
374
376 The csc utility exits 0 on success, and >0 if an error occurs.
377
379 chicken(1)
380
381 More information can be found in the CHICKEN User's Manual:
382 http://wiki.call-cc.org/manual/index
383
385 The CHICKEN Team
386
388 Submit bug reports by e-mail to chicken-janitors@nongnu.org
389
390BSD Apr 26, 2017 BSD