[arch-commits] Commit in lib32-llvm/trunk (PKGBUILD)

Laurent Carlier lcarlier at archlinux.org
Thu Sep 17 15:07:11 UTC 2015


    Date: Thursday, September 17, 2015 @ 17:07:11
  Author: lcarlier
Revision: 140408

upgpkg: lib32-llvm 3.7.0-1

upstream update 3.7.0

Modified:
  lib32-llvm/trunk/PKGBUILD

----------+
 PKGBUILD |   44 ++++++++++++++++++++++++++++++--------------
 1 file changed, 30 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-17 14:58:57 UTC (rev 140407)
+++ PKGBUILD	2015-09-17 15:07:11 UTC (rev 140408)
@@ -10,7 +10,7 @@
 # Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
 
 pkgname=('lib32-llvm' 'lib32-llvm-libs' 'lib32-clang')
-pkgver=3.6.2
+pkgver=3.7.0
 pkgrel=1
 arch=('x86_64')
 url="http://llvm.org/"
@@ -20,13 +20,14 @@
 source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
         http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
         http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig})
-sha256sums=('f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94'
+sha256sums=('ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153'
             'SKIP'
-            'ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3'
+            '4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc'
             'SKIP'
-            '0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87'
+            '227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b'
             'SKIP')
-validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294')
+validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294'
+              'B6C8F98282B944E3B0D5C2530FC3042E345AD05D')
 
 prepare() {
   cd "$srcdir/llvm-$pkgver.src"
@@ -34,6 +35,11 @@
   mv "$srcdir/cfe-$pkgver.src" tools/clang
   mv "$srcdir/compiler-rt-$pkgver.src" projects/compiler-rt
 
+  # Fix compiler-rt build on i686
+  # https://llvm.org/bugs/show_bug.cgi?id=22661
+  sed -i '/ifeq.*CompilerTargetArch/s/i386/i686/g' \
+    projects/compiler-rt/make/platform/clang_linux.mk
+
   # Fix installation directories, ./configure doesn't seem to set them right
   sed -i -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib32:' \
          -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
@@ -43,10 +49,12 @@
   sed -i 's:LLVM_LIBDIR="${prefix}/lib":LLVM_LIBDIR="${prefix}/lib32":' \
     autoconf/configure.ac \
     configure
+
+  mkdir build
 }
 
 build() {
-  cd "$srcdir/llvm-$pkgver.src"
+  cd "$srcdir/llvm-$pkgver.src/build"
 
   export CC="gcc -m32"
   export CXX="g++ -m32"
@@ -58,7 +66,7 @@
   # We had to force host and target to get
   # a proper triplet reported by llvm
 
-  ./configure \
+  ../configure \
     --prefix=/usr \
     --libdir=/usr/lib32 \
     --sysconfdir=/etc \
@@ -81,8 +89,20 @@
 
   cd "$srcdir/llvm-$pkgver.src"
 
-  make DESTDIR="$pkgdir" install
+  # Temporarily rename clang and lldb directories so they don't get installed
+  for tool in clang; do
+      mv build/tools/$tool{,.hidden}
+      mv tools/$tool{,.hidden}
+  done
+ 
+  make -C build DESTDIR="$pkgdir" install
 
+  # Restore original tool directory names
+  for tool in clang; do
+      mv build/tools/$tool{.hidden,}
+      mv tools/$tool{.hidden,}
+  done
+ 
   # The runtime library goes into lib32-llvm-libs
   mv "$pkgdir/usr/lib32/libLLVM-$pkgver.so" "$srcdir/"
   mv "$pkgdir/usr/lib32/libLLVM-${pkgver%.*}.so" "$srcdir/"
@@ -103,10 +123,6 @@
   mv "$pkgdir"/usr/include/llvm/Config/*config.h "$pkgdir/"
   rm -rf "$pkgdir"/usr/{bin,include,share/{doc,man,llvm}}
   
-  # remove conflicting clang files
-  rm -r "$pkgdir"/usr/lib
-  rm "$pkgdir"/usr/lib32/libclang*
-  
   install -d "$pkgdir/usr/include/llvm/Config"
   mv "$pkgdir/config.h" "$pkgdir/usr/include/llvm/Config/config-32.h"
   mv "$pkgdir/llvm-config.h" "$pkgdir/usr/include/llvm/Config/llvm-config-32.h"
@@ -134,9 +150,9 @@
   url="http://clang.llvm.org/"
   depends=("lib32-llvm=$pkgver-$pkgrel" 'clang' 'gcc-multilib')
 
-  cd "$srcdir/llvm-$pkgver.src/tools/clang"
+  cd "$srcdir/llvm-$pkgver.src"
 
-  make DESTDIR="$pkgdir" install
+  make -C build/tools/clang DESTDIR="$pkgdir" install
 
   mv -v "$pkgdir"/usr/lib/* "$pkgdir"/usr/lib32/
   rm -r "$pkgdir"/usr/{bin,include,lib,share}



More information about the arch-commits mailing list