[arch-commits] Commit in llvm/trunk (PKGBUILD llvm-3.5.0-fix-ocaml-as-needed.patch)

Evangelos Foutras foutrelis at archlinux.org
Tue Dec 23 12:16:44 UTC 2014


    Date: Tuesday, December 23, 2014 @ 13:16:44
  Author: foutrelis
Revision: 227947

upgpkg: llvm 3.5.0-3

- OCaml 4.02.1 rebuild.
- Fix OCaml bindings linking with -Wl,--as-needed (FS#43197).

Added:
  llvm/trunk/llvm-3.5.0-fix-ocaml-as-needed.patch
Modified:
  llvm/trunk/PKGBUILD

--------------------------------------+
 PKGBUILD                             |   20 ++++++++++++++------
 llvm-3.5.0-fix-ocaml-as-needed.patch |   14 ++++++++++++++
 2 files changed, 28 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-12-23 12:00:35 UTC (rev 227946)
+++ PKGBUILD	2014-12-23 12:16:44 UTC (rev 227947)
@@ -12,13 +12,14 @@
 pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'clang' 'clang-analyzer'
          'clang-tools-extra')
 pkgver=3.5.0
-pkgrel=2.1
+pkgrel=3
+_ocaml_ver=4.02.1
 arch=('i686' 'x86_64')
 url="http://llvm.org/"
 license=('custom:University of Illinois/NCSA Open Source License')
-makedepends=('libffi' 'python2' 'ocaml' 'python-sphinx' 'chrpath')
+makedepends=('libffi' 'python2' "ocaml=$_ocaml_ver" 'python-sphinx' 'chrpath')
 # Use gcc-multilib to build 32-bit compiler-rt libraries on x86_64 (FS#41911)
-[[ $CARCH = x86_64 ]] && makedepends+=('gcc-multilib')
+makedepends_x86_64=('gcc-multilib')
 options=('staticlibs')
 source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
         http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
@@ -26,6 +27,7 @@
         http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
         llvm-3.5.0-force-link-pass.o.patch
         llvm-3.5.0-fix-cmake-llvm-exports.patch
+        llvm-3.5.0-fix-ocaml-as-needed.patch
         llvm-Config-config.h
         llvm-Config-llvm-config.h)
 sha256sums=('28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03'
@@ -38,8 +40,10 @@
             'SKIP'
             '5702053503d49448598eda1b8dc8c263f0df9ad7486833273e3987b5dec25a19'
             '841a153d0e9d2d196ea5318388ff295e69c41547eb73b24edf92a1b2cc3cccdd'
+            '0d8b268cf101b0a08dbe458a041c33be0500d09b1a62ed0a16f205758647a5fc'
             '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
             '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
+validpgpkeys=('54E3BDE33185D9F69664D22455F5CD70BB5A0569')
 
 prepare() {
   cd "$srcdir/llvm-$pkgver.src"
@@ -62,11 +66,15 @@
 
   # Fix build with GCC 4.9 (patch from Debian)
   # http://llvm.org/bugs/show_bug.cgi?id=20067
-  patch -Np1 -i "$srcdir/llvm-3.5.0-force-link-pass.o.patch"
+  patch -Np1 -i ../llvm-3.5.0-force-link-pass.o.patch
 
   # Fix generation of broken LLVMExports.cmake file
   # http://llvm.org/bugs/show_bug.cgi?id=20884
-  patch -Np0 -i "$srcdir/llvm-3.5.0-fix-cmake-llvm-exports.patch"
+  patch -Np0 -i ../llvm-3.5.0-fix-cmake-llvm-exports.patch
+
+  # Fix OCaml bindings linking with -Wl,--as-needed
+  # http://llvm.org/bugs/show_bug.cgi?id=22014
+  patch -Np1 -i ../llvm-3.5.0-fix-ocaml-as-needed.patch
 }
 
 build() {
@@ -173,7 +181,7 @@
 
 package_llvm-ocaml() {
   pkgdesc="OCaml bindings for LLVM"
-  depends=("llvm=$pkgver-$pkgrel" 'ocaml')
+  depends=("llvm=$pkgver-$pkgrel" "ocaml=$_ocaml_ver")
 
   cd "$srcdir/llvm-$pkgver.src"
 

Added: llvm-3.5.0-fix-ocaml-as-needed.patch
===================================================================
--- llvm-3.5.0-fix-ocaml-as-needed.patch	                        (rev 0)
+++ llvm-3.5.0-fix-ocaml-as-needed.patch	2014-12-23 12:16:44 UTC (rev 227947)
@@ -0,0 +1,14 @@
+diff -upr llvm-3.5.0.src.orig/bindings/ocaml/Makefile.ocaml llvm-3.5.0.src/bindings/ocaml/Makefile.ocaml
+--- llvm-3.5.0.src.orig/bindings/ocaml/Makefile.ocaml	2014-12-23 12:28:27.000000000 +0200
++++ llvm-3.5.0.src/bindings/ocaml/Makefile.ocaml	2014-12-23 12:35:36.000000000 +0200
+@@ -243,8 +243,8 @@ uninstall-local:: uninstall-shared
+ 
+ $(SharedLib): $(ObjectsO) $(OcamlDir)/.dir
+ 	$(Echo) "Building $(BuildMode) $(notdir $@)"
+-	$(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) $(LLVMLibsOptions) \
+-			-o $@ $(ObjectsO)
++	$(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) -o $@ $(ObjectsO) \
++			$(LLVMLibsOptions)
+ 
+ clean-shared::
+ 	-$(Verb) $(RM) -f $(SharedLib)



More information about the arch-commits mailing list