2 Linking
Links object files to create an extension (normally of a form that can
be loaded with
load-extension).
The quiet? argument indicates whether command should be
echoed to the current output port. The input-files argument
is list of compiled object filenames, and output-file is the
destination extension filename.
2.1 Linking Parameters
A parameter that determines the executable used as a linker.
The default is set by searching for an executable using the
PATH environment variable, or by using the LD or
MZSCHEME_DYNEXT_LINKER environment variable if it is defined
(and the latter takes precedence). On Windows, it looks for
"cl.exe", then "ld.exe" (gcc), then
"ilink32.exe" (Borland). On Cygwin, Solaris, FreeBSD 2.x,
or HP/UX, it looks for "ld". On other Unix variants, it
looks for "cc". #f indicates that no linker could be
found.
On Windows, default is (list "/LD") for "cl.exe",
(list "--dll") for "ld.exe", and (list "/Tpd" "/c") for "ilink32.exe". On Unix, the default
varies greatly among platforms. If the LDFLAGS or
MZSCHEME_DYNEXT_LINKER_FLAGS (the latter takes precedence)
environment variable is defined, then its value is parsed as a list of
strings that is appended before the defaults.
A parameter that processes linker input arguments; the parameter value
takes an input file path and returns a list of strings for the command
line. The default is
list.
A parameter that processes linker output arguments; the parameter
value takes an output file path and returns a list of strings for the
command line.
On Windows, the default converts "file" to (list "/Fefile") for "cl.exe", something like (list "-e" "_dll_entry@12" "-o" "file") for "ld.exe", and something
complex for "ilink32.exe". On Unix, the default converts
"file" to (list "-o" "file").
A parameter that determines libraries supplied to the linker, in
addition to other inputs. See also
expand-for-link-variant.
For most platforms, the default is
where mzdyn-thunk produces (list "mzdyn.o") for the
'cgc variant and (list "mzdyn3m.o") for the
'3m variant. See also current-use-mzdyn).
A parameter that determines whether the default standard link
libraries include the
"mzdyn" library which allows the
resulting file to be loaded via
load-extension. Defaults to
#t.
A parameter that indicates the target for linking, where
'normal is an alias for the result of
(system-type 'gc).
2.2 Helper Functions
2.3 Signature
Includes everything exported by the dynext/link module.
2.4 Unit