fix gcc12 build
This commit is contained in:
parent
e1ae3cc815
commit
305b6e1a07
12
fix-gcc12-build.patch
Normal file
12
fix-gcc12-build.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp.dma ./SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp
|
||||
--- SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp.dma 2022-02-16 08:20:38.927239298 +1000
|
||||
+++ SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp 2022-02-16 08:20:42.262301854 +1000
|
||||
@@ -397,6 +397,8 @@ std::string spvLogStringForEnv(spv_targe
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
+// workaround gcc12/stdlibc++ -Wrestrict bug.
|
||||
+#pragma GCC diagnostic ignore "-Wrestrict"
|
||||
std::string spvTargetEnvList(const int pad, const int wrap) {
|
||||
std::string ret;
|
||||
size_t max_line_len = wrap - pad; // The first line isn't padded
|
@ -14,6 +14,8 @@ License: ASL 2.0
|
||||
URL: https://github.com/KhronosGroup/SPIRV-Tools
|
||||
Source0: %url/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
|
||||
|
||||
Patch0: fix-gcc12-build.patch
|
||||
|
||||
BuildRequires: cmake3
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ninja-build
|
||||
|
Loading…
Reference in New Issue
Block a user