]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
vulkan-samples: Fix build with GCC-15
authorKhem Raj <raj.khem@gmail.com>
Tue, 25 Mar 2025 01:42:25 +0000 (18:42 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Mar 2025 11:18:40 +0000 (11:18 +0000)
Include cstdint for uint32_t definition
Update to tip if trunk as it helps with GCC-15 fixes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/vulkan/vulkan-samples/0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch [new file with mode: 0644]
meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch [new file with mode: 0644]
meta/recipes-graphics/vulkan/vulkan-samples_git.bb

diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch
new file mode 100644 (file)
index 0000000..f50aa80
--- /dev/null
@@ -0,0 +1,28 @@
+From e40c14a3e007fac0e4f2e4164fdf14d1712355bd Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Fri, 2 Aug 2024 22:44:21 +0100
+Subject: [PATCH] SPIRV/SpvBuilder.h: add missing <cstdint> include
+
+Without the change `glslang` build fails on upcoming `gcc-15` as:
+
+    In file included from /build/source/SPIRV/GlslangToSpv.cpp:45:
+    SPIRV/SpvBuilder.h:248:30: error: 'uint32_t' has not been declared
+      248 |     Id makeDebugLexicalBlock(uint32_t line);
+          |                              ^~~~~~~~
+
+Upstream-Status: Backport [https://github.com/KhronosGroup/glslang/commit/e40c14a3e007fac0e4f2e4164fdf14d1712355bd]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SPIRV/SpvBuilder.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/SPIRV/SpvBuilder.h
++++ b/SPIRV/SpvBuilder.h
+@@ -56,6 +56,7 @@ namespace spv {
+ }
+ #include <algorithm>
++#include <cstdint>
+ #include <map>
+ #include <memory>
+ #include <set>
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
new file mode 100644 (file)
index 0000000..8d323f2
--- /dev/null
@@ -0,0 +1,26 @@
+From 445fcfd7b9245881d769880a5942ce9faa893045 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Mar 2025 20:09:35 -0700
+Subject: [PATCH] framework: Include stdint.h
+
+Needed for uint32_t used in this header
+GCC 15 gets upset about it.
+
+Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1314]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ framework/platform/configuration.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/framework/platform/configuration.h b/framework/platform/configuration.h
+index f6a9cae..c15f76f 100644
+--- a/framework/platform/configuration.h
++++ b/framework/platform/configuration.h
+@@ -18,6 +18,7 @@
+ #pragma once
+ #include <algorithm>
++#include <cstdint>
+ #include <map>
+ #include <memory>
+ #include <string>
index 2dd4bba5230d3c8955e6e7094792c10e3d74abe2..75174f6a91f40303042c296f4ec1136fcc25c1df 100644 (file)
@@ -7,16 +7,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
 
 SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \
            file://0001-vulkan-samples-Fix-reproducibility-issue.patch \
+           file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \
+           file://0001-framework-Include-stdint.h.patch \
            "
 
 UPSTREAM_CHECK_COMMITS = "1"
-SRCREV = "4838e02a4b08236931bec0532fc26ee3871b466a"
+SRCREV = "8547ce1022a19870d3e49075b5b08ca2d11c8773"
 
 UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
 S = "${WORKDIR}/git"
 
 REQUIRED_DISTRO_FEATURES = 'vulkan'
 
+# Avoid erroring on including <ciso646> instead of <version> in c++17
+CXXFLAGS += "-Wno-error=cpp"
 inherit cmake features_check
 
 FILES:${PN} += "${datadir}"