[arch-commits] Commit in llvm/trunk (PKGBUILD llvm-ocaml-ctypes-0.4.patch)
Evangelos Foutras
foutrelis at archlinux.org
Sat Jul 25 18:59:00 UTC 2015
Date: Saturday, July 25, 2015 @ 20:58:59
Author: foutrelis
Revision: 242501
upgpkg: llvm 3.6.2-2
ocaml-ctypes 0.4 rebuild.
Added:
llvm/trunk/llvm-ocaml-ctypes-0.4.patch
Modified:
llvm/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 7 +++
llvm-ocaml-ctypes-0.4.patch | 75 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-07-25 18:58:52 UTC (rev 242500)
+++ PKGBUILD 2015-07-25 18:58:59 UTC (rev 242501)
@@ -12,7 +12,7 @@
pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lldb' 'clang' 'clang-analyzer'
'clang-tools-extra')
pkgver=3.6.2
-pkgrel=1
+pkgrel=2
_ocaml_ver=4.02.1
arch=('i686' 'x86_64')
url="http://llvm.org/"
@@ -28,6 +28,7 @@
http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
http://llvm.org/releases/$pkgver/lldb-$pkgver.src.tar.xz{,.sig}
llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+ llvm-ocaml-ctypes-0.4.patch
llvm-Config-config.h
llvm-Config-llvm-config.h)
sha256sums=('f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94'
@@ -41,6 +42,7 @@
'940dc96b64919b7dbf32c37e0e1d1fc88cc18e1d4b3acf1e7dfe5a46eb6523a9'
'SKIP'
'7e62bd5dd1ae5755a63abab692ae366186be392104e232e6b3a10a4ea5807283'
+ '0e45ad131908a121f628d1575d32b7ad522b3a7039b517dfef4aac25243f3e7f'
'312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294')
@@ -74,6 +76,9 @@
# Fix docs/Makefile to use ocamlfind
# http://llvm.org/bugs/show_bug.cgi?id=22737
patch -Np1 -i ../llvm-3.6.0-use-ocamlfind-for-ocamldoc.patch
+
+ # Fix build with ocaml-ctypes 0.4.x
+ patch -Np1 -i ../llvm-ocaml-ctypes-0.4.patch
}
build() {
Added: llvm-ocaml-ctypes-0.4.patch
===================================================================
--- llvm-ocaml-ctypes-0.4.patch (rev 0)
+++ llvm-ocaml-ctypes-0.4.patch 2015-07-25 18:58:59 UTC (rev 242501)
@@ -0,0 +1,75 @@
+From b9fec3eb617427a77d2b73fd962e90bb4b5d734f Mon Sep 17 00:00:00 2001
+From: Peter Zotov <whitequark at whitequark.org>
+Date: Sat, 27 Jun 2015 14:32:30 +0000
+Subject: [PATCH] [OCaml] Bump ctypes dependency to 0.4.
+
+ctypes 0.3 and earlier contains an interface-definig bug:
+its ptr_of_raw_address accepts Int64 and not Nativeint. ctypes 0.4
+was not released during the 3.6 cycle, and because of that, LLVM 3.6
+was released with ctypes 0.3 as a dependency, which now breaks
+the build on modern ctypes.
+
+Unbreak.
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240882 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ bindings/ocaml/executionengine/llvm_executionengine.ml | 10 +++++-----
+ cmake/config-ix.cmake | 4 ++--
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/bindings/ocaml/executionengine/llvm_executionengine.ml b/bindings/ocaml/executionengine/llvm_executionengine.ml
+index 34031be..3f37e0c 100644
+--- a/bindings/ocaml/executionengine/llvm_executionengine.ml
++++ b/bindings/ocaml/executionengine/llvm_executionengine.ml
+@@ -43,11 +43,11 @@ external run_static_dtors : llexecutionengine -> unit
+ = "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 add_global_mapping llval ptr ee =
+
+ 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"))
+diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
+index 4e22aab..f0855d6 100755
+--- a/cmake/config-ix.cmake
++++ b/cmake/config-ix.cmake
+@@ -546,13 +546,13 @@ else()
+ if( OCAML_VERSION VERSION_LESS "4.00.0" )
+ message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
+ else()
+- find_ocamlfind_package(ctypes VERSION 0.3 OPTIONAL)
++ find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
+ if( HAVE_OCAML_CTYPES )
+ message(STATUS "OCaml bindings enabled.")
+ find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
+ set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
+ else()
+- message(STATUS "OCaml bindings disabled, need ctypes >=0.3.")
++ message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
+ endif()
+ endif()
+ endif()
More information about the arch-commits
mailing list