llvmPackages_{13,14,15,16,17,18,19,git}.lldb: commonify patches

+10 -418
-31
pkgs/development/compilers/llvm/13/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -11,21 +11,12 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - 9 - -#ifdef __ANDROID__ 10 - -#if defined(__arm64__) || defined(__aarch64__) 11 - -typedef unsigned long elf_greg_t; 12 - -typedef elf_greg_t 13 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 14 - -typedef struct user_fpsimd_state elf_fpregset_t; 15 - -#ifndef NT_FPREGSET 16 - -#define NT_FPREGSET NT_PRFPREG 17 - -#endif // NT_FPREGSET 18 - -#elif defined(__mips__) 19 - -#ifndef NT_FPREGSET 20 - -#define NT_FPREGSET NT_PRFPREG 21 - -#endif // NT_FPREGSET 22 - -#endif 23 - -#else // __ANDROID__ 24 - +#if !defined(__GLIBC__) && defined(__powerpc__) 25 - +#define pt_regs musl_pt_regs 26 - +#include <sys/procfs.h> 27 - +#undef pt_regs 28 - +#else 29 - #include <sys/procfs.h> 30 - -#endif // __ANDROID__ 31 - +#endif
-13
pkgs/development/compilers/llvm/13/lldb/resource-dir.patch
··· 1 - diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake 2 - index 37364341ff8b..7f74c1a3e257 100644 3 - --- a/cmake/modules/LLDBConfig.cmake 4 - +++ b/cmake/modules/LLDBConfig.cmake 5 - @@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers) 6 - # Iterate over the possible places where the external resource directory 7 - # could be and pick the first that exists. 8 - foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" 9 - - "${LLVM_BUILD_LIBRARY_DIR}" 10 - + "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@" 11 - "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") 12 - # Build the resource directory path by appending 'clang/<version number>'. 13 - set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
-12
pkgs/development/compilers/llvm/14/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-31
pkgs/development/compilers/llvm/14/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -11,21 +11,12 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - 9 - -#ifdef __ANDROID__ 10 - -#if defined(__arm64__) || defined(__aarch64__) 11 - -typedef unsigned long elf_greg_t; 12 - -typedef elf_greg_t 13 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 14 - -typedef struct user_fpsimd_state elf_fpregset_t; 15 - -#ifndef NT_FPREGSET 16 - -#define NT_FPREGSET NT_PRFPREG 17 - -#endif // NT_FPREGSET 18 - -#elif defined(__mips__) 19 - -#ifndef NT_FPREGSET 20 - -#define NT_FPREGSET NT_PRFPREG 21 - -#endif // NT_FPREGSET 22 - -#endif 23 - -#else // __ANDROID__ 24 - +#if !defined(__GLIBC__) && defined(__powerpc__) 25 - +#define pt_regs musl_pt_regs 26 - +#include <sys/procfs.h> 27 - +#undef pt_regs 28 - +#else 29 - #include <sys/procfs.h> 30 - -#endif // __ANDROID__ 31 - +#endif
-13
pkgs/development/compilers/llvm/14/lldb/resource-dir.patch
··· 1 - diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake 2 - index 37364341ff8b..7f74c1a3e257 100644 3 - --- a/cmake/modules/LLDBConfig.cmake 4 - +++ b/cmake/modules/LLDBConfig.cmake 5 - @@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers) 6 - # Iterate over the possible places where the external resource directory 7 - # could be and pick the first that exists. 8 - foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" 9 - - "${LLVM_BUILD_LIBRARY_DIR}" 10 - + "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@" 11 - "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") 12 - # Build the resource directory path by appending 'clang/<version number>'. 13 - set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
-12
pkgs/development/compilers/llvm/15/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-13
pkgs/development/compilers/llvm/15/lldb/resource-dir.patch
··· 1 - diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake 2 - index 37364341ff8b..7f74c1a3e257 100644 3 - --- a/cmake/modules/LLDBConfig.cmake 4 - +++ b/cmake/modules/LLDBConfig.cmake 5 - @@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers) 6 - # Iterate over the possible places where the external resource directory 7 - # could be and pick the first that exists. 8 - foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" 9 - - "${LLVM_BUILD_LIBRARY_DIR}" 10 - + "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@" 11 - "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") 12 - # Build the resource directory path by appending 'clang/<version number>'. 13 - set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
-12
pkgs/development/compilers/llvm/16/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-46
pkgs/development/compilers/llvm/16/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {
-12
pkgs/development/compilers/llvm/17/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-46
pkgs/development/compilers/llvm/17/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {
-12
pkgs/development/compilers/llvm/18/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-46
pkgs/development/compilers/llvm/18/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {
-12
pkgs/development/compilers/llvm/19/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-46
pkgs/development/compilers/llvm/19/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {
+10 -3
pkgs/development/compilers/llvm/common/default.nix
··· 91 91 && (p == "clang/purity.patch" || p == "libunwind/gnu-install-dirs.patch") 92 92 then 93 93 ../15/${p} 94 - else if p == "compiler-rt/X86-support-extension.patch" then 94 + else if p == "compiler-rt/X86-support-extension.patch" || p == "lldb/procfs.patch" then 95 95 (if lib.versionAtLeast release_version "15" then ../15/${p} else ../12/${p}) 96 96 else if 97 97 lib.versionAtLeast release_version "13" ··· 102 102 else if p == "compiler-rt/gnu-install-dirs.patch" && lib.versionAtLeast release_version "15" then 103 103 (if lib.versionAtLeast release_version "15" then ../15/${p} else ../12/${p}) 104 104 else if 105 - (p == "compiler-rt/darwin-targetconditionals.patch" || p == "compiler-rt/codesign.patch") 105 + ( 106 + p == "compiler-rt/darwin-targetconditionals.patch" 107 + || p == "compiler-rt/codesign.patch" 108 + || p == "lldb/cpu_subtype_arm64e_replacement.patch" 109 + ) 106 110 && lib.versionAtLeast release_version "13" 107 111 then 108 112 ../13/${p} ··· 111 115 && (p == "lld/add-table-base.patch" || p == "compiler-rt/normalize-var.patch") 112 116 then 113 117 ../16/${p} 114 - else if lib.versionOlder release_version "16" && p == "compiler-rt/normalize-var.patch" then 118 + else if 119 + lib.versionOlder release_version "16" 120 + && (p == "compiler-rt/normalize-var.patch" || p == "lldb/resource-dir.patch") 121 + then 115 122 ../12/${p} 116 123 else if lib.versionOlder release_version "14" && p == "lld/gnu-install-dirs.patch" then 117 124 ../12/${p}
-12
pkgs/development/compilers/llvm/git/lldb/cpu_subtype_arm64e_replacement.patch
··· 1 - diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 2 - --- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm 3 - +++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm 4 - @@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, 5 - len = sizeof(is_64_bit_capable); 6 - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); 7 - 8 - - if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { 9 - + if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers 10 - // The arm64e architecture is a preview. Pretend the host architecture 11 - // is arm64. 12 - cpusubtype = CPU_SUBTYPE_ARM64_ALL;
-46
pkgs/development/compilers/llvm/git/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {