From 02fb97676a3e2d7789ce8eaf86e17efc8c9e0553 Mon Sep 17 00:00:00 2001 From: Rmys Date: Thu, 24 Sep 2020 15:53:25 +0300 Subject: [PATCH] ocaml-4.11.1 --- ...Remove-configure-from-.gitattributes.patch | 28 ++++++++ ...hes-between-definition-and-declarati.patch | 69 +++++++++++++++++++ programming/language/ocaml/ocaml/pspec.xml | 13 +++- 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 programming/language/ocaml/ocaml/files/fedora/0004-Remove-configure-from-.gitattributes.patch create mode 100644 programming/language/ocaml/ocaml/files/fedora/0005-Fix-type-mismatches-between-definition-and-declarati.patch diff --git a/programming/language/ocaml/ocaml/files/fedora/0004-Remove-configure-from-.gitattributes.patch b/programming/language/ocaml/ocaml/files/fedora/0004-Remove-configure-from-.gitattributes.patch new file mode 100644 index 0000000000..b9003f7f78 --- /dev/null +++ b/programming/language/ocaml/ocaml/files/fedora/0004-Remove-configure-from-.gitattributes.patch @@ -0,0 +1,28 @@ +From 01d8e3f82adb382fb90af15879f722e824834c84 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 18 Jan 2020 11:31:27 +0000 +Subject: [PATCH 4/5] Remove configure from .gitattributes. + +It's not a binary file. +--- + .gitattributes | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/.gitattributes b/.gitattributes +index 200eb49c6..d871764de 100644 +--- a/.gitattributes ++++ b/.gitattributes +@@ -29,10 +29,6 @@ + + /boot/menhir/parser.ml* -diff + +-# configure is declared as binary so that it doesn't get included in diffs. +-# This also means it will have the correct Unix line-endings, even on Windows. +-/configure binary +- + # 'union' merge driver just unions textual content in case of conflict + # http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/ + /.mailmap merge=union +-- +2.28.0.rc2 + diff --git a/programming/language/ocaml/ocaml/files/fedora/0005-Fix-type-mismatches-between-definition-and-declarati.patch b/programming/language/ocaml/ocaml/files/fedora/0005-Fix-type-mismatches-between-definition-and-declarati.patch new file mode 100644 index 0000000000..587f5a68ec --- /dev/null +++ b/programming/language/ocaml/ocaml/files/fedora/0005-Fix-type-mismatches-between-definition-and-declarati.patch @@ -0,0 +1,69 @@ +From 122db7141d292d63cfbe2c7d7a4280cc73194ece Mon Sep 17 00:00:00 2001 +From: Xavier Leroy +Date: Wed, 5 Aug 2020 11:17:52 +0200 +Subject: [PATCH 5/5] Fix type mismatches between definition and declaration + (#9830) + +The C global variable caml_fl_merge and the C function +caml_spacetime_my_profinfo (bytecode version) were declared and +defined with different types. This is undefined behavior and +can cause link-time errors with link-time optimization (LTO). + +Closes: #9825 +--- + runtime/major_gc.c | 4 ++-- + runtime/spacetime_byt.c | 7 ++++++- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/runtime/major_gc.c b/runtime/major_gc.c +index 5e4f06bce..c8f5a3281 100644 +--- a/runtime/major_gc.c ++++ b/runtime/major_gc.c +@@ -63,7 +63,7 @@ uintnat caml_dependent_size, caml_dependent_allocated; + double caml_extra_heap_resources; + uintnat caml_fl_wsz_at_phase_change = 0; + +-extern char *caml_fl_merge; /* Defined in freelist.c. */ ++extern value caml_fl_merge; /* Defined in freelist.c. */ + + static char *markhp, *chunk, *limit; + static double p_backlog = 0.0; /* backlog for the gc speedup parameter */ +@@ -570,7 +570,7 @@ static void sweep_slice (intnat work) + break; + case Caml_blue: + /* Only the blocks of the free-list are blue. See [freelist.c]. */ +- caml_fl_merge = Bp_hp (hp); ++ caml_fl_merge = (value) Bp_hp (hp); + break; + default: /* gray or black */ + CAMLassert (Color_hd (hd) == Caml_black); +diff --git a/runtime/spacetime_byt.c b/runtime/spacetime_byt.c +index 2b0bf1dc2..b75fb0980 100644 +--- a/runtime/spacetime_byt.c ++++ b/runtime/spacetime_byt.c +@@ -12,8 +12,12 @@ + /* */ + /**************************************************************************/ + ++#define CAML_INTERNALS ++ + #include "caml/fail.h" + #include "caml/mlvalues.h" ++#include "caml/io.h" ++#include "caml/spacetime.h" + + int caml_ensure_spacetime_dot_o_is_included = 42; + +@@ -22,7 +26,8 @@ CAMLprim value caml_spacetime_only_works_for_native_code(value foo, ...) + caml_failwith("Spacetime profiling only works for native code"); + } + +-uintnat caml_spacetime_my_profinfo (void) ++uintnat caml_spacetime_my_profinfo (spacetime_unwind_info_cache * cached, ++ uintnat wosize) + { + return 0; + } +-- +2.28.0.rc2 + diff --git a/programming/language/ocaml/ocaml/pspec.xml b/programming/language/ocaml/ocaml/pspec.xml index b3439293f4..1161844b9d 100644 --- a/programming/language/ocaml/ocaml/pspec.xml +++ b/programming/language/ocaml/ocaml/pspec.xml @@ -18,7 +18,7 @@ Error: Files /usr/lib/ocaml/facile/facile.cmxa and /usr/lib/ocaml/stdlib.cmxa make inconsistent assumptions over implementation Printf --> - https://caml.inria.fr/distrib/ocaml-4.09/ocaml-4.09.1.tar.xz + https://caml.inria.fr/distrib/ocaml-4.11/ocaml-4.11.1.tar.xz zlib-devel ncurses-devel @@ -30,8 +30,8 @@ fedora/0003-configure-Allow-user-defined-C-compiler-flags.patch fedora/0003-configure-Remove-incorrect-assumption-about-cross-co.patch - - + fedora/0004-Remove-configure-from-.gitattributes.patch + fedora/0005-Fix-type-mismatches-between-definition-and-declarati.patch @@ -73,6 +73,13 @@ + + 2020-09-23 + 4.11.1 + Version bump. + Mustafa Cinasal + muscnsl@gmail.com + 2020-05-13 4.09.1