gnu: llvm: Fix build with gcc@14.

* gnu/packages/patches/llvm-10-missing-include.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/llvm.scm (llvm-10, llvm-11)[origin]: Apply patch.

Co-authored-by: tobtoht
Change-Id: Id5f7aac3c2dc1193adc47b7472534c0269a4255f
This commit is contained in:
Andreas Enge 2025-07-15 20:46:47 +02:00
parent 78775d179b
commit 299794d028
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3
3 changed files with 20 additions and 2 deletions

View file

@ -1835,6 +1835,7 @@ dist_patch_DATA = \
%D%/packages/patches/llvm-9-fix-bitcast-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \
%D%/packages/patches/llvm-10-missing-include.patch \
%D%/packages/patches/llvm-13-gcc-14.patch \
%D%/packages/patches/lm-sensors-hwmon-attrs.patch \
%D%/packages/patches/lsh-fix-x11-forwarding.patch \

View file

@ -28,6 +28,7 @@
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023-2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2025 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@ -1002,7 +1003,8 @@ Library.")
(origin
(method url-fetch)
(uri (llvm-uri "llvm" version))
(patches (search-patches "llvm-8-missing-include.patch"))
(patches (search-patches "llvm-8-missing-include.patch"
"llvm-10-missing-include.patch"))
(sha256
(base32
"199yq3a214avcbi4kk2q0ajriifkvsr0l2dkx3a666m033ihi1ff"))))))
@ -1054,7 +1056,8 @@ Library.")
(origin
(method url-fetch)
(uri (llvm-uri "llvm" version))
(patches (search-patches "llvm-8-missing-include.patch"))
(patches (search-patches "llvm-8-missing-include.patch"
"llvm-10-missing-include.patch"))
(sha256
(base32
"1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))

View file

@ -0,0 +1,14 @@
Provided by tobtoht, see https://codeberg.org/guix/guix/issues/1234#issuecomment-5838284
diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h
index e0a18e72..c66ea8b3 100644
--- a/include/llvm/Support/Signals.h
+++ b/include/llvm/Support/Signals.h
@@ -15,6 +15,7 @@
#define LLVM_SUPPORT_SIGNALS_H
#include <string>
+#include <cstdint>
namespace llvm {
class StringRef;