diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2025-08-17 21:15:19 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-08-18 08:51:51 -0700 |
| commit | f915bbfc71f7b58c38607b8407718bd8b5cefa44 (patch) | |
| tree | b007fd12ca4d0490dcc4c03d18e825769aa196f7 | |
| parent | aef850f7fa53121c74b244b7ae40d31fb9809ccf (diff) | |
| download | meta-clang-f915bbfc71f7b58c38607b8407718bd8b5cefa44.tar.gz | |
clang: fix native build with gcc-15
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
5 files changed, 111 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0036-Add-cstdint-to-SmallVector-101761.patch b/recipes-devtools/clang/clang/0036-Add-cstdint-to-SmallVector-101761.patch new file mode 100644 index 0000000..cf00eac --- /dev/null +++ b/recipes-devtools/clang/clang/0036-Add-cstdint-to-SmallVector-101761.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From 9c9071480edd4093b28a9e9a9980c2426d27344c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sam James <sam@gentoo.org> | ||
| 3 | Date: Fri, 2 Aug 2024 23:07:21 +0100 | ||
| 4 | Subject: [PATCH] Add `<cstdint>` to SmallVector (#101761) | ||
| 5 | |||
| 6 | SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>` | ||
| 7 | which fails to build w/ GCC 15 after a change in libstdc++ [0] | ||
| 8 | |||
| 9 | [0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2 | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1] | ||
| 12 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 13 | --- | ||
| 14 | llvm/include/llvm/ADT/SmallVector.h | 1 + | ||
| 15 | 1 file changed, 1 insertion(+) | ||
| 16 | |||
| 17 | diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h | ||
| 18 | index 09676d792..17444147b 100644 | ||
| 19 | --- a/llvm/include/llvm/ADT/SmallVector.h | ||
| 20 | +++ b/llvm/include/llvm/ADT/SmallVector.h | ||
| 21 | @@ -19,6 +19,7 @@ | ||
| 22 | #include <algorithm> | ||
| 23 | #include <cassert> | ||
| 24 | #include <cstddef> | ||
| 25 | +#include <cstdint> | ||
| 26 | #include <cstdlib> | ||
| 27 | #include <cstring> | ||
| 28 | #include <functional> | ||
diff --git a/recipes-devtools/clang/clang/0037-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch b/recipes-devtools/clang/clang/0037-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch new file mode 100644 index 0000000..24e7e12 --- /dev/null +++ b/recipes-devtools/clang/clang/0037-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | From 422390b31680305ce6babcfbf65579b7dbe090a5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sam James <sam@gentoo.org> | ||
| 3 | Date: Sat, 3 Aug 2024 06:36:43 +0100 | ||
| 4 | Subject: [PATCH] Include `<cstdint>` in AMDGPUMCTargetDesc (#101766) | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/8f39502b85d34998752193e85f36c408d3c99248] | ||
| 7 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 8 | --- | ||
| 9 | llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 + | ||
| 10 | 1 file changed, 1 insertion(+) | ||
| 11 | |||
| 12 | diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | ||
| 13 | index 3ef00f757..879dbe1b2 100644 | ||
| 14 | --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | ||
| 15 | +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | ||
| 16 | @@ -15,6 +15,7 @@ | ||
| 17 | #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H | ||
| 18 | #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H | ||
| 19 | |||
| 20 | +#include <cstdint> | ||
| 21 | #include <memory> | ||
| 22 | |||
| 23 | namespace llvm { | ||
diff --git a/recipes-devtools/clang/clang/0038-Add-missing-include-to-X86MCTargetDesc.h-123320.patch b/recipes-devtools/clang/clang/0038-Add-missing-include-to-X86MCTargetDesc.h-123320.patch new file mode 100644 index 0000000..9bfbe9e --- /dev/null +++ b/recipes-devtools/clang/clang/0038-Add-missing-include-to-X86MCTargetDesc.h-123320.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 72dc74c42eb9d9940b36c6804a4e4ac757370324 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Stephan Hageboeck <stephan.hageboeck@cern.ch> | ||
| 3 | Date: Mon, 20 Jan 2025 17:52:47 +0100 | ||
| 4 | Subject: [PATCH] Add missing include to X86MCTargetDesc.h (#123320) | ||
| 5 | |||
| 6 | In gcc-15, explicit includes of `<cstdint>` are required when fixed-size | ||
| 7 | integers are used. In this file, this include only happened as a side | ||
| 8 | effect of including SmallVector.h | ||
| 9 | |||
| 10 | Although llvm compiles fine, the root-project would benefit from | ||
| 11 | explicitly including it here, so we can backport the patch. | ||
| 12 | |||
| 13 | Maybe interesting for @hahnjo and @vgvassilev | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/7abf44069aec61eee147ca67a6333fc34583b524] | ||
| 16 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 17 | --- | ||
| 18 | llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | 1 + | ||
| 19 | 1 file changed, 1 insertion(+) | ||
| 20 | |||
| 21 | diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | ||
| 22 | index 437a7bd6f..fd7d79484 100644 | ||
| 23 | --- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | ||
| 24 | +++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | ||
| 25 | @@ -13,6 +13,7 @@ | ||
| 26 | #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H | ||
| 27 | #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H | ||
| 28 | |||
| 29 | +#include <cstdint> | ||
| 30 | #include <memory> | ||
| 31 | #include <string> | ||
| 32 | |||
diff --git a/recipes-devtools/clang/clang/0039-Add-cstdint-to-AddressableBits-102110.patch b/recipes-devtools/clang/clang/0039-Add-cstdint-to-AddressableBits-102110.patch new file mode 100644 index 0000000..6e2bcb5 --- /dev/null +++ b/recipes-devtools/clang/clang/0039-Add-cstdint-to-AddressableBits-102110.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | From 662cec01a55c65b3e8e9a147dcc52a771a7f4b60 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sam James <sam@gentoo.org> | ||
| 3 | Date: Tue, 6 Aug 2024 09:58:36 +0100 | ||
| 4 | Subject: [PATCH] Add `<cstdint>` to AddressableBits (#102110) | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/bb59f04e7e75dcbe39f1bf952304a157f0035314] | ||
| 7 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 8 | --- | ||
| 9 | lldb/include/lldb/Utility/AddressableBits.h | 2 ++ | ||
| 10 | 1 file changed, 2 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/lldb/include/lldb/Utility/AddressableBits.h b/lldb/include/lldb/Utility/AddressableBits.h | ||
| 13 | index 13c21329a..0b0fd8bb2 100644 | ||
| 14 | --- a/lldb/include/lldb/Utility/AddressableBits.h | ||
| 15 | +++ b/lldb/include/lldb/Utility/AddressableBits.h | ||
| 16 | @@ -11,6 +11,8 @@ | ||
| 17 | |||
| 18 | #include "lldb/lldb-forward.h" | ||
| 19 | |||
| 20 | +#include <cstdint> | ||
| 21 | + | ||
| 22 | namespace lldb_private { | ||
| 23 | |||
| 24 | /// \class AddressableBits AddressableBits.h "lldb/Core/AddressableBits.h" | ||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index ac7d875..3e3178b 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
| @@ -46,6 +46,10 @@ SRC_URI = "\ | |||
| 46 | file://0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ | 46 | file://0033-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch \ |
| 47 | file://0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch \ | 47 | file://0034-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch \ |
| 48 | file://0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch \ | 48 | file://0035-compiler-rt-Fix-cmake-check-for-_Float16-and-__bf16.patch \ |
| 49 | file://0036-Add-cstdint-to-SmallVector-101761.patch \ | ||
| 50 | file://0037-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch \ | ||
| 51 | file://0038-Add-missing-include-to-X86MCTargetDesc.h-123320.patch \ | ||
| 52 | file://0039-Add-cstdint-to-AddressableBits-102110.patch \ | ||
| 49 | " | 53 | " |
| 50 | # Fallback to no-PIE if not set | 54 | # Fallback to no-PIE if not set |
| 51 | GCCPIE ??= "" | 55 | GCCPIE ??= "" |
