Hardcore Processing - Realize Your Wild Software Ideas Affordably
PATCHING MLTON 19990712 MANUALLY
Patching the mlton-1999-7-12 sourcecode manually
This section describes which files were modified in the relase compared
to the official 1999-7-12 release of MLton. However it is recommended
that you use the distributions found here: MLton for Windows.
Some of these changes are bugfixes or additions to MLton:
- Remove the 'lib/libmlton.a' and 'lib/libgmp.a' files so that
that they're recompiled. Later, applications
will be linked with these files.
- Replace the Makefile under 'src/' with this one:
Makefile.src (renamed to Makefile of course).
- Replace the following files under 'src/runtime/'
with these: gc.c, mlton-lib.c, mlton-posix.c,
Makefile, my-lib.c.
- Replace the following files under 'include/'
with these: gc.h, mlton-lib.h, mlton-posix.h
and my-lib.h.
- (ADDITION) Replace build-basis under 'basis-library'.
- (ADDITION) Replace top-level.sml under 'basis-library/top-level'.
- (BUGFIX) Replace real.sml under 'basis-library/real'.
- (BUGFIX) Replace text-io.sml under 'basis-library/io'.
- (ADDITION) Add the following files under 'basis-library/io':
bin-io.sig and bin-io.sml.
- (BUGFIX) Replace the following files under 'basis-library/posix':
file-sys.sig and primitive.sml.
- (BUGFIX) Replace abstract-value.fun under 'src/closure-convert'.
- (BUGFIX) Replace array2.sml under 'basis-library/arrays-and-vectors'.
- Activate your gcc Linux to Windows crosscompiler by setting the
appropriate path. I have used the binary available here with great success:
http://www.libsdl.org/Xmingw32/.
- Now go to 'src/' and type 'make' (hopefully using
the gcc Linux to Windows crosscompiler).
- It might work now, and if so - we're happy. However I had problems
with gmp. If compilation stops with an error related to gmp, then
do the following last 3 steps.
- Add an empty 'ml-win32' file in 'src/runtime/gmp-2.0.2/config'.
- In the file 'src/runtime/gmp-2.0.2/configure.in/', add a
line like the one with *-*-linux*) but with *win32*) instead.
- Go to 'src/' again and type 'make' again.
If all went well you now have some working runtime libraries
ready to be linked with when crosscompiling.
However you should edit the script 'bin/mlton' a little:
- The line 'mlton=...' should point to your native Linux version
of the MLton compiler - the file 'lib/mlton'. Just write the
full path to your native MLton compiler.
- In the line 'args=...' you should remove the '-lm' option,
since you cannot link with this when crosscompiling.
Modified: 2023-05-19
E-mail: Contact