<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/9e855c03657030f7cc3c85a41a89e09ae453be67">https://github.com/macports/macports-ports/commit/9e855c03657030f7cc3c85a41a89e09ae453be67</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 9e855c03657 clang-13, llvm-13, lldb-13: fix for macOS ≥ 14
</span>9e855c03657 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9e855c03657030f7cc3c85a41a89e09ae453be67
</span>Author: Mark Mentovai <mark@mentovai.com>
AuthorDate: Fri Sep 27 17:09:26 2024 -0400
<span style='display:block; white-space:pre;color:#404040;'> clang-13, llvm-13, lldb-13: fix for macOS ≥ 14
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This rolls up backports of the following fixes for later llvm versions
</span><span style='display:block; white-space:pre;color:#404040;'> to llvm-13:
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> 93df94134805 clang-14: Fix build under Xcode 15
</span><span style='display:block; white-space:pre;color:#404040;'> 2605e66ff779 lldb-14: fix build with macOS ≥ 14 SDK (Xcode ≥ 15)
</span><span style='display:block; white-space:pre;color:#404040;'> aa0bc47391a7 clang-14: Move libc++*.* libraries to libc++ sub-dir, fix
</span><span style='display:block; white-space:pre;color:#404040;'> install names
</span><span style='display:block; white-space:pre;color:#404040;'> 49df5ce7f1f6 clang-14, llvm-14: restore functionality on macOS 15 (Xcode
</span><span style='display:block; white-space:pre;color:#404040;'> 16)
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> References: https://trac.macports.org/ticket/68257
</span><span style='display:block; white-space:pre;color:#404040;'> References: https://trac.macports.org/ticket/70779
</span>---
lang/llvm-13/Portfile | 41 +++++--
...tdio-include-to-fix-a595b931f1f91897317a4.patch | 26 +++++
.../0029-xray-Use-L-instead-of-.L-for-Mach-O.patch | 121 +++++++++++++++++++++
...ove-cfi-start-s-after-the-symbol-name-NFC.patch | 32 ++++++
lang/llvm-13/files/patch-xcode-15.diff | 47 ++++++++
5 files changed, 260 insertions(+), 7 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-13/Portfile b/lang/llvm-13/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bf7a8f41dd7..4593d7616fc 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-13/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-13/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,15 +20,13 @@ categories lang
</span> license NCSA
maintainers nomaintainer
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms {darwin < 23}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set llvm_version 13
version ${llvm_version}.0.1
name llvm-${llvm_version}
revision 2
subport mlir-${llvm_version} { revision 0 }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-subport clang-${llvm_version} { revision 3 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport clang-${llvm_version} { revision 4 }
</span> subport lldb-${llvm_version} { revision 2 }
subport flang-${llvm_version} { revision 0 }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -61,15 +59,14 @@ cmake.build_type Release
</span> cmake.install_rpath
configure.pre_args-delete \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DCMAKE_INSTALL_NAME_DIR=${cmake.install_prefix}/lib \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DCMAKE_INSTALL_RPATH=${cmake.install_prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_NAME_DIR="${cmake.install_prefix}/lib"
</span>
configure.pre_args-replace \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
configure.pre_args-replace \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DCMAKE_SYSTEM_PREFIX_PATH="${prefix}\;/usr" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_SYSTEM_PREFIX_PATH="${prefix}\;${cmake.install_prefix}\;/usr" \
</span> -DCMAKE_SYSTEM_PREFIX_PATH="${cmake.install_prefix}\;${prefix}\;/usr"
configure.args-append \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,9 +127,13 @@ patchfiles-append \
</span> 0015-Fixup-libstdc-header-search-paths-for-older-versions.patch \
0019-10.6-and-less-use-emulated-TLS-before-10.7.patch \
0025-lldb-add-defines-needed-for-older-SDKs.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0028-lldb-Add-cstdio-include-to-fix-a595b931f1f91897317a4.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0029-xray-Use-L-instead-of-.L-for-Mach-O.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0030-builtins-Move-cfi-start-s-after-the-symbol-name-NFC.patch \
</span> SyntheticSections.cpp-types.patch \
patch-lldb-stdc-macros-134877.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-lldb-fix-swig-lvalue-2128646.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-lldb-fix-swig-lvalue-2128646.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-xcode-15.diff
</span>
if {${os.platform} eq "darwin" && ${os.major} < 14} {
patchfiles-append \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -442,6 +443,16 @@ post-destroot {
</span> macos-setup-codesign.sh \
${lldb_scripts_destdir}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # move libc++ libraries out of default location to prevent accidental linkage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libcxx_dir ${destroot}${sub_prefix}/lib/libc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${libcxx_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [glob -nocomplain ${destroot}${sub_prefix}/lib/libc++*.*] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Moving ${f} to ${libcxx_dir}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${f} ${libcxx_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
if {${subport} eq "clang-${llvm_version}"} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -527,6 +538,22 @@ if {${subport} eq "clang-${llvm_version}"} {
</span> if { ${cxx_stdlib} eq "libstdc++" } {
default_variants-append +libstdcxx
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # -Wl,-syslibroot referencing the macOS SDK must not appear when linking
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # runtime libraries for non-macOS platforms, which are cross-built and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # used for cross-platform support. The clang build will provide the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # proper -isysroot for the platform in these cases. Remove the macOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # SDK.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach rtl {asan lsan stats tsan ubsan ubsan_minimal} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach rtl_os {ios iossim} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set link_txt_path "${workpath}/build/projects/compiler-rt/lib/${rtl}/CMakeFiles/clang_rt.${rtl}_${rtl_os}_dynamic.dir/link.txt"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists "${link_txt_path}"]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|-Wl,-syslibroot,${configure.sdkroot}||" "${link_txt_path}"
</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> }
livecheck.type regex
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-13/files/0028-lldb-Add-cstdio-include-to-fix-a595b931f1f91897317a4.patch b/lang/llvm-13/files/0028-lldb-Add-cstdio-include-to-fix-a595b931f1f91897317a4.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..8eb5beb80f3
</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-13/files/0028-lldb-Add-cstdio-include-to-fix-a595b931f1f91897317a4.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 73e15b5edb4fa4a77e68c299a6e3b21e610d351f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Dmitry Chernenkov <dmitryc@google.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 2 May 2023 12:45:28 +0000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] [lldb] Add cstdio include to fix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ a595b931f1f91897317a4257df313bddfeb029a6
</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;'>+ lldb/include/lldb/API/SBFile.h | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lldb/include/lldb/API/SBFile.h b/lldb/include/lldb/API/SBFile.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d8b348b25c81..ebdc5607b794 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lldb/include/lldb/API/SBFile.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lldb/include/lldb/API/SBFile.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,6 +11,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "lldb/API/SBDefines.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <cstdio>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namespace lldb {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ class LLDB_API SBFile {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.46.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-13/files/0029-xray-Use-L-instead-of-.L-for-Mach-O.patch b/lang/llvm-13/files/0029-xray-Use-L-instead-of-.L-for-Mach-O.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..198db6ce1d9
</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-13/files/0029-xray-Use-L-instead-of-.L-for-Mach-O.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,121 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From c57c7b7c99605021123b54c02e57943923874cbe Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Fangrui Song <i@maskray.me>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 16 Jun 2023 12:04:28 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] [xray] Use L* instead of .L* for Mach-O
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Note: Mach-O support is not yet done and check-xray is not allowed yet.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler-rt/lib/xray/xray_trampoline_x86_64.S | 28 +++++++++----------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 14 insertions(+), 14 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/xray/xray_trampoline_x86_64.S b/compiler-rt/lib/xray/xray_trampoline_x86_64.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 02cf69f766c4..0f00bcc41508 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/xray/xray_trampoline_x86_64.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/xray/xray_trampoline_x86_64.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -124,14 +124,14 @@ ASM_SYMBOL(__xray_FunctionEntry):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // On x86/amd64, a simple (type-aligned) MOV instruction is enough.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray19XRayPatchedFunctionE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax, %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .Ltmp0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(tmp0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // The patched function prologue puts its xray_instr_map index into %r10d.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movl %r10d, %edi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xor %esi,%esi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.Ltmp0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(tmp0):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_REGISTERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_STACK_ALIGNMENT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ retq
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -162,13 +162,13 @@ ASM_SYMBOL(__xray_FunctionExit):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq %rdx, 0(%rsp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray19XRayPatchedFunctionE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax,%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .Ltmp2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(tmp2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movl %r10d, %edi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movl $1, %esi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.Ltmp2:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(tmp2):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Restore the important registers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq 48(%rsp), %rbp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movupd 32(%rsp), %xmm0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -198,13 +198,13 @@ ASM_SYMBOL(__xray_FunctionTailExit):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray19XRayPatchedFunctionE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax,%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .Ltmp4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(tmp4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movl %r10d, %edi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movl $2, %esi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.Ltmp4:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(tmp4):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_REGISTERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_STACK_ALIGNMENT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ retq
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -227,14 +227,14 @@ ASM_SYMBOL(__xray_ArgLoggerEntry):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Again, these function pointer loads must be atomic; MOV is fine.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray13XRayArgLoggerE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax, %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- jne .Larg1entryLog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ jne LOCAL_LABEL(arg1entryLog)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // If [arg1 logging handler] not set, defer to no-arg logging.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray19XRayPatchedFunctionE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax, %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .Larg1entryFail
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(arg1entryFail)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.Larg1entryLog:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(arg1entryLog):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // First argument will become the third
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq %rdi, %rdx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -247,7 +247,7 @@ ASM_SYMBOL(__xray_ArgLoggerEntry):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.Larg1entryFail:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(arg1entryFail):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_REGISTERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_STACK_ALIGNMENT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ retq
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -270,11 +270,11 @@ ASM_SYMBOL(__xray_CustomEvent):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // already.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray22XRayPatchedCustomEventE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax,%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .LcustomEventCleanup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(customEventCleanup)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.LcustomEventCleanup:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(customEventCleanup):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_REGISTERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ retq
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # LLVM-MCA-END
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -296,11 +296,11 @@ ASM_SYMBOL(__xray_TypedEvent):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // and rdx without our intervention.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ movq ASM_SYMBOL(_ZN6__xray21XRayPatchedTypedEventE)(%rip), %rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ testq %rax,%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- je .LtypedEventCleanup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ je LOCAL_LABEL(typedEventCleanup)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ callq *%rax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-.LtypedEventCleanup:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LOCAL_LABEL(typedEventCleanup):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RESTORE_REGISTERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ retq
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # LLVM-MCA-END
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.46.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-13/files/0030-builtins-Move-cfi-start-s-after-the-symbol-name-NFC.patch b/lang/llvm-13/files/0030-builtins-Move-cfi-start-s-after-the-symbol-name-NFC.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f1a5dd25d25
</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-13/files/0030-builtins-Move-cfi-start-s-after-the-symbol-name-NFC.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,32 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 7939ce39dac0078fef7183d6198598b99c652c88 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Jon Roelofs <jonathan_roelofs@apple.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 17 Nov 2023 14:21:57 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] [builtins] Move cfi start's after the symbol name [NFC]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+... in preparation for diagnosing improperly nested .cfi regions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See https://reviews.llvm.org/D155245
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler-rt/lib/builtins/assembly.h | 5 +++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 169d49683f50..8c42fc773483 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/builtins/assembly.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/builtins/assembly.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -260,9 +260,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .globl name SEPARATOR \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SYMBOL_IS_FUNC(name) SEPARATOR \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DECLARE_SYMBOL_VISIBILITY_UNMANGLED(name) SEPARATOR \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFI_START SEPARATOR \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DECLARE_FUNC_ENCODING \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- name: SEPARATOR BTI_C
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ name: \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SEPARATOR CFI_START \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SEPARATOR BTI_C
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DEFINE_COMPILERRT_FUNCTION_ALIAS(name, target) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .globl SYMBOL_NAME(name) SEPARATOR \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.46.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-13/files/patch-xcode-15.diff b/lang/llvm-13/files/patch-xcode-15.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e6d5ddb22a7
</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-13/files/patch-xcode-15.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,47 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 786c10cd82a78c210379700b72cf18a018e1e1f7 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Mark Mentovai <mark@mentovai.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 28 Sep 2023 11:18:41 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] [sanitizer] Use consistent checks for XDR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+MIME-Version: 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Content-Type: text/plain; charset=UTF-8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Content-Transfer-Encoding: 8bit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This is a backport of 28800c2e18972935cd4f942aa428c5e6cc4c1670
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(https://reviews.llvm.org/D130060), which is in llvm-15, to llvm-14,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+however it’s been adapted to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-8246b2e156568c31e71e16cbaf4c14d316e7c06e
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(https://reviews.llvm.org/D126263), which renamed SANITIZER_MAC (the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+macro in llvm-14) to SANITIZER_APPLE (the macro in llvm-15 and later).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The original change’s description:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> sanitizer_platform_limits_posix.h defines `__sanitizer_XDR ` if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> `SANITIZER_LINUX && !SANITIZER_ANDROID`, but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> sanitizer_platform_limits_posix.cpp tries to check it if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> `HAVE_RPC_XDR_H`. This coincidentally works because macOS has a broken
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> <rpc/xdr.h> which causes `HAVE_RPC_XDR_H` to be 0, but if <rpc/xdr.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> is fixed then clang fails to compile on macOS. Restore the platform
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+> checks so that <rpc/xdr.h> can be fixed on macOS.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This has become important with Xcode 15, which contains the macOS 14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+SDK, which does have a fixed <rpc/xdr.h>.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .../lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 32b8f47ed633..6cefef3f3327 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1250,7 +1250,7 @@ CHECK_SIZE_AND_OFFSET(group, gr_passwd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_SIZE_AND_OFFSET(group, gr_gid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_SIZE_AND_OFFSET(group, gr_mem);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if HAVE_RPC_XDR_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_RPC_XDR_H && !SANITIZER_MAC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_TYPE_SIZE(XDR);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_SIZE_AND_OFFSET(XDR, x_op);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_SIZE_AND_OFFSET(XDR, x_ops);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.42.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>