<pre style='margin:0'>
Jeremy Huddleston Sequoia (jeremyhu) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/bb10c0b43f2edfd4315ad06065d70ea69c7ae29b">https://github.com/macports/macports-ports/commit/bb10c0b43f2edfd4315ad06065d70ea69c7ae29b</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit bb10c0b43f2edfd4315ad06065d70ea69c7ae29b
</span>Author: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
AuthorDate: Wed Nov 2 20:38:26 2016 -0700

<span style='display:block; white-space:pre;color:#404040;'>    clang-3.8: Address some build failures with eprintf usage on Leopard/i386
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Fixes https://llvm.org/bugs/show_bug.cgi?id=28855
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
</span>---
 lang/llvm-3.8/Portfile                             |  4 +-
 ...Darwin-Stop-linking-libclang_rt.eprintf.a.patch | 66 ++++++++++++++++++++++
 ...on-t-include-eprintf-in-libclang_rt.osx.a.patch | 19 -------
 3 files changed, 68 insertions(+), 21 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-3.8/Portfile b/lang/llvm-3.8/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 926a7fe..1b4635f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-3.8/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-3.8/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,7 +13,7 @@ set llvm_version        3.8
</span> set llvm_version_no_dot 38
 name                    llvm-${llvm_version}
 revision                0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport                 clang-${llvm_version} { revision 5 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport                 clang-${llvm_version} { revision 6 }
</span> set suffix              mp-${llvm_version}
 set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
 dist_subdir             llvm
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -134,6 +134,7 @@ if {${subport} eq "clang-${llvm_version}"} {
</span>         1006-Only-call-setpriority-PRIO_DARWIN_THREAD-0-PRIO_DARW.patch \
         1007-Default-to-fragile-ObjC-runtime-when-targeting-darwi.patch \
         1008-Fixup-libstdc-header-search-paths-for-older-versions.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch \
</span>         2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch \
         2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch \
         2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -141,7 +142,6 @@ if {${subport} eq "clang-${llvm_version}"} {
</span>         2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch \
         2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch \
         2007-MacPorts-Only-Don-t-check-for-the-macosx.internal-SD.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        2008-darwin-Don-t-include-eprintf-in-libclang_rt.osx.a.patch \
</span>         3001-buildit-build-fix-for-Leopard.patch \
         3002-buildit-Set-compatibility-version-to-RC_ProjectSourc.patch \
         3003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-3.8/files/1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch b/lang/llvm-3.8/files/1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..70bd649
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-3.8/files/1009-Darwin-Stop-linking-libclang_rt.eprintf.a.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,66 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From b4bd219df14780cce271885bd780b70a8b76180f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Chris Bieneman <beanz@apple.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Wed, 17 Aug 2016 21:54:30 +0000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 1009/1009] [Darwin] Stop linking libclang_rt.eprintf.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Summary:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The eprintf library was added before the general OS X builtins library existed as a place to store one builtin function. Since we have for several years had an actual mandated builtin library for OS X > 10.5, we should just merge eprintf into the main library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This change will resolve PR28855.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+As a follow up I'll also patch compiler-rt to not generate the eprintf library anymore.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Reviewers: ddunbar, bob.wilson
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subscribers: cfe-commits
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Differential Revision: https://reviews.llvm.org/D23531
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278988 91177308-0d34-0410-b5e6-96231b3b80d8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(cherry picked from commit 1f8593ff431bd3e638bc4ca95092037ef67dd868)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/Driver/ToolChains.cpp | 21 +++++++++++++--------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 13 insertions(+), 8 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git llvm_release_38/tools/clang/lib/Driver/ToolChains.cpp macports_release_38/tools/clang/lib/Driver/ToolChains.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 99c7b8e..0d4758b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- llvm_release_38/tools/clang/lib/Driver/ToolChains.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ macports_release_38/tools/clang/lib/Driver/ToolChains.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -444,21 +444,26 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     else if (isMacosxVersionLT(10, 6))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       CmdArgs.push_back("-lgcc_s.10.5");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    // For OS X, we thought we would only need a static runtime library when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    // targeting 10.4, to provide versions of the static functions which were
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    // omitted from 10.4.dylib.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // Originally for OS X, we thought we would only need a static runtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // library when targeting 10.4, to provide versions of the static functions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // which were omitted from 10.4.dylib. This led to the creation of the 10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // builtins library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     //
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     // Unfortunately, that turned out to not be true, because Darwin system
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     // headers can still use eprintf on i386, and it is not exported from
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     // libSystem. Therefore, we still must provide a runtime library just for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     // the tiny tiny handful of projects that *might* use that symbol.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    if (isMacosxVersionLT(10, 5)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    //
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // Then over time, we figured out it was useful to add more things to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // runtime so we created libclang_rt.osx.a to provide new functions when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // deploying to old OS builds, and for a long time we had both eprintf and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // osx builtin libraries. Which just seems excessive. So with PR 28855, we
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // are removing the eprintf library and expecting eprintf to be provided by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    // the OS X builtins library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    if (isMacosxVersionLT(10, 5))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.10.4.a");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-      if (getTriple().getArch() == llvm::Triple::x86)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.eprintf.a");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++    else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+       AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.osx.a");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+   }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-- 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.10.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-3.8/files/2008-darwin-Don-t-include-eprintf-in-libclang_rt.osx.a.patch b/lang/llvm-3.8/files/2008-darwin-Don-t-include-eprintf-in-libclang_rt.osx.a.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 4557948..0000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-3.8/files/2008-darwin-Don-t-include-eprintf-in-libclang_rt.osx.a.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,19 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From bb7d87c427f55413e67b7f20d8093b9692bb75da Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Date: Thu, 4 Aug 2016 22:10:31 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Subject: [PATCH 2008/2008] darwin: Don't include eprintf in libclang_rt.osx.a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-https://llvm.org/bugs/show_bug.cgi?id=28855
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>----
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lib/builtins/Darwin-excludes/osx.txt | 1 +
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 1 file changed, 1 insertion(+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git llvm_master/projects/compiler-rt/lib/builtins/Darwin-excludes/osx.txt macports_master/projects/compiler-rt/lib/builtins/Darwin-excludes/osx.txt
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 6f9d0a7..a248b81 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- llvm/projects/compiler-rt/lib/builtins/Darwin-excludes/osx.txt
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ macports/projects/compiler-rt/lib/builtins/Darwin-excludes/osx.txt
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1 +1,2 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- apple_versioning
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+eprintf
</span></pre><pre style='margin:0'>

</pre>