diff --git a/ocaml-4.02.0.patch b/ocaml-4.02.0.patch new file mode 100644 index 0000000..dea1175 --- /dev/null +++ b/ocaml-4.02.0.patch @@ -0,0 +1,11 @@ +--- a/ocamlutil/pretty.ml ++++ a/ocamlutil/pretty.ml +@@ -640,7 +640,7 @@ external format_float: string -> float -> string = "caml_format_float" + + let gprintf (finish : doc -> 'b) + (format : ('a, unit, doc, 'b) format4) : 'a = +- let format = (Obj.magic format : string) in ++ let format = string_of_format format in + + (* Record the starting align depth *) + let startAlignDepth = !alignDepth in diff --git a/ocaml-cil.spec b/ocaml-cil.spec index 89da007..3951d4b 100644 --- a/ocaml-cil.spec +++ b/ocaml-cil.spec @@ -2,7 +2,7 @@ Name: ocaml-cil Version: 1.7.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: CIL - Infrastructure for C Program Analysis and Transformation License: BSD @@ -26,6 +26,10 @@ Patch2: cil-1.7.3-enable-ocamlopt-g.patch # dependencies are calculated properly. Patch3: cil-1.7.3-add-package-cilconfig.patch +# Fix unsafe use of Obj.magic (upstream in > 1.7.3). +# https://bugzilla.redhat.com/show_bug.cgi?id=1120273 +Patch4: ocaml-4.02.0.patch + %description CIL (C Intermediate Language) is a high-level representation along with a set of tools that permit easy analysis and source-to-source @@ -107,6 +111,7 @@ for gcc. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build @@ -181,8 +186,9 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Mon Jul 21 2014 Richard W.M. Jones - 1.7.3-7 +* Mon Jul 21 2014 Richard W.M. Jones - 1.7.3-8 - OCaml 4.02.0 beta rebuild. +- Add patch from upstream to fix hang during build on 4.02.0. * Thu Jun 19 2014 Richard W.M. Jones - 1.7.3-6 - Fix Perl broken dependencies.