CSC(1)

πŸ’– CSC(1) πŸ’–

okay so bestie, welcome to the manual page for csc β€” the driver program for the CHICKEN Scheme compiler. It lives in the General Commands Manual section (that's section 1, the "commands you actually type" section, iykyk). This is a big one, so hydrate πŸ’…


✨ NAME ✨

csc β€” driver program for the CHICKEN Scheme compiler


πŸŽ€ SYNOPSIS πŸŽ€

csc [OPTION ...] [FILENAME ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, csc is the main character of the CHICKEN build process. It's a program that invokes the CHICKEN compiler and the host system's C compiler, and it does that so you get an executable out of a Scheme source file β€” or out of C files that CHICKEN itself generated. Bestie it's literally the glue holding the whole thing together, no cap 🫢

FILENAME is a Scheme source file name with an optional extension, or a C / C++ / Objective-C source, object, or library file name with an extension. And OPTION can be any one of the following. Buckle up, there are a lot, and they're all real:

🌈 General options 🌈

  • -h, -help β€” shows you the usage text and then dips out. Bye πŸ’¨
  • -v, -verbose β€” spills the compiler notes and every tool invocation. Very "tell me everything" of it.
  • -vv β€” shows info about translation progress.
  • -vvv β€” shows info about all the compilation stages. Maximum yapping, and honestly? obsessed.
  • -version β€” displays the Scheme compiler version and exits.
  • -release β€” displays the release number and exits.

πŸ“ File and pathname options πŸ“

  • -o FILENAME, -output-file FILENAME β€” specifies the target executable name.
  • -I PATHNAME, -include-path PATHNAME β€” specifies an alternative path for included files.
  • -to-stdout β€” write compiler to stdout (this one implies -t).
  • -s, -shared, -dynamic β€” generate a dynamically loadable shared object file.

πŸ’œ Language options πŸ’œ

  • -D SYMBOL, -feature SYMBOL β€” register a feature identifier.
  • -no-feature SYMBOL β€” disable a builtin feature identifier.
  • -c++ β€” compile via a C++ source file (.cpp).
  • -objc β€” compile via Objective-C source file (.m).
  • -i, -case-insensitive β€” don't preserve the case of read symbols.
  • -K, -keyword-style STYLE β€” enable alternative keyword-syntax. The STYLE can be prefix, suffix or none.
  • -no-parentheses-synonyms β€” disables list delimiter synonyms.
  • -no-symbol-escape β€” disables support for escaped symbols.
  • -r5rs-syntax β€” disables the CHICKEN extensions to R5RS syntax.
  • -compile-syntax β€” macros are made available at run-time.
  • -j MODULE, -emit-import-library MODULE β€” write compile-time module information into a separate file.
  • -J, -emit-all-import-libraries β€” emit import-libraries for all defined modules.
  • -no-compiler-syntax β€” disable expansion of compiler-macros.
  • -m NAME, -module NAME β€” wrap the compiled code in a module of the given name.
  • -M, -module-registration β€” always generate module registration code, even when import libraries are emitted.
  • -N, -no-module-registration β€” do not generate module registration code. This one overrides -module-registration. Rude but valid.

⭐ Translation options ⭐

  • -x, -explicit-use β€” do not use the units library and eval by default.
  • -P, -check-syntax β€” stop compilation after macro-expansion.
  • -A, -analyze-only β€” stop compilation after the first analysis pass.

πŸ’€ Debugging options πŸ’€

  • -w, -no-warnings β€” disable warnings. Living on the edge, I respect it.
  • -d0, -d1, -d2, -d3, -debug-level NUMBER β€” set the level of available debugging information.
  • -no-trace β€” disable rudimentary debugging information.
  • -profile β€” the executable emits profiling information.
  • -accumulate-profile β€” the executable emits profiling information in append mode.
  • -profile-name FILENAME β€” name of the generated profile information file.
  • -types FILENAME β€” load an additional type database.

πŸ”₯ Optimization options πŸ”₯

  • -O, -O0, -O1, -O2, -O3, -O4, -O5, -optimize-level NUMBER β€” enable certain sets of optimization options.
  • -optimize-leaf-routines β€” enable leaf routine optimization.
  • -no-usual-integrations β€” standard procedures may be redefined.
  • -u, -unsafe β€” disable safety checks. ⚠️ yes, that means what it sounds like, be so fr.
  • -local β€” assume globals are only modified in the current file.
  • -b, -block β€” enable block-compilation.
  • -disable-interrupts β€” disable interrupts in compiled code.
  • -f, -fixnum-arithmetic β€” assume all numbers are fixnums.
  • -disable-stack-overflow-checks β€” disables detection of stack-overflows.
  • -inline β€” enable inlining.
  • -inline-limit LIMIT β€” set the inlining threshold.
  • -inline-global β€” enable cross-module inlining.
  • -specialize β€” perform type-based specialization of primitive calls.
  • -oi FILENAME, -emit-inline-file FILENAME β€” generate a file with globally inlinable procedures (this implies -inline -local).
  • -consult-inline-file FILENAME β€” explicitly load an inline file.
  • -ot FILENAME, -emit-types-file FILENAME β€” write type-declaration information into a file.
  • -no-argc-checks β€” disable argument count checks.
  • -no-bound-checks β€” disable bound variable checks.
  • -no-procedure-checks β€” disable procedure call checks.
  • -no-procedure-checks-for-usual-bindings β€” disable procedure call checks only for usual bindings.
  • -no-procedure-checks-for-toplevel-bindings β€” disable procedure call checks for toplevel bindings.
  • -strict-types β€” assume variables do not change their type.
  • -clustering β€” combine groups of local procedures into a dispatch loop.
  • -lfa2 β€” perform an additional lightweight flow-analysis pass.
  • -unroll-limit LIMIT β€” specifies the inlining limit for self-recursive calls.

🌸 Configuration options 🌸

  • -unit NAME β€” compile file as a library unit.
  • -uses NAME β€” declare a library unit as used.
  • -heap-size NUMBER β€” specifies the heap-size of the compiled executable.
  • -nursery NUMBER -stack-size NUMBER β€” specifies the nursery size of the compiled executable.
  • -X FILENAME, -extend FILENAME β€” load file before compilation commences.
  • -prelude EXPRESSION β€” add expression to the beginning of the source file.
  • -postlude EXPRESSION β€” add expression to the end of the source file.
  • -prologue FILENAME β€” include file before the main source file.
  • -epilogue FILENAME β€” include file after the main source file.
  • -e, -embedded β€” compile as embedded (don't generate main()).
  • -gui β€” compile as a GUI application.
  • -link NAME β€” link extension with the compiled executable (this implies -uses).
  • -R NAME, -require-extension NAME β€” require extension and import it in the compiled code.
  • -dll, -library β€” compile multiple units into a dynamic library.
  • -libdir DIRECTORY β€” override the location of the runtime library directory.

πŸŽ€ Options to other passes πŸŽ€

  • -C OPTION β€” pass option to the C compiler.
  • -L OPTION β€” pass option to the linker.
  • -I<DIR> β€” pass -I<DIR> to the C compiler (add include path).
  • -L<DIR> β€” pass -L<DIR> to the linker (add library path).
  • -k β€” keep intermediate files.
  • -c β€” stop after compilation to object files.
  • -t β€” stop after translation to C.
  • -cc COMPILER β€” select a C compiler other than the default.
  • -cxx COMPILER β€” select a C++ compiler other than the default.
  • -ld COMPILER β€” select a linker other than the default.
  • -static β€” link with static CHICKEN libraries and extensions.
  • -F<DIR> β€” pass -F<DIR> to the C compiler (add framework header path on Mac OS X).
  • -framework NAME β€” passed to the linker on Mac OS X.
  • -rpath PATHNAME β€” add directory to the runtime library search path.
  • -Wl,... β€” pass linker options.
  • -strip β€” strip the resulting binary. πŸ’…

🫢 Inquiry options 🫢

  • -home β€” show home-directory (where support files go).
  • -cflags β€” show required C-compiler flags and exit.
  • -ldflags β€” show required linker flags and exit.
  • -libs β€” show required libraries and exit.
  • -cc-name β€” show the name of the default C compiler used.
  • -cxx-name β€” show the name of the default C++ compiler used.
  • -ld-name β€” show the name of the default linker used.
  • -dry-run β€” just show the commands executed, don't run them (this implies -v).

πŸ™ˆ Obscure options πŸ™ˆ

  • -debug MODES β€” display debugging output for the given modes.
  • -compiler PATHNAME β€” use a compiler other than the default chicken.
  • -raw β€” do not generate implicit init- and exit code.
  • -emit-external-prototypes-first β€” emit prototypes for callbacks before foreign declarations.
  • -regenerate-import-libraries β€” always emit import libraries, even when their contents haven't changed. The default behaviour is to preserve existing import libraries.
  • -ignore-repository β€” do not refer to the repository for extensions.
  • -keep-shadowed-macros β€” do not remove shadowed macros.
  • -host β€” compile for host when configured for cross-compiling.
  • -private-repository β€” load extensions from the executable path.
  • -deployed β€” link support file to be used from a deployed executable (sets rpath accordingly, if supported on this platform).
  • -no-elevation β€” embed manifest on Windows to supress elevation warnings for programs named install or setup. (yes, "supress", that's how it's spelled in the original, I'm not touching it πŸ’–)
πŸ¦‹ PSA bestie: options can be collapsed if unambiguous, so -vkfO is the same as -v -k -fixnum-arithmetic -optimize. It's giving "keyboard smash but make it intentional". Iconic.

🌈 ENVIRONMENT 🌈

The following environment variables change the behaviour of csc:

  • CSC_OPTIONS β€” can hold default options that should be passed to every invocation of csc.

⭐ EXIT STATUS ⭐

The csc utility exits 0 on success, and >0 if an error occurs.


πŸ’œ SEE ALSO πŸ’œ

More information can be found in the CHICKEN User's Manual: http://wiki.call-cc.org/manual/index.


πŸŽ€ AUTHORS πŸŽ€

The CHICKEN Team β€” absolute legends, no notes πŸ‘‘


πŸ’€ BUGS πŸ’€

Submit bug reports by e-mail to chicken-janitors@nongnu.org. They're nice, I promise, but like... be specific okay? 🫢


and that's the whole thing, bestie ✨ this page came from the Debian folks and it's dated Apr 26, 2017 β€” go forth and csc responsibly, mwah πŸ’…πŸ¦‹

πŸ“¦ where this page comes from