<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a4bb31618a1e040be631a72d4e01948778b343fb">https://github.com/macports/macports-ports/commit/a4bb31618a1e040be631a72d4e01948778b343fb</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'>     new a4bb316  libtapi: force libtool to use current libLTO
</span>a4bb316 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit a4bb31618a1e040be631a72d4e01948778b343fb
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Wed Jan 22 08:17:38 2020 -0800

<span style='display:block; white-space:pre;color:#404040;'>    libtapi: force libtool to use current libLTO
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    libtool by default uses the libLTO.dylib that it was configured
</span><span style='display:block; white-space:pre;color:#404040;'>    to use during the build of cctools. However, clang builds objects
</span><span style='display:block; white-space:pre;color:#404040;'>    using it's versioned libLTO.dylib. If newer, then libtool
</span><span style='display:block; white-space:pre;color:#404040;'>    can fail.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The interface to libLTO.dylib is purposefully very stable to account
</span><span style='display:block; white-space:pre;color:#404040;'>    for this possibility. The recommended solution to this issue from
</span><span style='display:block; white-space:pre;color:#404040;'>    LLVM is to set DYLD_LIBRARY_PATH to the newer libLTO.dylib to fix
</span><span style='display:block; white-space:pre;color:#404040;'>    this issue with libtool, and that is what LLVM uses during it's
</span><span style='display:block; white-space:pre;color:#404040;'>    multistage builds of LLVM / CLANG.
</span>---
 devel/libtapi/Portfile | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libtapi/Portfile b/devel/libtapi/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 56cf1e7..d1e0a53 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libtapi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libtapi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,12 +59,16 @@ if {[string match macports-clang-* ${configure.compiler}]} {
</span>     configure.args-append   -DCMAKE_LIBTOOL=${prefix}/bin/libtool
     configure.args-append   -DCMAKE_LINKER=${prefix}/bin/ld
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    # libtool can choke on llvm bitcode generate by a clang newer than the libLTO.dylib being used
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    # making sure cctools is built against the newest llvm in use prevents this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # libtool will error on llvm bitcode generated by a clang version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # newer than the libLTO.dylib cctools is built against
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # making sure cctools is built against the newest llvm in use prevents this, but we can't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # always guarantee that will be the case
</span> 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    # we might instead be able to set DYLD_LIBRARY_PATH to the libLTO.dylib that matches the building clang or newer
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    # that requires figuring out the building macports-clang version, and setting up that libLTO.dylib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    # libtool will possibly just use that libLTO.dylib without error (untested, but reported to work)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # we can instead set DYLD_LIBRARY_PATH to the libLTO.dylib that matches the building clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # then libtool will use that libLTO.dylib instead, which matches the clang objects
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set clangversion        [lindex [split ${configure.compiler} -] 2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    build.env               DYLD_LIBRARY_PATH=${prefix}/libexec/llvm-$clangversion/lib/
</span> }
 
 if {${os.platform} eq "darwin" && ${os.major} < 11} {
</pre><pre style='margin:0'>

</pre>