Patches for building old versions of OCaml on modern Windows installations
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
GPR405-to-4.01.0.patch
GPR405-to-4.02.1.patch
GPR405.patch
GPR582.patch
GPR658-3.11.0.patch
GPR658-to-3.09.3.patch
GPR658-to-3.10.2.patch
GPR658-to-3.11.2.patch
GPR658-to-4.01.0.patch
GPR658-to-4.02.1.patch
GPR658-to-4.02.3.patch
GPR658.patch
GPR678-4.01.0.patch
GPR678-to-4.00.1.patch
GPR678.patch
GPR820-4.00.patch
GPR820-4.02.1.patch
GPR820-4.02.2+.patch
GPR820.patch
GPR912.patch
PR3485.patch
PR3821-to-3.08.2.patch
PR3821.patch
PR4483.patch
PR4575.patch
PR4614.patch
PR4683.patch
PR4700.patch
PR4847-3.10.x.patch
PR4847.patch
PR5011-3.11.patch
PR5011-3.12+4.00.patch
PR5011.patch
PR5331.patch
PR5477-3.10.0.patch
PR5477-to-3.09.3.patch
PR5477-to-3.10.2.patch
PR5477-to-3.12.1.patch
PR6766.patch
PR6797.patch
README.md
all.sh
build.sh
cc-profile.patch
config-option-3.07.patch
config-option-3.08.patch
debugtype-3.09.3.patch
debugtype-to-3.08.2.patch
debugtype-to-3.09.2.patch
gpr#465-3.09.0+.patch
gpr#465-3.12.0+.patch
mingw-to-3.08.4.patch
mingw-to-3.09.3.patch
mingw-to-3.10.2.patch
mingw-to-3.12.1.patch
msvc-3.09.patch
msvc-to-3.08.4.patch
msvc64-3.10.patch
msvc64-3.11.patch
ocamldoc-3.07.patch
ocamldoc-build.patch
output-obj.patch
tcl-tk-amd64-3.10.patch
tcl-tk-amd64-3.11-84.patch
tcl-tk-amd64-3.11-85.patch
tcl-tk-amd64-4.x.patch
win-runtimed-to-4.00.1.patch
win-runtimed.patch
win32-graph.patch

README.md

OCaml Legacy Building Patches for Windows

This repository contains patches necessary for compiling the native Windows versions of OCaml from 3.07 onwards.

Additionally, a couple of utility shell scripts are provided for doing bulk-builds and applying the patches. In order for these scripts to function correctly, the tarballs for the required version(s) of OCaml must be downloaded from Inria (and also the two official .diffs patch files for OCaml 3.07+1 and 3.07+2).

Features

config-option (OCaml 3.07--3.08.4): back-ports the -config option added in 3.09.0. The patch is compatible with GPR465 and uses the identifier config-option.

win32-graph (OCaml 3.08.4): back-ports commit 7a7a87 from 3.09.0, fixing the graphics library for Windows.

The following relate to GitHub Pull Requests and Mantis PRs:

GPR465 (OCaml 3.07--): adds a patches to the output of ocamlc -config for noting changes to the compiler. The patches themselves are from the pull request. The patch combines with the config-option patch to support 3.07 and 3.08 as well.

GPR582 (OCaml 4.03.0): back-ports cfb03b fixing installation of .cmx files for the systhreads library.

GPR658 (OCaml 3.07--): ensures that paths are always displayed using backslashes (from ocamlc -config, camlp4 -where and ocamlbuild -where).

GPR678 (OCaml 3.08.0--): correctly fixes PR3963 which, for 4.01.0 onwards means that Graphics.close_graph doesn't crash the 64-bit runtime and for all versions means that calls to Graphics.wait_next_event are unblocked by closing the graphics Window.

PR4575 (OCaml 3.10.x): back-ports a fix to the output of ocamlbuild -where as a \r character was included in the output.

PR4683 (OCaml 3.11.x): back-ports commit 27e0b7 from 3.12.0 installing labltk.bat instead of a bash script.

PR4847 (OCaml 3.10.0--3.11.1): back-ports commits f98e29 and a795c5 to ocamlc -output-obj for msvc64.

PR5331 (OCaml 3.12.1): back-ports commit 6b6e39 fixing the installation of ocamlmktop without the .exe extension on Windows.

PR6766 (OCaml 3.12.0--4.02.3): back-ports commit b014f2 fixing an intermittent crash when using systhreads.

