Hardcore Processing - Realize Your Wild Software Ideas Affordably

PATCHING MLTON 19990712 MANUALLY


Start Here | News | For Artists | For Developers | Products & Projects | Research & Articles | Entertainment | Company Profile | Contact

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:

  1. Remove the 'lib/libmlton.a' and 'lib/libgmp.a' files so that that they're recompiled. Later, applications will be linked with these files.
  2. Replace the Makefile under 'src/' with this one: Makefile.src (renamed to Makefile of course).
  3. Replace the following files under 'src/runtime/' with these: gc.c, mlton-lib.c, mlton-posix.c, Makefile, my-lib.c.
  4. Replace the following files under 'include/' with these: gc.h, mlton-lib.h, mlton-posix.h and my-lib.h.
  5. (ADDITION) Replace build-basis under 'basis-library'.
  6. (ADDITION) Replace top-level.sml under 'basis-library/top-level'.
  7. (BUGFIX) Replace real.sml under 'basis-library/real'.
  8. (BUGFIX) Replace text-io.sml under 'basis-library/io'.
  9. (ADDITION) Add the following files under 'basis-library/io': bin-io.sig and bin-io.sml.
  10. (BUGFIX) Replace the following files under 'basis-library/posix': file-sys.sig and primitive.sml.
  11. (BUGFIX) Replace abstract-value.fun under 'src/closure-convert'.
  12. (BUGFIX) Replace array2.sml under 'basis-library/arrays-and-vectors'.
  13. 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/.
  14. Now go to 'src/' and type 'make' (hopefully using the gcc Linux to Windows crosscompiler).
  15. 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.
  16. Add an empty 'ml-win32' file in 'src/runtime/gmp-2.0.2/config'.
  17. In the file 'src/runtime/gmp-2.0.2/configure.in/', add a line like the one with *-*-linux*) but with *win32*) instead.
  18. 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:





Hardcore ProcessingModified: 2023-05-19
E-mail: Contact