commit:     0ce052001c1ee0ab5b68d5b5caf584c0750643f7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 13:01:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 13:01:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ce05200

dev-libs/pocl: fix build w/ gcc-15

Closes: https://bugs.gentoo.org/940271
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/pocl/files/pocl-6.0-gcc15.patch | 27 +++++++++++++++++++++++++++
 dev-libs/pocl/pocl-6.0.ebuild            |  6 +++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dev-libs/pocl/files/pocl-6.0-gcc15.patch 
b/dev-libs/pocl/files/pocl-6.0-gcc15.patch
new file mode 100644
index 000000000000..6176e54bfecc
--- /dev/null
+++ b/dev-libs/pocl/files/pocl-6.0-gcc15.patch
@@ -0,0 +1,27 @@
+https://github.com/pocl/pocl/commit/3333cbc6a16fba0bc3f3c66ba6e68ce9bb46c549
+
+From 3333cbc6a16fba0bc3f3c66ba6e68ce9bb46c549 Mon Sep 17 00:00:00 2001
+From: Vitaly <[email protected]>
+Date: Mon, 27 Jan 2025 09:52:47 +0100
+Subject: [PATCH] Added missing cstdint header to fix build with libstdc++ 15.
+
+--- a/lib/CL/devices/spirv_parser.cc
++++ b/lib/CL/devices/spirv_parser.cc
+@@ -25,6 +25,7 @@
+ 
+ #include <algorithm>
+ #include <cassert>
++#include <cstdint>
+ #include <cstring>
+ #include <fstream>
+ #include <iostream>
+--- a/lib/CL/devices/spirv_parser.hh
++++ b/lib/CL/devices/spirv_parser.hh
+@@ -34,6 +34,7 @@
+ #define SPIRV_PARSER_EXPORT POCL_EXPORT
+ #endif
+ 
++#include <cstdint>
+ #include <map>
+ #include <memory>
+ #include <set>

diff --git a/dev-libs/pocl/pocl-6.0.ebuild b/dev-libs/pocl/pocl-6.0.ebuild
index 4141b49feb9a..f2d1f5c8bc9f 100644
--- a/dev-libs/pocl/pocl-6.0.ebuild
+++ b/dev-libs/pocl/pocl-6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -44,6 +44,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc15.patch
+)
+
 src_prepare() {
        use cuda && cuda_src_prepare
        cmake_src_prepare

Reply via email to