summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch')
-rw-r--r--sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch b/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch
new file mode 100644
index 000000000000..154c9cc25f77
--- /dev/null
+++ b/sys-devel/llvm/files/llvm-3.6.0-ocaml-ctypes-0.4.0.patch
@@ -0,0 +1,35 @@
+diff -Naur llvm-3.6.0.src.orig/bindings/ocaml/executionengine/llvm_executionengine.ml llvm-3.6.0.src/bindings/ocaml/executionengine/llvm_executionengine.ml
+--- llvm-3.6.0.src.orig/bindings/ocaml/executionengine/llvm_executionengine.ml 2015-03-17 11:49:27.274824345 +0100
++++ llvm-3.6.0.src/bindings/ocaml/executionengine/llvm_executionengine.ml 2015-03-17 11:49:40.333829421 +0100
+@@ -43,11 +43,11 @@
+ = "llvm_ee_run_static_dtors"
+ external data_layout : llexecutionengine -> Llvm_target.DataLayout.t
+ = "llvm_ee_get_data_layout"
+-external add_global_mapping_ : Llvm.llvalue -> int64 -> llexecutionengine -> unit
++external add_global_mapping_ : Llvm.llvalue -> nativeint -> llexecutionengine -> unit
+ = "llvm_ee_add_global_mapping"
+-external get_global_value_address_ : string -> llexecutionengine -> int64
++external get_global_value_address_ : string -> llexecutionengine -> nativeint
+ = "llvm_ee_get_global_value_address"
+-external get_function_address_ : string -> llexecutionengine -> int64
++external get_function_address_ : string -> llexecutionengine -> nativeint
+ = "llvm_ee_get_function_address"
+
+ let add_global_mapping llval ptr ee =
+@@ -55,14 +55,14 @@
+
+ let get_global_value_address name typ ee =
+ let vptr = get_global_value_address_ name ee in
+- if Int64.to_int vptr <> 0 then
++ if Nativeint.to_int vptr <> 0 then
+ let open Ctypes in !@ (coerce (ptr void) (ptr typ) (ptr_of_raw_address vptr))
+ else
+ raise (Error ("Value " ^ name ^ " not found"))
+
+ let get_function_address name typ ee =
+ let fptr = get_function_address_ name ee in
+- if Int64.to_int fptr <> 0 then
++ if Nativeint.to_int fptr <> 0 then
+ let open Ctypes in coerce (ptr void) typ (ptr_of_raw_address fptr)
+ else
+ raise (Error ("Function " ^ name ^ " not found"))