about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
new file mode 100644
index 000000000000..20d35c9f3ea9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
@@ -0,0 +1,12 @@
+diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
++++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
+     len = sizeof(is_64_bit_capable);
+     ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
+ 
+-    if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
++    if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
+       // The arm64e architecture is a preview. Pretend the host architecture
+       // is arm64.
+       cpusubtype = CPU_SUBTYPE_ARM64_ALL;