[arch-commits] Commit in llvm/trunk (PKGBUILD clang-3.1-fix-lwg-2141.patch)

Evangelos Foutras foutrelis at archlinux.org
Fri Dec 21 22:49:05 UTC 2012


    Date: Friday, December 21, 2012 @ 17:49:05
  Author: foutrelis
Revision: 173720

upgpkg: llvm 3.2-1

New upstream release.

Modified:
  llvm/trunk/PKGBUILD
Deleted:
  llvm/trunk/clang-3.1-fix-lwg-2141.patch

------------------------------+
 PKGBUILD                     |   34 +++++++++++++--------
 clang-3.1-fix-lwg-2141.patch |   65 -----------------------------------------
 2 files changed, 21 insertions(+), 78 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-12-21 22:47:22 UTC (rev 173719)
+++ PKGBUILD	2012-12-21 22:49:05 UTC (rev 173720)
@@ -10,12 +10,12 @@
 # Contributor: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
 
 pkgname=('llvm' 'llvm-ocaml' 'clang' 'clang-analyzer')
-pkgver=3.1
-pkgrel=6
+pkgver=3.2
+pkgrel=1
 arch=('i686' 'x86_64')
 url="http://llvm.org/"
 license=('custom:University of Illinois/NCSA Open Source License')
-makedepends=('libffi' 'python2' 'ocaml')
+makedepends=('libffi' 'python2' 'ocaml' 'python-sphinx')
 source=(http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.gz
         http://llvm.org/releases/$pkgver/clang-$pkgver.src.tar.gz
         http://dev.archlinux.org/~foutrelis/sources/compiler-rt/compiler-rt-$pkgver.src.tar.xz
@@ -25,19 +25,17 @@
         clang-pure64.patch
         enable-lto.patch
         llvm-3.1-fix-debug-line-info.patch
-        clang-3.1-fix-libprofile_rt.a-location.patch
-        clang-3.1-fix-lwg-2141.patch)
-sha256sums=('1ea05135197b5400c1f88d00ff280d775ce778f8f9ea042e25a1e1e734a4b9ab'
-            'ff63e215dcd3e2838ffdea38502f8d35bab17e487f3c3799579961e452d5a786'
-            '563d8a5ef86123ed8775e115ad7f90c1aa3e80f70b4e587f1bccab2c10753558'
+        clang-3.1-fix-libprofile_rt.a-location.patch)
+sha256sums=('125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343'
+            '2aaaf03f7c0f6b16fe97ecc81247dc2bf2d4bec7620a77cc74670b7e07ff5658'
+            'a9a6b73a1bd5fc763f3b3826a6ce796cb150042d37d319e06e72d3d9778aaac1'
             '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
             '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48'
             '3074df5322900e087377a8e03a02115463ccc0011c25917c2f06df11facd9b92'
             '288a82fbff17bc554f5863734246500e637882af33ee8511019d5e0d6cd20524'
             'f7145e203ffb4ce2c01976027f7840a9520e5341a9945f2459b6b11e5422d5b7'
             'db1f1aadebbc4c4232bdad49fb9b7dc61eac727085c63154b870fa9ce64fd18d'
-            '0d32ad283566357ca1bfbeb4cbe6b0b961943b79d3d718ed0435101c05629137'
-            'a3ac405a983643c9cb9081692a3f4d28e5d19571fa12b0517fb2b1f2acab0ad0')
+            '0d32ad283566357ca1bfbeb4cbe6b0b961943b79d3d718ed0435101c05629137')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver.src"
@@ -83,13 +81,13 @@
   patch -d tools/clang -Np1 -i \
     "$srcdir/clang-3.1-fix-libprofile_rt.a-location.patch"
 
-  # Fix FS#32731: [clang] 3.1 fails to compile libstdc++ <chrono> 4.7.2
-  patch -d tools/clang -Np0 -i "$srcdir/clang-3.1-fix-lwg-2141.patch"
-
   # Fix FS#31098: LLVM 3.1 produces invalid debug information
   # http://llvm.org/bugs/show_bug.cgi?id=13211
   patch -Np1 -i "$srcdir/llvm-3.1-fix-debug-line-info.patch"
 
