[131756] trunk/dports/lang/llvm-3.5

jeremyhu at macports.org jeremyhu at macports.org
Sat Jan 17 09:04:58 PST 2015


Revision: 131756
          https://trac.macports.org/changeset/131756
Author:   jeremyhu at macports.org
Date:     2015-01-17 09:04:58 -0800 (Sat, 17 Jan 2015)
Log Message:
-----------
clang-3.5: Bump to 3.5.1

Modified Paths:
--------------
    trunk/dports/lang/llvm-3.5/Portfile

Added Paths:
-----------
    trunk/dports/lang/llvm-3.5/files/0001-Call-powerpc-darwin-external-tools-with-arch-ppc.patch
    trunk/dports/lang/llvm-3.5/files/0003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch
    trunk/dports/lang/llvm-3.5/files/0004-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch
    trunk/dports/lang/llvm-3.5/files/llvm-integrated-as.patch

Removed Paths:
-------------
    trunk/dports/lang/llvm-3.5/files/0001-PR21536-Fix-a-corner-case-where-we-d-get-confused-by.patch
    trunk/dports/lang/llvm-3.5/files/0002-PR19372-Keep-checking-template-arguments-after-we-se.patch

Modified: trunk/dports/lang/llvm-3.5/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.5/Portfile	2015-01-17 12:33:08 UTC (rev 131755)
+++ trunk/dports/lang/llvm-3.5/Portfile	2015-01-17 17:04:58 UTC (rev 131756)
@@ -75,7 +75,7 @@
 #svn.url                 https://llvm.org/svn/llvm-project/llvm/branches/release_${llvm_version_no_dot}
 #default_variants-append +assertions
 
-version                 ${llvm_version}.0
+version                 ${llvm_version}.1
 revision                1
 epoch                   1
 master_sites            http://llvm.org/releases/${version}
@@ -94,24 +94,24 @@
     }
 }
 
-checksums           llvm-3.5.0.src.tar.xz \
-                    rmd160  a50dc4e5a63c7bd38c48bf5ce766ebbb6f47e272 \
-                    sha256  28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03 \
-                    polly-3.5.0.src.tar.xz \
-                    rmd160  eb90c130b6ef364a9bc0ff0b86aac9cf8634a019 \
-                    sha256  f1f6aaaa375d522cc92cd922f3562bfdabf87269a520398479089374dad75a65 \
-                    cfe-3.5.0.src.tar.xz \
-                    rmd160  695592b5ef12ed602a4dd78f2dc2681058ca8253 \
-                    sha256  fc80992e004b06f6c7afb612de1cdaa9ac9d25811c55f94fcf7331d9b81cdb8b \
-                    compiler-rt-3.5.0.src.tar.xz \
-                    rmd160  58aacb0b299721afb53cbd6c3fc9dc542b5b94be \
-                    sha256  a4b3e655832bf8d9a357ea2c771db347237460e131988cbb96cda40ff39a8136 \
-                    libcxx-3.5.0.src.tar.xz \
-                    rmd160  ced5e8f98ba32ad792e77e5977b527d2e3388aa2 \
-                    sha256  8045da845a63e50c201939eda8290d45e5752a9385d4d626214300d4a4d0b1c0 \
-                    clang-tools-extra-3.5.0.src.tar.xz \
-                    rmd160  28c64aacabae5d37f0ab32ddfe96d451e540e554 \
-                    sha256  2981beb378afb5aa5c50ed017720a42a33e77e902c7086ad2d412ef4fa931f69
+checksums           llvm-3.5.1.src.tar.xz \
+                    rmd160  ae22e9f0e913a1a834dc6baa50f265ed228a1241 \
+                    sha256  bf3275d2d7890015c8d8f5e6f4f882f8cf3bf51967297ebe74111d6d8b53be15 \
+                    cfe-3.5.1.src.tar.xz \
+                    rmd160  f2dfc60ef99aef5b19fab589c822acae695f67cb \
+                    sha256  6773f3f9cf815631cc7e779ec134ddd228dc8e9a250e1ea3a910610c59eb8f5c \
+                    compiler-rt-3.5.1.src.tar.xz \
+                    rmd160  6ed96be5124216b295a699e604a7ee64291d6cd2 \
+                    sha256  adf4b526f33e681aff5961f0821f5b514d3fc375410008842640b56a2e6a837a \
+                    libcxx-3.5.1.src.tar.xz \
+                    rmd160  46a5a2d9eaffe6b287d6245ab677d06e557d0687 \
+                    sha256  a16d0ae0c0cf2c8cebb94fafcb907022cd4f8579ebac99a4c9919990a37ad475 \
+                    clang-tools-extra-3.5.1.src.tar.xz \
+                    rmd160  acd2bb05a9ce2c5f80913341584407bd258cb0b3 \
+                    sha256  e8d011250389cfc36eb51557ca25ae66ab08173e8d53536a0747356105d72906 \
+                    polly-3.5.1.src.tar.xz \
+                    rmd160  076eb242253a7cc1c54d993912c847343c244347 \
+                    sha256  ac12ec5ff2119ac1d2916c105920e1880321a7d97b6f5ec5957a588450704f04
 
 patchfiles      install_target.patch \
                 fix-dylib-ids.patch
