From 6cce6d79d3a899722c75a99b7bd12e6274aaccaf Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Sat, 17 May 2025 16:11:31 -0600 Subject: [PATCH] package/llvm-project: fix build with gcc 15 Adapt gentoo gcc patches from https://bugs.gentoo.org/939498 to fix build with gcc 15. The llvm project no longer maintains the llvm 15 branch. Signed-off-by: James Hilliard Signed-off-by: Julien Olivain --- .../compiler-rt/0001-include-cstdint.patch | 31 ++++++++++++++++ ...DT-Add-cstdint-to-SmallVector-101761.patch | 35 +++++++++++++++++++ ...cstdint-in-AMDGPUMCTargetDesc-101766.patch | 31 ++++++++++++++++ ...03-Another-gcc-15-fix-from-Sam-James.patch | 31 ++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 package/llvm-project/compiler-rt/0001-include-cstdint.patch create mode 100644 package/llvm-project/llvm/0001-ADT-Add-cstdint-to-SmallVector-101761.patch create mode 100644 package/llvm-project/llvm/0002-AMDGPU-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch create mode 100644 package/llvm-project/llvm/0003-Another-gcc-15-fix-from-Sam-James.patch diff --git a/package/llvm-project/compiler-rt/0001-include-cstdint.patch b/package/llvm-project/compiler-rt/0001-include-cstdint.patch new file mode 100644 index 0000000000..ce75b29f4e --- /dev/null +++ b/package/llvm-project/compiler-rt/0001-include-cstdint.patch @@ -0,0 +1,31 @@ +From 735207ac16bb15d88116bf00283eb0135ed2585a Mon Sep 17 00:00:00 2001 +From: Paul Zander +Date: Thu, 22 Aug 2024 11:40:13 +0200 +Subject: [PATCH] include cstdint +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Gentoo-Component: compiler-rt +Signed-off-by: Paul Zander +Signed-off-by: Michał Górny +Signed-off-by: James Hilliard +Upstream: https://bugs.gentoo.org/939498 +--- + lib/orc/error.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/orc/error.h b/lib/orc/error.h +index 92ac5a884ac6..33a599f71149 100644 +--- a/lib/orc/error.h ++++ b/lib/orc/error.h +@@ -14,6 +14,7 @@ + #include "stl_extras.h" + + #include ++#include + #include + #include + #include +-- +2.46.0 diff --git a/package/llvm-project/llvm/0001-ADT-Add-cstdint-to-SmallVector-101761.patch b/package/llvm-project/llvm/0001-ADT-Add-cstdint-to-SmallVector-101761.patch new file mode 100644 index 0000000000..eea83c27a8 --- /dev/null +++ b/package/llvm-project/llvm/0001-ADT-Add-cstdint-to-SmallVector-101761.patch @@ -0,0 +1,35 @@ +From 51d88407c1ae86c3b3c7b497d049f8980f2a3510 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 2 Aug 2024 23:07:21 +0100 +Subject: [PATCH] [ADT] Add `` to SmallVector (#101761) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +SmallVector uses `uint32_t`, `uint64_t` without including `` +which fails to build w/ GCC 15 after a change in libstdc++ [0] + +[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2 + +Gentoo-Component: llvm +Signed-off-by: Michał Górny +Signed-off-by: James Hilliard +Upstream: https://bugs.gentoo.org/939498 +--- + include/llvm/ADT/SmallVector.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h +index e34702bdbb3c..1c0f3465b2a9 100644 +--- a/include/llvm/ADT/SmallVector.h ++++ b/include/llvm/ADT/SmallVector.h +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.46.0 diff --git a/package/llvm-project/llvm/0002-AMDGPU-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch b/package/llvm-project/llvm/0002-AMDGPU-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch new file mode 100644 index 0000000000..73beab6c23 --- /dev/null +++ b/package/llvm-project/llvm/0002-AMDGPU-Include-cstdint-in-AMDGPUMCTargetDesc-101766.patch @@ -0,0 +1,31 @@ +From 000f92beb459096534a7bfaa8c5e99d77b7594c1 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 3 Aug 2024 06:36:43 +0100 +Subject: [PATCH] [AMDGPU] Include `` in AMDGPUMCTargetDesc + (#101766) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Gentoo-Component: llvm +Signed-off-by: Michał Górny +Signed-off-by: James Hilliard +Upstream: https://bugs.gentoo.org/939498 +--- + lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h +index c2e2563c3989..53aac8934100 100644 +--- a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h ++++ b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h +@@ -15,6 +15,7 @@ + #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H + #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H + ++#include + #include + + namespace llvm { +-- +2.46.0 diff --git a/package/llvm-project/llvm/0003-Another-gcc-15-fix-from-Sam-James.patch b/package/llvm-project/llvm/0003-Another-gcc-15-fix-from-Sam-James.patch new file mode 100644 index 0000000000..bc958bb056 --- /dev/null +++ b/package/llvm-project/llvm/0003-Another-gcc-15-fix-from-Sam-James.patch @@ -0,0 +1,31 @@ +From 67fc0069c285b37f09d408aae43c37b8afdf11f7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 3 Aug 2024 12:01:20 +0200 +Subject: [PATCH] Another gcc-15 fix from Sam James +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bug: https://bugs.gentoo.org/937164 +Gentoo-Component: llvm +Signed-off-by: Michał Górny +Signed-off-by: James Hilliard +Upstream: https://bugs.gentoo.org/939498 +--- + lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h +index d0530bd4d650..10b59462aebe 100644 +--- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h ++++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h +@@ -13,6 +13,7 @@ + #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H + #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H + ++#include + #include + #include + +-- +2.46.0