<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e6a463608b586b040f189959604ef95539d0794b">https://github.com/macports/macports-ports/commit/e6a463608b586b040f189959604ef95539d0794b</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 e6a463608b5 llvm-5.0: fix the build on old systems with newer GCC, enable PPC (#15644)
</span>e6a463608b5 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit e6a463608b586b040f189959604ef95539d0794b
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Sun Aug 7 21:12:22 2022 +0545
<span style='display:block; white-space:pre;color:#404040;'> llvm-5.0: fix the build on old systems with newer GCC, enable PPC (#15644)
</span>---
lang/llvm-5.0/Portfile | 26 ++++++++++++++++----------
lang/llvm-5.0/files/patch-include-orc.diff | 15 +++++++++++++++
2 files changed, 31 insertions(+), 10 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-5.0/Portfile b/lang/llvm-5.0/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index fff25c4ded8..4a21d5ca739 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-5.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-5.0/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -17,7 +17,6 @@ set suffix mp-${llvm_version}
</span> set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
dist_subdir llvm
categories lang
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span> license NCSA
maintainers {jeremyhu @jeremyhu}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -314,16 +313,17 @@ if {${os.platform} eq "darwin" && ${os.major} >= 11} {
</span> configure.args-append -DPYTHON_EXECUTABLE=${pythonfullpath}
platform darwin {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libcxx is untested on PPC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build_arch} ni [list ppc ppc64]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxx_stdlib libc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libcxx
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.cxx_stdlib libc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append port:libcxx
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- supported_archs i386 x86_64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-fetch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists /usr/lib/libc++.dylib]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "$name requires a C++11 runtime, which your configuration does not allow"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- error "unsupported configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists /usr/lib/libc++.dylib]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "$name requires a C++11 runtime, which your configuration does not allow"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "unsupported configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -370,6 +370,12 @@ platform darwin {
</span>
# https://llvm.org/bugs/show_bug.cgi?id=25680
configure.cxxflags-append -U__STRICT_ANSI__
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Wrong type in OrcRemoteTargetClient.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # error: could not convert 'Src->((llvm::orc::remote::OrcRemoteTargetClient<ChannelT>*)this)->callB<llvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem>(Size)'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # from 'Expected<vector<unsigned char,allocator<unsigned char>>>' to 'Expected<vector<char,allocator<char>>>'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Patch borrows from llvm-7.1: https://github.com/iains/LLVM-7-branch/blob/7.1.1-Darwin-WIP/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-include-orc.diff
</span> }
# https://llvm.org/bugs/show_bug.cgi?id=25674
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-5.0/files/patch-include-orc.diff b/lang/llvm-5.0/files/patch-include-orc.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..166eaa6a4f5
</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-5.0/files/patch-include-orc.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Existing code fails to build on PPC:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# error: could not convert 'Src->((llvm::orc::remote::OrcRemoteTargetClient<ChannelT>*)this)->callB<llvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem>(Size)' from 'Expected<vector<unsigned char,allocator<unsigned char>>>' to 'Expected<vector<char,allocator<char>>>'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fix from: https://github.com/iains/LLVM-7-branch/blob/7.1.1-Darwin-WIP/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h.orig 2022-08-07 10:10:02.000000000 +0545
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h 2022-08-07 09:48:41.000000000 +0545
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -713,7 +713,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint32_t getTrampolineSize() const { return RemoteTrampolineSize; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Expected<std::vector<char>> readMem(char *Dst, JITTargetAddress Src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Expected<std::vector<uint8_t>> readMem(char *Dst, JITTargetAddress Src,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint64_t Size) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Check for an 'out-of-band' error, e.g. from an MM destructor.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (ExistingError)
</span></pre><pre style='margin:0'>
</pre>