PR6797 (OCaml 4.02.2--4.02.3): back-ports commit 44b8b5 fixing the -output-complete-obj option for the Microsoft C compiler ports.

Patches

The following patches address build system or environment changes which have occurred since these versions of OCaml were originally released:

cc-profile (OCaml 3.07--3.10.2): CC_PROFILE was not substituted when building utils/config.ml resulting in harmless, though invalid, output in ocamlc -config.

debugtype (OCaml 3.07--3.09.3): back-ports commits ac86cc and 536dfe to remove the /debugtype:cv which ceased to be support in Visual Studio .NET 2002.

mingw (OCaml 3.07--3.12.1): config/Makefile.mingw used the old -mno-cygin method of invoking the MinGW version of GCC, which is no longer support in Cygwin.

msvc (OCaml 3.07--3.09.3): config/Makefile.msvc uses the Cygwin ld, nm and objcopy commands. This optional patch switches them to use the i686-w64-mingw32- prefixed versions instead.

msvc64 (OCaml 3.10.x and 3.11.x): config/Makefile.msvc includes a library only required in the pre-release version of the 64-bit Windows SDK.

ocamldoc-3.07 (OCaml 3.07): missing spaces in ocamldoc/Makefile.nt (it's actually not clear how this ever functioned, even in an old version of make!).

ocamldoc-build (OCaml 3.07--4.00.1): fixes a build system problem caused by various French accents in ocamldoc (a concerted effort was made to eliminate encoding problems prior to OCaml 4.01.0).

output-obj (OCaml 3.07): back-ports a small part of e2b313 which suppresses a warning emitted by GCC for ocamlc -output-obj

tcl-tk-amd64 (OCaml 3.10.x--4.01.0): at the time of the release of 64-bit OCaml for Windows (using the Microsoft C Compiler for 3.10.0 and also GCC for 4.00.0) there was not a readily available 64-bit distribution of Tcl/Tk for Windows, so labltk was disabled for these ports. However, it has always worked and these patches enable the build system to build the 64-bit labltk for all versions.

win-runtimed (OCaml 3.11.0--4.02.1): back-ports commit 615472 which fixes the output filename when compiling the debug runtime.

The following patches relate to GitHub Pull Requests and Mantis PRs:

GPR405 (OCaml 3.07--4.02.3): enables compilation of the MSVC ports with Visual Studio 2015.

GPR820 (OCaml 4.00.0--): fixes various issues with compilation of the debugging version of the bytecode runtime. The is probably necessary for versions prior to 4.00, but those versions will also need the machinery for -with-debug-runtime to be back-ported (at present, that's not considered necessary).

GPR912 (OCaml 4.04.0): back-ports a fix to Unix.create_process causing segfaults in the 64-bit MSVC port on Windows 10.

PR3485 (OCaml 3.07--3.08.2): back-ports a Cygwin-related change made in OCaml 3.08.3.

PR3821 (OCaml 3.07--3.09.3): back-ports the rest of 536dfe to add /subsystem:console option for all invocations of the Microsoft C compiler added in 3.10.0. This is necessary to enable building with Visual Studio 2015.

PR4483 (OCaml 3.10.1): back-ports commit fd07b4 from OCaml 3.10.2 converting byterun/finalise.c back to ANSI C.

PR4614 (OCaml 3.07--3.10.x): back-ports commits ad3ca0 and ff88bb to allow building with Tcl/Tk 8.5 to OCaml 3.11.0 when support was officially added.

PR4700 (OCaml 3.07--4.01.0): disables the tkanim library when building with Tcl/Tk 8.5 or later.

PR5011 (OCaml 3.07--4.00.x): back-ports changes introduced in OCaml 4.01.0 to support Tcl/Tk 8.6.

PR5477 (OCaml 3.07--3.12.1): back-ports detection of libX11 using pkg-config from OCaml 4.00.0.

Copyright

all.sh and build.sh are copyright MetaStack Solutions Ltd., 2016 and distributed under the terms of the licence given at the top of each file.

Patches above described as back-ports represent work already in the OCaml repository. The changes made in these patches are the copyrights of their respective authors and are distributed under the terms of the GNU Lesser Public Licence version 2.1 (see the file LICENSE in the OCaml repository).

All other patches are the work of David Allsopp and are released under the Creative Commons CC0 1.0 Universal licence.