1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00
aports/main/llvm16/gcc15-cstdint.patch
2025-07-08 05:39:11 +00:00

75 lines
2.7 KiB
Diff

Patch-Source-1: https://github.com/llvm/llvm-project/commit/7abf44069aec61eee147ca67a6333fc34583b524
Patch-Source-2: https://github.com/llvm/llvm-project/commit/8f39502b85d34998752193e85f36c408d3c99248
Patch-Source-3: https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1
--
From 7abf44069aec61eee147ca67a6333fc34583b524 Mon Sep 17 00:00:00 2001
From: Stephan Hageboeck <stephan.hageboeck@cern.ch>
Date: Mon, 20 Jan 2025 17:52:47 +0100
Subject: [PATCH] Add missing include to X86MCTargetDesc.h (#123320)
In gcc-15, explicit includes of `<cstdint>` are required when fixed-size
integers are used. In this file, this include only happened as a side
effect of including SmallVector.h
Although llvm compiles fine, the root-project would benefit from
explicitly including it here, so we can backport the patch.
Maybe interesting for @hahnjo and @vgvassilev
---
llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | 1 +
1 file changed, 1 insertion(+)
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+++ b/llvm/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 <cstdint>
#include <memory>
#include <string>
--
From 8f39502b85d34998752193e85f36c408d3c99248 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 3 Aug 2024 06:36:43 +0100
Subject: [PATCH] [AMDGPU] Include `<cstdint>` in AMDGPUMCTargetDesc (#101766)
---
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 +
1 file changed, 1 insertion(+)
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+++ b/llvm/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 <cstdint>
#include <memory>
namespace llvm {
--
From 7e44305041d96b064c197216b931ae3917a34ac1 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 2 Aug 2024 23:07:21 +0100
Subject: [PATCH] [ADT] Add `<cstdint>` to SmallVector (#101761)
SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>`
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
---
llvm/include/llvm/ADT/SmallVector.h | 1 +
1 file changed, 1 insertion(+)
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -19,6 +19,7 @@
#include <algorithm>
#include <cassert>
#include <cstddef>
+#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <functional>