# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/glslang/hotfix-stub.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Add stub for libSPIRV.so for backwards compability - to be removed when dependend projects are updated. Accordingly to https://github.com/KhronosGroup/glslang/pull/3890/files --- glslang-15.2.0/glslang/stub.cpp.vanilla 2025-04-04 22:38:46.348021239 +0200 +++ glslang-15.2.0/glslang/stub.cpp 2025-04-04 22:40:57.235239210 +0200 @@ -35,3 +35,11 @@ // This empty source file exists to support building stubbed versions of // deprecated libraries which have been integrated into the main glslang // library. It should be deleted once the stub libraries are fully removed. + +#ifndef STUB_EXPORT +#define STUB_EXPORT +#endif + +// Force stub library to export function to preserve backcompat. +// https://github.com/KhronosGroup/glslang/issues/3882 +STUB_EXPORT int stub_library_function() { return 0; } --- glslang-15.2.0/SPIRV/CMakeLists.txt.vanilla 2025-04-04 22:42:36.796099819 +0200 +++ glslang-15.2.0/SPIRV/CMakeLists.txt 2025-04-04 22:43:32.859804492 +0200 @@ -91,6 +91,7 @@ target_include_directories(SPIRV PUBLIC $ $) +glslang_only_export_explicit_symbols(SPIRV) if (ENABLE_SPVREMAPPER) add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) @@ -128,9 +129,7 @@ install(TARGETS SPVRemapper EXPORT glslang-targets) endif() - if (NOT BUILD_SHARED_LIBS) - install(TARGETS SPIRV EXPORT glslang-targets) - endif() + install(TARGETS SPIRV EXPORT glslang-targets) install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) endif()