llvmPackages_18.lldb: fix build with gcc15
- add patch from upstream commit that was not backported to llvm_18: https://github.com/llvm/llvm-project/commit/bb59f04e7e75dcbe39f1bf952304a157f0035314 Fixes build failure with gcc15: ``` In file included from /build/lldb-src-18.1.8/lldb/source/Utility/AddressableBits.cpp:9: /build/lldb-src-18.1.8/lldb/include/lldb/Utility/AddressableBits.h:25:27: error: 'uint32_t' has not been declared 25 | void SetAddressableBits(uint32_t addressing_bits); | ^~~~~~~~ /build/lldb-src-18.1.8/lldb/include/lldb/Utility/AddressableBits.h:13:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 12 | #include "lldb/lldb-forward.h" +++ |+#include <cstdint> 13 | ``` Cannot use `fetchpatch` because patch does not apply on llvm_18 (no `#include "lldb/lldb-public.h"` line on llvm_18).
This commit is contained in:
@@ -70,7 +70,14 @@ stdenv.mkDerivation (
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/lldb";
|
||||
|
||||
patches = [ ./gnu-install-dirs.patch ];
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
]
|
||||
++ lib.optional (lib.versions.major release_version == "18") [
|
||||
# Fix build with gcc15
|
||||
# https://github.com/llvm/llvm-project/commit/bb59f04e7e75dcbe39f1bf952304a157f0035314
|
||||
./lldb-add-include-cstdint.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Rebase of upstream commit:
|
||||
https://github.com/llvm/llvm-project/commit/bb59f04e7e75dcbe39f1bf952304a157f0035314
|
||||
|
||||
diff --git a/include/lldb/Utility/AddressableBits.h b/include/lldb/Utility/AddressableBits.h
|
||||
index 0d27c3561ec27..8c7a1ec5f52c0 100644
|
||||
--- a/include/lldb/Utility/AddressableBits.h
|
||||
+++ b/include/lldb/Utility/AddressableBits.h
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "lldb/lldb-forward.h"
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace lldb_private {
|
||||
|
||||
/// \class AddressableBits AddressableBits.h "lldb/Core/AddressableBits.h"
|
||||
|
||||
Reference in New Issue
Block a user