@@ -125,10 +125,12 @@
     patchfiles-append   skip-python-check.patch
 } elseif {${subport} eq "clang-${llvm_version}"} {
     patchfiles-append    scan-build-PR-35006.patch \
-                         0001-PR21536-Fix-a-corner-case-where-we-d-get-confused-by.patch \
-                         0002-PR19372-Keep-checking-template-arguments-after-we-se.patch \
                          0001-Comment-out-SL-cctools-workaround.patch \
                          0001-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch \
+                         0001-Call-powerpc-darwin-external-tools-with-arch-ppc.patch \
+                         0003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch \
+                         0004-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch \
+                         llvm-integrated-as.patch \
                          clang-format.patch \
                          clang-modernize.patch \
                          snowleopard-cmath.patch \

Added: trunk/dports/lang/llvm-3.5/files/0001-Call-powerpc-darwin-external-tools-with-arch-ppc.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/0001-Call-powerpc-darwin-external-tools-with-arch-ppc.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/0001-Call-powerpc-darwin-external-tools-with-arch-ppc.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -0,0 +1,118 @@
+From c5a619419ccbf96191124fd93b53570084565450 Mon Sep 17 00:00:00 2001
+From: Rafael Espindola <rafael.espindola at gmail.com>
+Date: Thu, 28 Aug 2014 21:23:05 +0000
+Subject: [PATCH] Call powerpc-darwin external tools with -arch ppc.
+
+With this patch we call external tools for powerpc-darwin with "-arch ppc"
+instead of "-arch powerpc", so as to be compatible with the cctools assembler
+and ld64 linker.
+
+Patch by Stephen Drake!
+
+git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216687 91177308-0d34-0410-b5e6-96231b3b80d8
+(cherry picked from commit 52fc295aad114ea91f4118d5e48fdfa142871704)
+---
+ lib/Driver/ToolChains.cpp         |  2 +-
+ lib/Driver/Tools.cpp              | 14 +++-----------
+ test/Driver/darwin-arch-default.c | 40 +++++++++++++++++++++++++++++++++++++--
+ 3 files changed, 42 insertions(+), 14 deletions(-)
+
+diff --git tools/clang/lib/Driver/ToolChains.cpp tools/clang/lib/Driver/ToolChains.cpp
+index b46f69d..3e6768f 100644
+--- a/tools/clang/lib/Driver/ToolChains.cpp
++++ b/tools/clang/lib/Driver/ToolChains.cpp
+@@ -156,7 +156,7 @@ static bool isSoftFloatABI(const ArgList &Args) {
+ StringRef MachO::getMachOArchName(const ArgList &Args) const {
+   switch (getTriple().getArch()) {
+   default:
+-    return getArchName();
++    return getDefaultUniversalArchName();
+ 
+   case llvm::Triple::thumb:
+   case llvm::Triple::arm: {
+diff --git tools/clang/lib/Driver/Tools.cpp tools/clang/lib/Driver/Tools.cpp
+index 198e82e..68d5fc6 100644
+--- a/tools/clang/lib/Driver/Tools.cpp
++++ b/tools/clang/lib/Driver/Tools.cpp
+@@ -4870,19 +4870,10 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
+   RenderExtraToolArgs(JA, CmdArgs);
+ 
+   // If using a driver driver, force the arch.
+-  llvm::Triple::ArchType Arch = getToolChain().getArch();
+   if (getToolChain().getTriple().isOSDarwin()) {
+     CmdArgs.push_back("-arch");
+-
+-    // FIXME: Remove these special cases.
+-    if (Arch == llvm::Triple::ppc)
+-      CmdArgs.push_back("ppc");
+-    else if (Arch == llvm::Triple::ppc64)
+-      CmdArgs.push_back("ppc64");
+-    else if (Arch == llvm::Triple::ppc64le)
+-      CmdArgs.push_back("ppc64le");
+-    else
+-      CmdArgs.push_back(Args.MakeArgString(getToolChain().getArchName()));
++    CmdArgs.push_back(
++      Args.MakeArgString(getToolChain().getDefaultUniversalArchName()));
+   }
+ 
+   // Try to force gcc to match the tool chain we want, if we recognize
+@@ -4890,6 +4881,7 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
+   //
+   // FIXME: The triple class should directly provide the information we want
+   // here.
++  llvm::Triple::ArchType Arch = getToolChain().getArch();
+   if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::ppc)
+     CmdArgs.push_back("-m32");
+   else if (Arch == llvm::Triple::x86_64 || Arch == llvm::Triple::ppc64 ||
+diff --git tools/clang/test/Driver/darwin-arch-default.c tools/clang/test/Driver/darwin-arch-default.c
+index 60bf61d..e7e5e89 100644
+--- a/tools/clang/test/Driver/darwin-arch-default.c
++++ b/tools/clang/test/Driver/darwin-arch-default.c
+@@ -2,6 +2,42 @@
+ //
+ // RUN: %clang -target powerpc-apple-darwin8 -### \
+ // RUN:   -ccc-print-phases %s 2> %t
+-// RUN: FileCheck --check-prefix=CHECK-POWERPC < %t %s
++// RUN: FileCheck --check-prefix=CHECK-BIND-PPC < %t %s
+ //
+-// CHECK-POWERPC: bind-arch, "ppc"
++// CHECK-BIND-PPC: bind-arch, "ppc"
++//
++// RUN: %clang -target powerpc64-apple-darwin8 -### \
++// RUN:   -ccc-print-phases %s 2> %t
++// RUN: FileCheck --check-prefix=CHECK-BIND-PPC64 < %t %s
++//
++// CHECK-BIND-PPC64: bind-arch, "ppc64"
++
++// Check that the correct arch name is passed to the external assembler
++//
++// RUN: %clang -target powerpc-apple-darwin8 -### \
++// RUN:   -no-integrated-as -c %s 2> %t
++// RUN: FileCheck --check-prefix=CHECK-AS-PPC < %t %s
++//
++// CHECK-AS-PPC: {{as(.exe)?"}}
++// CHECK-AS-PPC: "-arch" "ppc"
++//
++// RUN: %clang -target powerpc64-apple-darwin8 -### \
++// RUN:   -no-integrated-as -c %s 2> %t
++// RUN: FileCheck --check-prefix=CHECK-AS-PPC64 < %t %s
++//
++// CHECK-AS-PPC64: {{as(.exe)?"}}
++// CHECK-AS-PPC64: "-arch" "ppc64"
++
++// Check that the correct arch name is passed to the external linker
++//
++// RUN: %clang -target powerpc-apple-darwin8 -### %s 2> %t
++// RUN: FileCheck --check-prefix=CHECK-LD-PPC < %t %s
++//
++// CHECK-LD-PPC: {{ld(.exe)?"}}
++// CHECK-LD-PPC: "-arch" "ppc"
++//
++// RUN: %clang -target powerpc64-apple-darwin8 -### %s 2> %t
++// RUN: FileCheck --check-prefix=CHECK-LD-PPC64 < %t %s
++//
++// CHECK-LD-PPC64: {{ld(.exe)?"}}
++// CHECK-LD-PPC64: "-arch" "ppc64"
+-- 
+2.2.2
+

Deleted: trunk/dports/lang/llvm-3.5/files/0001-PR21536-Fix-a-corner-case-where-we-d-get-confused-by.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/0001-PR21536-Fix-a-corner-case-where-we-d-get-confused-by.patch	2015-01-17 12:33:08 UTC (rev 131755)
+++ trunk/dports/lang/llvm-3.5/files/0001-PR21536-Fix-a-corner-case-where-we-d-get-confused-by.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -1,61 +0,0 @@
-From f27355c10ce84f000530fbc5a22449047a095efc Mon Sep 17 00:00:00 2001
-From: Richard Smith <richard-llvm at metafoo.co.uk>
-Date: Wed, 12 Nov 2014 01:43:45 +0000
-Subject: [PATCH 1/2] PR21536: Fix a corner case where we'd get confused by a
- pack expanding into the penultimate parameter of a template parameter list,
- where the last parameter is itself a pack, and build a bogus empty final pack
- argument.
-
-git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221748 91177308-0d34-0410-b5e6-96231b3b80d8
-(cherry picked from commit b6ff5628bec83cb58cdb9724584eeaf0a51fe81b)
----
- lib/Sema/SemaTemplate.cpp       |  2 +-
- test/SemaTemplate/deduction.cpp | 18 +++++++++++++++++-
- 2 files changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
-index 63581a4..5596a01 100644
---- a/tools/clang/lib/Sema/SemaTemplate.cpp
-+++ b/tools/clang/lib/Sema/SemaTemplate.cpp
-@@ -3746,7 +3746,7 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
-         }
- 
-         // Push the argument pack onto the list of converted arguments.
--        if (InFinalParameterPack) {
-+        if (InFinalParameterPack && !ArgumentPack.empty()) {
-           Converted.push_back(
-             TemplateArgument::CreatePackCopy(Context,
-                                              ArgumentPack.data(),
-diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
-index aecb5ee..c089573 100644
---- a/tools/clang/test/SemaTemplate/deduction.cpp
-+++ b/tools/clang/test/SemaTemplate/deduction.cpp
-@@ -1,4 +1,4 @@
--// RUN: %clang_cc1 -fsyntax-only -verify %s
-+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
- 
- // Template argument deduction with template template parameters.
- template<typename T, template<T> class A> 
-@@ -162,3 +162,19 @@ namespace test14 {
-     foo(a);
-   }
- }
-+
-+namespace PR21536 {
-+  template<typename ...T> struct X;
-+  template<typename A, typename ...B> struct S {
-+    static_assert(sizeof...(B) == 1, "");
-+    void f() {
-+      using T = A;
-+      using T = int;
-+
-+      using U = X<B...>;
-+      using U = X<int>;
-+    }
-+  };
-+  template<typename ...T> void f(S<T...>);
-+  void g() { f(S<int, int>()); }
-+}
--- 
-2.1.3
-

Deleted: trunk/dports/lang/llvm-3.5/files/0002-PR19372-Keep-checking-template-arguments-after-we-se.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/0002-PR19372-Keep-checking-template-arguments-after-we-se.patch	2015-01-17 12:33:08 UTC (rev 131755)
+++ trunk/dports/lang/llvm-3.5/files/0002-PR19372-Keep-checking-template-arguments-after-we-se.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -1,109 +0,0 @@
-From 0019dadd93e1e38476b9c115470409c7f9fc3899 Mon Sep 17 00:00:00 2001
-From: Richard Smith <richard-llvm at metafoo.co.uk>
-Date: Wed, 12 Nov 2014 23:38:38 +0000
-Subject: [PATCH 2/2] PR19372: Keep checking template arguments after we see an
- argument pack expansion into a parameter pack; we know that we're still
- filling in that parameter's arguments. Previously, if we hit this case for an
- alias template, we'd try to substitute using non-canonical template
- arguments.
-
-git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221832 91177308-0d34-0410-b5e6-96231b3b80d8
-(cherry picked from commit 4e0b4321c8311bb0bf3dea530405960dbca97a9d)
----
- lib/Sema/SemaTemplate.cpp       | 39 +++++++++++----------------------------
- test/SemaTemplate/deduction.cpp | 14 ++++++++++++++
- 2 files changed, 25 insertions(+), 28 deletions(-)
-
-diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
-index 5596a01..7e8f0b7 100644
---- a/tools/clang/lib/Sema/SemaTemplate.cpp
-+++ b/tools/clang/lib/Sema/SemaTemplate.cpp
-@@ -3692,12 +3692,12 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
-                                 ArgumentPack.size(), Converted))
-         return true;
- 
--      if (TemplateArgs[ArgIdx].getArgument().isPackExpansion() &&
--          isa<TypeAliasTemplateDecl>(Template) &&
--          !(Param + 1 == ParamEnd && (*Param)->isTemplateParameterPack() &&
--            !getExpandedPackSize(*Param))) {
-+      bool PackExpansionIntoNonPack =
-+          TemplateArgs[ArgIdx].getArgument().isPackExpansion() &&
-+          (!(*Param)->isTemplateParameterPack() || getExpandedPackSize(*Param));
-+      if (PackExpansionIntoNonPack && isa<TypeAliasTemplateDecl>(Template)) {
-         // Core issue 1430: we have a pack expansion as an argument to an
--        // alias template, and it's not part of a final parameter pack. This
-+        // alias template, and it's not part of a parameter pack. This
-         // can't be canonicalized, so reject it now.
-         Diag(TemplateArgs[ArgIdx].getLocation(),
-              diag::err_alias_template_expansion_into_fixed_list)
-@@ -3720,16 +3720,11 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
-         ++Param;
-       }
- 
--      // If we just saw a pack expansion, then directly convert the remaining
--      // arguments, because we don't know what parameters they'll match up
--      // with.
--      if (TemplateArgs[ArgIdx-1].getArgument().isPackExpansion()) {
--        bool InFinalParameterPack = Param != ParamEnd &&
--                                    Param + 1 == ParamEnd &&
--                                    (*Param)->isTemplateParameterPack() &&
--                                    !getExpandedPackSize(*Param);
--
--        if (!InFinalParameterPack && !ArgumentPack.empty()) {
-+      // If we just saw a pack expansion into a non-pack, then directly convert
-+      // the remaining arguments, because we don't know what parameters they'll
-+      // match up with.
-+      if (PackExpansionIntoNonPack) {
-+        if (!ArgumentPack.empty()) {
-           // If we were part way through filling in an expanded parameter pack,
-           // fall back to just producing individual arguments.
-           Converted.insert(Converted.end(),
-@@ -3738,22 +3733,10 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
-         }
- 
-         while (ArgIdx < NumArgs) {
--          if (InFinalParameterPack)
--            ArgumentPack.push_back(TemplateArgs[ArgIdx].getArgument());
--          else
--            Converted.push_back(TemplateArgs[ArgIdx].getArgument());
-+          Converted.push_back(TemplateArgs[ArgIdx].getArgument());
-           ++ArgIdx;
-         }
- 
--        // Push the argument pack onto the list of converted arguments.
--        if (InFinalParameterPack && !ArgumentPack.empty()) {
--          Converted.push_back(
--            TemplateArgument::CreatePackCopy(Context,
--                                             ArgumentPack.data(),
--                                             ArgumentPack.size()));
--          ArgumentPack.clear();
--        }
--
-         return false;
-       }
- 
-diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp
-index c089573..e942289 100644
---- a/tools/clang/test/SemaTemplate/deduction.cpp
-+++ b/tools/clang/test/SemaTemplate/deduction.cpp
-@@ -178,3 +178,17 @@ namespace PR21536 {
-   template<typename ...T> void f(S<T...>);
-   void g() { f(S<int, int>()); }
- }
-+
-+namespace PR19372 {
-+  template <template<typename...> class C, typename ...Us> struct BindBack {
-+    template <typename ...Ts> using apply = C<Ts..., Us...>;
-+  };
-+  template <typename, typename...> struct Y;
-+  template <typename ...Ts> using Z = Y<Ts...>;
-+
-+  using T = BindBack<Z, int>::apply<>;
-+  using T = Z<int>;
-+
-+  using U = BindBack<Z, int, int>::apply<char>;
-+  using U = Z<char, int, int>;
-+}
--- 
-2.1.3
-

Added: trunk/dports/lang/llvm-3.5/files/0003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/0003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/0003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -0,0 +1,46 @@
+From e34bdf68de77066864ff3238d89fd19e19b3b508 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Fri, 16 Jan 2015 21:34:36 -0800
+Subject: [PATCH 3/4] Fix <local> and <iterator> when building with Lion and
+ newer Availability.h
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+(cherry picked from commit e8d7616436baea0e0ff1dd78bd8d8dfc5d367e44)
+---
+ include/iterator | 4 ++--
+ include/locale   | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/iterator b/include/iterator
+index f338e01..64b52e7 100644
+--- a/projects/libcxx/include/iterator
++++ b/projects/libcxx/include/iterator
+@@ -913,8 +913,8 @@ public:
+     _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
+ 
+ #if !defined(__APPLE__) || \
+-    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
+-    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
++    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__MAC_10_8) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
++    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_6_0) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
+ 
+     template <class _Ch, class _Tr>
+     friend
+diff --git a/include/locale b/include/locale
+index fcff402..10d8ca9 100644
+--- a/projects/libcxx/include/locale
++++ b/projects/libcxx/include/locale
+@@ -1467,8 +1467,8 @@ __pad_and_output(_OutputIterator __s,
+ }
+ 
+ #if !defined(__APPLE__) || \
+-    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
+-    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
++    (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__MAC_10_8) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \
++    (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && defined(__IPHONE_6_0) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0)
+ 
+ template <class _CharT, class _Traits>
+ _LIBCPP_HIDDEN
+-- 
+2.2.2
+

Added: trunk/dports/lang/llvm-3.5/files/0004-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/0004-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/0004-implement-atomic-using-mutex-lock_guard-for-64b-ops-.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -0,0 +1,320 @@
+From bab1ec954fe3ca9d6733da96c2d1bf46bd9345e7 Mon Sep 17 00:00:00 2001
+From: David Fang <fang at csl.cornell.edu>
+Date: Wed, 15 Jan 2014 21:27:34 -0800
+Subject: [PATCH 4/4] implement atomic<> using mutex/lock_guard for 64b ops on
+ 32b PPC not pretty, not fast, but passes atomic tests
+
+(cherry picked from commit 8ec078a3bf34383cf8a0cbc6294ddf0da6bc3bed)
+
+Conflicts:
+	include/atomic
+---
+ include/__atomic_locked | 240 ++++++++++++++++++++++++++++++++++++++++++++++++
+ include/atomic          |  46 ++++++++++
+ 2 files changed, 286 insertions(+)
+ create mode 100644 include/__atomic_locked
+
+diff --git a/include/__atomic_locked b/include/__atomic_locked
+new file mode 100644
+index 0000000..f10dd74
+--- /dev/null
++++ b/projects/libcxx/include/__atomic_locked
+@@ -0,0 +1,240 @@
++// -*- C++ -*-
++//===--------------------------- __atomic_locked --------------------------===//
++//
++//                     The LLVM Compiler Infrastructure
++//
++// This file is distributed under the University of Illinois Open Source
++// License. See LICENSE.TXT for details.
++//
++//===----------------------------------------------------------------------===//
++
++#ifndef _LIBCPP_ATOMIC_LOCKED
++#define _LIBCPP_ATOMIC_LOCKED
++
++#include <__mutex_base>	// for mutex and lock_guard
++
++/**
++	This provides slow-but-usable lock-based atomic access to
++	structures for which atomic lock-free functions are missing.
++	This is motivated by the desire for 64b atomic operations
++	on 32b PowerPC architectures.  
++**/
++
++#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
++#pragma GCC system_header
++#endif
++
++_LIBCPP_BEGIN_NAMESPACE_STD
++
++template <class _Tp, bool = is_integral<_Tp>::value && !is_same<_Tp, bool>::value>
++struct __atomic_mutex_locked  // false
++{
++    mutable _Atomic(_Tp) __a_;
++    mutable mutex __lock_;
++    typedef lock_guard<mutex>	lock_type;
++
++    _Tp& na(void) const { return reinterpret_cast<_Tp&>(__a_); }
++    volatile _Tp& na(void) const volatile { return reinterpret_cast<volatile _Tp&>(__a_); }
++
++    _LIBCPP_INLINE_VISIBILITY
++    bool is_lock_free() const volatile _NOEXCEPT
++        {return false;}
++    _LIBCPP_INLINE_VISIBILITY
++    bool is_lock_free() const _NOEXCEPT
++        {return false;}
++    _LIBCPP_INLINE_VISIBILITY
++    void store(_Tp __d, memory_order = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_)); na() = __d; }
++    _LIBCPP_INLINE_VISIBILITY
++    void store(_Tp __d, memory_order = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_); na() = __d; }
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp load(memory_order = memory_order_seq_cst) const volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_)); return na(); }
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp load(memory_order = memory_order_seq_cst) const _NOEXCEPT
++        { const lock_type g(__lock_); return na(); }
++    _LIBCPP_INLINE_VISIBILITY
++    operator _Tp() const volatile _NOEXCEPT {return load();}
++    _LIBCPP_INLINE_VISIBILITY
++    operator _Tp() const _NOEXCEPT          {return load();}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp exchange(_Tp __d, memory_order = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	// or use std::swap
++          const _Tp ret = na(); na() = __d; return ret; }
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp exchange(_Tp __d, memory_order = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	// or use std::swap
++          const _Tp ret = na(); na() = __d; return ret; }
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_weak(_Tp& __e, _Tp __d,
++                               memory_order __s, memory_order __f) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  if (na() == __e) { na() = __d; return true; }
++	  else { __e = na(); return false; }
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_weak(_Tp& __e, _Tp __d,
++                               memory_order __s, memory_order __f) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  if (na() == __e) { na() = __d; return true; }
++	  else { __e = na(); return false; }
++	}
++
++    // for now, _weak inditinguishable from _strong
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_strong(_Tp& __e, _Tp __d,
++                                 memory_order __s, memory_order __f) volatile _NOEXCEPT
++        {return compare_exchange_weak(__e, __d, __s, __f);}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_strong(_Tp& __e, _Tp __d,
++                                 memory_order __s, memory_order __f) _NOEXCEPT
++        {return compare_exchange_weak(__e, __d, __s, __f);}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_weak(_Tp& __e, _Tp __d,
++                              memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        {return compare_exchange_weak(__e, __d, __m, __m);}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_weak(_Tp& __e, _Tp __d,
++                               memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        {return compare_exchange_weak(__e, __d, __m, __m);}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_strong(_Tp& __e, _Tp __d,
++                              memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        {return compare_exchange_strong(__e, __d, __m, __m);}
++    _LIBCPP_INLINE_VISIBILITY
++    bool compare_exchange_strong(_Tp& __e, _Tp __d,
++                                 memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        {return compare_exchange_strong(__e, __d, __m, __m);}
++
++    _LIBCPP_INLINE_VISIBILITY
++#ifndef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
++    __atomic_mutex_locked() _NOEXCEPT = default;
++#else
++    __atomic_mutex_locked() _NOEXCEPT : __a_() {}
++#endif // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
++
++    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_CONSTEXPR __atomic_mutex_locked(_Tp __d) _NOEXCEPT : __a_(__d) {}
++#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
++    __atomic_mutex_locked(const __atomic_mutex_locked&) = delete;
++    __atomic_mutex_locked& operator=(const __atomic_mutex_locked&) = delete;
++    __atomic_mutex_locked& operator=(const __atomic_mutex_locked&) volatile = delete;
++#else  // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
++private:
++    __atomic_mutex_locked(const __atomic_mutex_locked&);
++    __atomic_mutex_locked& operator=(const __atomic_mutex_locked&);
++    __atomic_mutex_locked& operator=(const __atomic_mutex_locked&) volatile;
++#endif  // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
++};	// end struct __atomic_mutex_locked
++
++// atomic<Integral>
++
++template <class _Tp>
++struct __atomic_mutex_locked<_Tp, true>
++    : public __atomic_mutex_locked<_Tp, false>
++{
++    typedef __atomic_mutex_locked<_Tp, false> __base;
++    typedef	typename __base::lock_type	lock_type;
++    using __base::__lock_;
++    using __base::na;
++
++    _LIBCPP_INLINE_VISIBILITY
++    __atomic_mutex_locked() _NOEXCEPT _LIBCPP_DEFAULT
++    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_CONSTEXPR __atomic_mutex_locked(_Tp __d) _NOEXCEPT : __base(__d) {}
++
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  const _Tp ret = na(); na() += __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  const _Tp ret = na(); na() += __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  const _Tp ret = na(); na() -= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  const _Tp ret = na(); na() -= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  const _Tp ret = na(); na() &= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  const _Tp ret = na(); na() &= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  const _Tp ret = na(); na() |= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  const _Tp ret = na(); na() |= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
++        { const lock_type g(const_cast<mutex&>(__lock_));
++	  const _Tp ret = na(); na() ^= __op; return ret;
++	}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
++        { const lock_type g(__lock_);
++	  const _Tp ret = na(); na() ^= __op; return ret;
++	}
++
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator++(int) volatile _NOEXCEPT      {return fetch_add(_Tp(1));}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator++(int) _NOEXCEPT               {return fetch_add(_Tp(1));}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator--(int) volatile _NOEXCEPT      {return fetch_sub(_Tp(1));}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator--(int) _NOEXCEPT               {return fetch_sub(_Tp(1));}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator++() volatile _NOEXCEPT         {return fetch_add(_Tp(1)) + _Tp(1);}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator++() _NOEXCEPT                  {return fetch_add(_Tp(1)) + _Tp(1);}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator--() volatile _NOEXCEPT         {return fetch_sub(_Tp(1)) - _Tp(1);}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator--() _NOEXCEPT                  {return fetch_sub(_Tp(1)) - _Tp(1);}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator+=(_Tp __op) _NOEXCEPT          {return fetch_add(__op) + __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator-=(_Tp __op) _NOEXCEPT          {return fetch_sub(__op) - __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator&=(_Tp __op) _NOEXCEPT          {return fetch_and(__op) & __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator|=(_Tp __op) _NOEXCEPT          {return fetch_or(__op) | __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator^=(_Tp __op) _NOEXCEPT          {return fetch_xor(__op) ^ __op;}
++};
++
++_LIBCPP_END_NAMESPACE_STD
++
++#endif  // _LIBCPP_ATOMIC_LOCKED
+diff --git a/include/atomic b/include/atomic
+index f6ab1cb..e580315 100644
+--- a/projects/libcxx/include/atomic
++++ b/projects/libcxx/include/atomic
+@@ -1528,4 +1528,50 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
+ 
+ _LIBCPP_END_NAMESPACE_STD
+ 
++#if	defined(__ppc__) && !defined(__ppc64__)
++// specialize fallback implementation where 64b atomics are missing
++#include <__atomic_locked>
++
++_LIBCPP_BEGIN_NAMESPACE_STD
++
++template <>
++struct atomic<long long> : public __atomic_mutex_locked<long long>
++{
++    typedef long long		_Tp;
++    typedef __atomic_mutex_locked<_Tp> __base;
++    _LIBCPP_INLINE_VISIBILITY
++    atomic() _NOEXCEPT _LIBCPP_DEFAULT
++    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
++
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator=(_Tp __d) volatile _NOEXCEPT
++        {__base::store(__d); return __d;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator=(_Tp __d) _NOEXCEPT
++        {__base::store(__d); return __d;}
++};
++
++template <>
++struct atomic<unsigned long long> :
++	public __atomic_mutex_locked<unsigned long long>
++{
++    typedef unsigned long long		_Tp;
++    typedef __atomic_mutex_locked<_Tp> __base;
++    _LIBCPP_INLINE_VISIBILITY
++    atomic() _NOEXCEPT _LIBCPP_DEFAULT
++    _LIBCPP_INLINE_VISIBILITY
++    _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
++
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator=(_Tp __d) volatile _NOEXCEPT
++        {__base::store(__d); return __d;}
++    _LIBCPP_INLINE_VISIBILITY
++    _Tp operator=(_Tp __d) _NOEXCEPT
++        {__base::store(__d); return __d;}
++};
++
++_LIBCPP_END_NAMESPACE_STD
++#endif	// defined(__ppc__) && !defined(__ppc64__)
++
+ #endif  // _LIBCPP_ATOMIC
+-- 
+2.2.2
+

Added: trunk/dports/lang/llvm-3.5/files/llvm-integrated-as.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/llvm-integrated-as.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/llvm-integrated-as.patch	2015-01-17 17:04:58 UTC (rev 131756)
@@ -0,0 +1,15 @@
+http://llvm.org/bugs/show_bug.cgi?id=21636
+
+Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+===================================================================
+--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
++++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+@@ -186,7 +186,7 @@
+   // use the directive, where it would need the same conditionalization
+   // anyway.
+   Triple TT(getTargetTriple());
+-  if (TT.isOSDarwin()) {
++  if (TT.isOSDarwin() && MAI->useIntegratedAssembler()) {
+     unsigned Major, Minor, Update;
+     TT.getOSVersion(Major, Minor, Update);
+     // If there is a version specified, Major will be non-zero.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150117/f8af210f/attachment-0001.html>


More information about the macports-changes mailing list