Blob Blame History Raw
--- xen-4.17.1/tools/ocaml/common.make.orig	2023-04-27 06:53:19.000000000 -0600
+++ xen-4.17.1/tools/ocaml/common.make	2023-06-20 09:47:25.250969763 -0600
@@ -11,9 +11,9 @@ OCAMLFIND ?= ocamlfind
 
 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
-OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F
+OCAMLOPTFLAG_G := -g
+OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F -I +unix
+OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F -I +unix
 
 VERSION := 4.1
 
--- xen-4.17.1/tools/ocaml/Makefile.rules.orig	2023-04-27 06:53:19.000000000 -0600
+++ xen-4.17.1/tools/ocaml/Makefile.rules	2023-06-20 10:00:58.769235173 -0600
@@ -59,9 +59,9 @@ quiet-command = $(if $(V),$1,@printf " %
 mk-caml-lib-native = $(call quiet-command, $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $1 $2 $3,MLA,$1)
 mk-caml-lib-bytecode = $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -a -o $1 $2 $3,MLA,$1)
 
-mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a` $2,MKLIB,$1)
+mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -g -o `basename $1 .a` $2,MKLIB,$1)
 mk-caml-lib-stubs = \
-	$(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1)
+	$(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -g -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1)
 
 # define a library target <name>.cmxa and <name>.cma
 define OCAML_LIBRARY_template
--- xen-4.17.1/tools/ocaml/xenstored/disk.ml.orig	2023-04-27 06:53:19.000000000 -0600
+++ xen-4.17.1/tools/ocaml/xenstored/disk.ml	2023-06-20 09:49:44.361963710 -0600
@@ -30,7 +30,7 @@ let undec c =
   | _          -> raise (Failure "undecify")
 
 let unhex c =
-  let c = Char.lowercase c in
+  let c = Char.lowercase_ascii c in
   match c with
   | '0' .. '9' -> (Char.code c) - (Char.code '0')
   | 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10