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>’

(From OE-Core rev: cd0039c22d7aa3d6983ac6fe917b648930355849)

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Gyorgy Sarvari 2025-11-20 14:14:35 +01:00 committed by Steve Sakoman
parent ee521bb17c
commit 4af1396e46
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,30 @@
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: Gyorgy Sarvari <skandigraun@gmail.com>
---
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>

View File

@ -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: