glslang: fix compiling with gcc15
PATCH 1/1 glslang: fix compiling with gcc15
Backport a patch that fixes a compilation failure with gcc15:
| .../git/SPIRV/SpvBuilder.h:238:30: error: ‘uint32_t’ has not been declared | 238 | Id makeDebugLexicalBlock(uint32_t line); | | ^~~~~~~~ | .../git/SPIRV/SpvBuilder.h:64:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
Signed-off-by Gyorgy Sarvari <[email protected]>
--- ...uilder.h-add-missing-cstdint-include.patch | 30 +++++++++++++++++++ .../glslang/glslang_1.3.275.0.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-graphics/glslang/glslang/0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch
meta/recipes-graphics/glslang/glslang/0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch new file +30 -0
@@ -0,0 +1,30 @@ +From e40c14a3e007fac0e4f2e4164fdf14d1712355bd Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <[email protected]> +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: Gyorgy Sarvari <[email protected]> +--- + SPIRV/SpvBuilder.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h +index b1ca6ce1..00b2e53a 100644 +--- a/SPIRV/SpvBuilder.h ++++ b/SPIRV/SpvBuilder.h +@@ -56,6 +56,7 @@ namespace spv { + } + + #include <algorithm> ++#include <cstdint> + #include <map> + #include <memory> + #include <set>
meta/recipes-graphics/glslang/glslang_1.3.275.0.bb +1 -0
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2a2b5acd7bc4844964cfda45fe807dc3" SRCREV = "a91631b260cba3f22858d6c6827511e636c2458a" SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https;branch=main \ file://0001-generate-glslang-pkg-config.patch \ + file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch \ " PE = "1" # These recipes need to be updated in lockstep with each other: