From 9157dbbfbd9464c74f2226110da3120f9a615f7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 26 Mar 2021 11:15:56 +0100 Subject: [PATCH] - build fixes for ocaml 4.12 - rel 2 --- ocaml-4.12.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ xen.spec | 4 +++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 ocaml-4.12.patch diff --git a/ocaml-4.12.patch b/ocaml-4.12.patch new file mode 100644 index 0000000..f82f446 --- /dev/null +++ b/ocaml-4.12.patch @@ -0,0 +1,44 @@ +--- xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 ++++ xen-4.14.1/tools/ocaml/libs/xentoollog/xentoollog_stubs.c 2021-03-01 22:53:23.106205483 +0000 +@@ -53,8 +53,6 @@ + #include "_xtl_levels.inc" + + /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */ +-#define Val_none Val_int(0) +-#define Some_val(v) Field(v,0) + + static value Val_some(value v) + { +--- xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 ++++ xen-4.14.1/tools/ocaml/libs/xl/xenlight_stubs.c 2021-03-01 23:01:24.229859714 +0000 +@@ -227,8 +227,6 @@ + } + + /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */ +-#define Val_none Val_int(0) +-#define Some_val(v) Field(v,0) + + static value Val_some(value v) + { +--- xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c.orig 2020-12-17 16:47:25.000000000 +0000 ++++ xen-4.14.1/tools/ocaml/libs/xc/xenctrl_stubs.c 2021-03-01 23:24:45.477290290 +0000 +@@ -43,8 +43,6 @@ + #define _H(__h) ((xc_interface *)(__h)) + #define _D(__d) ((uint32_t)Int_val(__d)) + +-#define Val_none (Val_int(0)) +- + #define string_of_option_array(array, index) \ + ((Field(array, index) == Val_none) ? NULL : String_val(Field(Field(array, index), 0))) + +--- xen-4.13.1/tools/ocaml/common.make~ 2020-05-14 14:19:32.000000000 +0200 ++++ xen-4.13.1/tools/ocaml/common.make 2021-03-26 11:08:01.558827358 +0100 +@@ -9,7 +9,7 @@ + OCAMLYACC ?= ocamlyacc + OCAMLFIND ?= ocamlfind + +-CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) ++CFLAGS += -fPIC -I$(shell ocamlc -where) + + OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') + OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F diff --git a/xen.spec b/xen.spec index 27395fb..4854342 100644 --- a/xen.spec +++ b/xen.spec @@ -41,7 +41,7 @@ Summary: Xen - a virtual machine monitor Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej Name: xen Version: 4.13.1 -Release: 1 +Release: 2 License: GPL v2, interface parts on BSD-like Group: Applications/System # for available versions see https://www.xenproject.org/developers/teams/hypervisor.html @@ -99,6 +99,7 @@ Patch12: %{name}-systemd.patch Patch13: sysmacros.patch Patch14: gcc9.patch Patch15: gcc10.patch +Patch16: ocaml-4.12.patch URL: http://www.xen.org/products/xenhyp.html BuildRequires: autoconf >= 2.67 %ifarch %{ix86} %{x8664} @@ -393,6 +394,7 @@ Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware # -Wno-error=enum-conversion requires gcc 10 %patch15 -p1 %endif +%patch16 -p1 # stubdom sources ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom -- 2.43.0