574c352
.TH "GAC" "1" "@VERSION@" "GAP" "User Commands"
574c352
.SH "NAME"
574c352
gac \- Compile GAP input files
574c352
.SH "SYNOPSIS"
574c352
.B gac
574c352
[\fI\-d\fP] [\fI\-c|\-C\fP] [\fI\-o <output>\fP] {\fI\-f<option>\fP}
574c352
\fI<input>\fP ...
574c352
.SH "DESCRIPTION"
574c352
.PP
574c352
GAC compiles GAP input files, which must be GAP source code (suffix '.g' or
574c352
\'.gap'), C source code (suffix '.c'), or compiled code files (suffix '.o').
574c352
.SH "OPTIONS"
574c352
If neither \fI\-c\fP nor \fI\-C\fP is given, then gac compiles the code
574c352
completely, producing a new kernel for static compilation or a dynamically
574c352
loadable '.so' file for dynamic compilation.
574c352
.TP
574c352
\fB\-d\fP, \fB\-\-dynamic\fP
574c352
Compile for dynamic loading.
574c352
.TP
574c352
\fB\-c\fP, \fB\-\-compile\fP
574c352
Only compile the input files to '.o' object files, which must be further
574c352
linked to make a static kernel or dynamically loadable module.
574c352
.TP
574c352
\fB\-C\fP, \fB\-\-create\-c\fP
574c352
Only compile the input files to C code, which will require compilation and
574c352
linking to be usable.
574c352
.TP
574c352
\fB\-r\fP
574c352
Statically compiled files are assumed to be given by pathnames relative to the
574c352
GAP root, and will be compiled for automatic loading when files are sought
574c352
relative to the GAP root.
574c352
.TP
574c352
\fB\-o\fP, \fB\-\-output\fP \fI<output>\fP
574c352
Set the name of the output file.
574c352
.TP
574c352
\fB\-ffast\-int\-arith\fP
574c352
Emit code for arithmetic operations which works faster if both operands are
574c352
small integers, and slower otherwise.
574c352
.TP
574c352
\fB\-ffast\-plain\-lists\fP
574c352
Emit code for list access which works faster if the list is a plain list, and
574c352
slower otherwise.
574c352
.TP
574c352
\fB\-ffast\-list\-funcs\fP
574c352
Inline the list functions 'Add' and 'Length', for a small speed boost.
574c352
.TP
574c352
\fB\-fno\-check\-types\fP
574c352
Emit no error checks for element types, which improves performance but may
574c352
result in a crash if an error happens.
574c352
.TP
574c352
\fB\-fno\-check\-list\-elms\fP
574c352
Emit no error checks for list access, which improves performance but may
574c352
result in a crash if an error happens.
574c352
.TP
574c352
\fB\-p\fP \fI<option>\fP
574c352
Pass the given option to the C compiler.
574c352
.TP
574c352
\fB\-P\fP \fI<option>\fP
574c352
Pass the given option to the C linker.
574c352
.TP
574c352
\fB\-k\fP, \fB\-\-gap\-compiler\fP \fI<path>\fP
574c352
Use the given path to find the GAP binary, instead of the default.
574c352
.TP
574c352
\fB\-i\fP, \fB\-\-gap\-include\fP \fI<path>\fP
574c352
Use the given path to find the GAP header files, instead of the default.
574c352
.TP
574c352
\fB\-l\fP, \fB\-\-gap\-binary\fP \fI<path>\fP
574c352
Use the given path to find the GAP binary directory, instead of the default.
574c352
.SH "SEE ALSO"
574c352
.PP
574c352
\fIgap\fP(1), \fIupdate-gap-workspace\fP(1)