+  # Drop "svn" suffix from version string
+  sed -i 's/3\.2svn/3.2/g' configure
+
   # Apply strip option to configure
   _optimized_switch="enable"
   [[ $(check_option strip) == n ]] && _optimized_switch="disable"
@@ -118,6 +116,8 @@
     --$_optimized_switch-optimized
 
   make REQUIRES_RTTI=1
+  make -C docs -f Makefile.sphinx man
+  make -C docs -f Makefile.sphinx html
 }
 
 package_llvm() {
@@ -166,6 +166,14 @@
     done
   fi
 
+  # Install man pages
+  install -d "$pkgdir/usr/share/man/man1"
+  cp docs/_build/man/*.1 "$pkgdir/usr/share/man/man1/"
+
+  # Install html docs
+  cp -r docs/_build/html/* "$pkgdir/usr/share/doc/llvm/html/"
+  rm -r "$pkgdir/usr/share/doc/llvm/html/_sources"
+
   install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 

Deleted: clang-3.1-fix-lwg-2141.patch
===================================================================
--- clang-3.1-fix-lwg-2141.patch	2012-12-21 22:47:22 UTC (rev 173719)
+++ clang-3.1-fix-lwg-2141.patch	2012-12-21 22:49:05 UTC (rev 173720)
@@ -1,65 +0,0 @@
-Index: test/SemaCXX/libstdcxx_common_type_hack.cpp
-===================================================================
---- test/SemaCXX/libstdcxx_common_type_hack.cpp	(revision 0)
-+++ test/SemaCXX/libstdcxx_common_type_hack.cpp	(revision 166455)
-@@ -0,0 +1,33 @@
-+// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify
-+
-+// This is a test for an egregious hack in Clang that works around
-+// an issue with GCC's <type_traits> implementation. std::common_type
-+// relies on pre-standard rules for decltype(), in which it doesn't
-+// produce reference types so frequently.
-+
-+#ifdef BE_THE_HEADER
-+
-+#pragma GCC system_header
-+namespace std {
-+  template<typename T> T &&declval();
-+
-+  template<typename...Ts> struct common_type {};
-+  template<typename A, typename B> struct common_type<A, B> {
-+    // Under the rules in the standard, this always produces a
-+    // reference type.
-+    typedef decltype(true ? declval<A>() : declval<B>()) type;
-+  };
-+}
-+
-+#else
-+
-+#define BE_THE_HEADER
-+#include "libstdcxx_common_type_hack.cpp"
-+
-+using T = int;
-+using T = std::common_type<int, int>::type;
-+
-+using U = int; // expected-note {{here}}
-+using U = decltype(true ? std::declval<int>() : std::declval<int>()); // expected-error {{different types}}
-+
-+#endif
-Index: lib/Sema/SemaTemplateInstantiateDecl.cpp
-===================================================================
---- lib/Sema/SemaTemplateInstantiateDecl.cpp	(revision 166454)
-+++ lib/Sema/SemaTemplateInstantiateDecl.cpp	(revision 166455)
-@@ -158,6 +158,22 @@
-     SemaRef.MarkDeclarationsReferencedInType(D->getLocation(), DI->getType());
-   }
- 
-+  // HACK: g++ has a bug where it gets the value kind of ?: wrong.
-+  // libstdc++ relies upon this bug in its implementation of common_type.
-+  // If we happen to be processing that implementation, fake up the g++ ?:
-+  // semantics. See LWG issue 2141 for more information on the bug.
-+  const DecltypeType *DT = DI->getType()->getAs<DecltypeType>();
-+  CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext());
-+  if (DT && RD && isa<ConditionalOperator>(DT->getUnderlyingExpr()) &&
-+      DT->isReferenceType() &&
-+      RD->getEnclosingNamespaceContext() == SemaRef.getStdNamespace() &&
-+      RD->getIdentifier() && RD->getIdentifier()->isStr("common_type") &&
-+      D->getIdentifier() && D->getIdentifier()->isStr("type") &&
-+      SemaRef.getSourceManager().isInSystemHeader(D->getLocStart()))
-+    // Fold it to the (non-reference) type which g++ would have produced.
-+    DI = SemaRef.Context.getTrivialTypeSourceInfo(
-+      DI->getType().getNonReferenceType());
-+
-   // Create the new typedef
-   TypedefNameDecl *Typedef;
-   if (IsTypeAlias)




More information about the arch-commits mailing list