diff --git a/pkgs/development/compilers/ocaml/4.09.1-Werror.patch b/pkgs/development/compilers/ocaml/4.09.1-Werror.patch new file mode 100644 index 00000000000..153c8a06e34 --- /dev/null +++ b/pkgs/development/compilers/ocaml/4.09.1-Werror.patch @@ -0,0 +1,16 @@ +The 4.09.1 tarball appears to have been acidentally generated as a +development tarball, which causes configure to enable -Werror. This +means newer compilers will make the build fail. + +diff a/configure b/configure +--- a/configure ++++ b/configure +@@ -12360,7 +12360,7 @@ case $ocaml_cv_cc_vendor in #( + msvc-*) : + outputobj=-Fo; CPP="cl -nologo -EP"; gcc_warnings="" ;; #( + *) : +- outputobj='-o $(EMPTY)'; case 4.09.1+dev1-2020-03-13 in #( ++ outputobj='-o $(EMPTY)'; case 4.09.1 in #( + *+dev*) : + gcc_warnings="-Wall -Werror" ;; #( + *) : diff --git a/pkgs/development/compilers/ocaml/4.09.nix b/pkgs/development/compilers/ocaml/4.09.nix index c5f649c15d6..2d067209390 100644 --- a/pkgs/development/compilers/ocaml/4.09.nix +++ b/pkgs/development/compilers/ocaml/4.09.nix @@ -8,6 +8,7 @@ import ./generic.nix { hardeningDisable = [ "strictoverflow" ]; patches = [ + ./4.09.1-Werror.patch # Compatibility with Glibc 2.34 { url = "https://github.com/ocaml/ocaml/commit/8eed2e441222588dc385a98ae8bd6f5820eb0223.patch"; sha256 = "sha256:1b3jc6sj2k23yvfwrv6nc1f4x2n2biqbhbbp74aqb6iyqyjsq35n"; }