From b4ee532f360090c3ed3277e7224763bd6429b412 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Sun, 15 Jan 2023 15:17:55 -0800 Subject: [PATCH] llvmPackages_15.lldb: fix the build on `i686` as detailed within, adding `asm/ptrace.h` leads to `asm/ptrace-abi.h` being included which defines preprocessor symbols that clash with identifiers used in the LLVM headers (`FS` and `CS` only defined on i686) --- pkgs/development/compilers/llvm/15/lldb/procfs.patch | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/15/lldb/procfs.patch b/pkgs/development/compilers/llvm/15/lldb/procfs.patch index a798216aa62c..7b200e86505c 100644 --- a/pkgs/development/compilers/llvm/15/lldb/procfs.patch +++ b/pkgs/development/compilers/llvm/15/lldb/procfs.patch @@ -1,14 +1,20 @@ --- a/source/Plugins/Process/Linux/Procfs.h +++ b/source/Plugins/Process/Linux/Procfs.h -@@ -10,6 +10,7 @@ +@@ -10,6 +10,13 @@ // sys/procfs.h on Android/Linux for all supported architectures. #include +#include ++ ++// on i686 preprocessor symbols with these register names are defined as ++// numeric constants; these symbols clash with identifier names used in ++// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` ++#undef FS ++#undef CS #include "lldb/lldb-types.h" -@@ -17,23 +18,13 @@ +@@ -17,23 +24,13 @@ #include