From 764f733ea740c336697b949a608b81efab3ad6ac380add984bdb52525953c735 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 3 May 2016 06:58:18 +0000 Subject: [PATCH 1/3] - Update to 2.3.g356 * Fix compile error involving std::isinf OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/glslang?expand=0&rev=10 --- glslang-2.3.g244.tar.xz | 3 --- glslang-2.3.g356.tar.xz | 3 +++ glslang.changes | 6 ++++++ glslang.spec | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 glslang-2.3.g244.tar.xz create mode 100644 glslang-2.3.g356.tar.xz diff --git a/glslang-2.3.g244.tar.xz b/glslang-2.3.g244.tar.xz deleted file mode 100644 index 2041236..0000000 --- a/glslang-2.3.g244.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb0c46a44eb12e909f608446b167c3c0663e363ff3488b99becc57671297d45d -size 836320 diff --git a/glslang-2.3.g356.tar.xz b/glslang-2.3.g356.tar.xz new file mode 100644 index 0000000..38a8c91 --- /dev/null +++ b/glslang-2.3.g356.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e64e2c96ec96707fc4aeea47f3f2ccc27b949b3f977b5ee5cd344565989f4ce +size 573912 diff --git a/glslang.changes b/glslang.changes index 364dc09..5a52bd3 100644 --- a/glslang.changes +++ b/glslang.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 26 18:35:34 UTC 2016 - jengelh@inai.de + +- Update to 2.3.g356 +* Fix compile error involving std::isinf + ------------------------------------------------------------------- Wed Feb 17 11:06:24 UTC 2016 - jengelh@inai.de diff --git a/glslang.spec b/glslang.spec index 06a188d..8551509 100644 --- a/glslang.spec +++ b/glslang.spec @@ -16,8 +16,10 @@ # +%define version_unconverted 2.3.g356 + Name: glslang -Version: 2.3.g244 +Version: 2.3.g356 Release: 0 Summary: OpenGL and OpenGL ES shader front end and validator License: BSD-3-Clause From 4194d9088b74092487f907267527a87405c1412cbd186bf5b86f3d51d59241b4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 3 May 2016 07:58:18 +0000 Subject: [PATCH 2/3] - Drop badcode.diff (merged upstream) OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/glslang?expand=0&rev=11 --- badcode.diff | 108 ------------------------------------------------ glslang.changes | 1 + glslang.spec | 2 - 3 files changed, 1 insertion(+), 110 deletions(-) delete mode 100644 badcode.diff diff --git a/badcode.diff b/badcode.diff deleted file mode 100644 index e57a0bb..0000000 --- a/badcode.diff +++ /dev/null @@ -1,108 +0,0 @@ - -wtf, code with undefined behavior. - -SPIRV/SpvBuilder.cpp:701:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - unsigned value = *(unsigned int*)&f; -SPIRV/SpvBuilder.cpp:724:55: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - unsigned long long value = *(unsigned long long*)&d; -glslang/MachineIndependent/Constant.cpp:51:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - int bitPatternL = *(int*)&x; -glslang/MachineIndependent/Constant.cpp:60:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - int bitPatternL = *(int*)&x; - -And pointless compile timestamps. -glslang-devel.x86_64: W: file-contains-date-and-time /usr/bin/spirv-remap -Your file uses __DATE and __TIME__ this causes the package to rebuild when ---- - SPIRV/SpvBuilder.cpp | 9 +++++++-- - StandAlone/spirv-remap.cpp | 2 +- - glslang/MachineIndependent/Constant.cpp | 15 +++++++++++---- - 3 files changed, 19 insertions(+), 7 deletions(-) - -Index: glslang-2.3.g244/SPIRV/SpvBuilder.cpp -=================================================================== ---- glslang-2.3.g244.orig/SPIRV/SpvBuilder.cpp -+++ glslang-2.3.g244/SPIRV/SpvBuilder.cpp -@@ -53,6 +53,7 @@ - #ifndef _WIN32 - #include - #endif -+#include - - namespace spv { - -@@ -698,7 +699,9 @@ Id Builder::makeFloatConstant(float f, b - { - Op opcode = specConstant ? OpSpecConstant : OpConstant; - Id typeId = makeFloatType(32); -- unsigned value = *(unsigned int*)&f; -+ unsigned value; -+ static_assert(sizeof(value) <= sizeof(float), "horrible code"); -+ memcpy(&value, &f, sizeof(value)); - - // See if we already made it. Applies only to regular constants, because specialization constants - // must remain distinct for the purpose of applying a SpecId decoration. -@@ -721,7 +724,9 @@ Id Builder::makeDoubleConstant(double d, - { - Op opcode = specConstant ? OpSpecConstant : OpConstant; - Id typeId = makeFloatType(64); -- unsigned long long value = *(unsigned long long*)&d; -+ unsigned long long value; -+ static_assert(sizeof(value) <= sizeof(d), "horrible code"); -+ memcpy(&value, &d, sizeof(value)); - unsigned op1 = value & 0xFFFFFFFF; - unsigned op2 = value >> 32; - -Index: glslang-2.3.g244/StandAlone/spirv-remap.cpp -=================================================================== ---- glslang-2.3.g244.orig/StandAlone/spirv-remap.cpp -+++ glslang-2.3.g244/StandAlone/spirv-remap.cpp -@@ -225,7 +225,7 @@ namespace { - } - } - else if (arg == "--version" || arg == "-V") { -- std::cout << basename(argv[0]) << " version 0.97 " << __DATE__ << " " << __TIME__ << std::endl; -+ std::cout << basename(argv[0]) << " version 0.97 " << "__DATE__" << " " << "__TIME__" << std::endl; - exit(0); - } else if (arg == "--input" || arg == "-i") { - // Collect input files -Index: glslang-2.3.g244/glslang/MachineIndependent/Constant.cpp -=================================================================== ---- glslang-2.3.g244.orig/glslang/MachineIndependent/Constant.cpp -+++ glslang-2.3.g244/glslang/MachineIndependent/Constant.cpp -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - namespace { - -@@ -48,8 +49,11 @@ using namespace glslang; - bool isNan(double x) - { - // tough to find a platform independent library function, do it directly -- int bitPatternL = *(int*)&x; -- int bitPatternH = *((int*)&x + 1); -+ int bitPatternL; -+ static_assert(sizeof(int[2]) <= sizeof(x), "horrible code"); -+ memcpy(&bitPatternL, &x, sizeof(bitPatternL)); -+ int bitPatternH; -+ memcpy(&bitPatternH, reinterpret_cast(&x) + 1, sizeof(bitPatternH)); - return (bitPatternH & 0x7ff80000) == 0x7ff80000 && - ((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0); - } -@@ -57,8 +61,11 @@ bool isNan(double x) - bool isInf(double x) - { - // tough to find a platform independent library function, do it directly -- int bitPatternL = *(int*)&x; -- int bitPatternH = *((int*)&x + 1); -+ int bitPatternL; -+ static_assert(sizeof(int[2]) <= sizeof(x), "horrible code"); -+ memcpy(&bitPatternL, &x, sizeof(bitPatternL)); -+ int bitPatternH; -+ memcpy(&bitPatternH, reinterpret_cast(&x) + 1, sizeof(bitPatternH)); - return (bitPatternH & 0x7ff00000) == 0x7ff00000 && - (bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0; - } diff --git a/glslang.changes b/glslang.changes index 5a52bd3..9ce6ceb 100644 --- a/glslang.changes +++ b/glslang.changes @@ -3,6 +3,7 @@ Tue Apr 26 18:35:34 UTC 2016 - jengelh@inai.de - Update to 2.3.g356 * Fix compile error involving std::isinf +- Drop badcode.diff (merged upstream) ------------------------------------------------------------------- Wed Feb 17 11:06:24 UTC 2016 - jengelh@inai.de diff --git a/glslang.spec b/glslang.spec index 8551509..9a9881c 100644 --- a/glslang.spec +++ b/glslang.spec @@ -27,7 +27,6 @@ Group: Development/Libraries/C and C++ Url: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/ Source: %name-%version.tar.xz -Patch1: badcode.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: cmake >= 2.8 @@ -57,7 +56,6 @@ compressor's dictionary can find better cross module commonality. %prep %setup -q -%patch -P 1 -p1 %build %cmake From eef7130ba498682d11899ffccd4ed932736fa6c8eed76ec1614d2d894d1d4295 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 6 May 2016 11:36:57 +0000 Subject: [PATCH 3/3] - Update to 2.3.g401 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/glslang?expand=0&rev=12 --- glslang-2.3.g356.tar.xz | 3 --- glslang-2.3.g401.tar.xz | 3 +++ glslang.changes | 2 +- glslang.spec | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 glslang-2.3.g356.tar.xz create mode 100644 glslang-2.3.g401.tar.xz diff --git a/glslang-2.3.g356.tar.xz b/glslang-2.3.g356.tar.xz deleted file mode 100644 index 38a8c91..0000000 --- a/glslang-2.3.g356.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e64e2c96ec96707fc4aeea47f3f2ccc27b949b3f977b5ee5cd344565989f4ce -size 573912 diff --git a/glslang-2.3.g401.tar.xz b/glslang-2.3.g401.tar.xz new file mode 100644 index 0000000..e72169e --- /dev/null +++ b/glslang-2.3.g401.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd311b86ecf0655e06e9946cd5295e9465910da9695c583ddcc9dd153ee5b967 +size 586956 diff --git a/glslang.changes b/glslang.changes index 9ce6ceb..bf2251d 100644 --- a/glslang.changes +++ b/glslang.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Tue Apr 26 18:35:34 UTC 2016 - jengelh@inai.de -- Update to 2.3.g356 +- Update to 2.3.g401 * Fix compile error involving std::isinf - Drop badcode.diff (merged upstream) diff --git a/glslang.spec b/glslang.spec index 9a9881c..dd13044 100644 --- a/glslang.spec +++ b/glslang.spec @@ -16,10 +16,10 @@ # -%define version_unconverted 2.3.g356 +%define version_unconverted 2.3.g401 Name: glslang -Version: 2.3.g356 +Version: 2.3.g401 Release: 0 Summary: OpenGL and OpenGL ES shader front end and validator License: BSD-3-Clause @@ -74,12 +74,14 @@ cp -a SPIRV glslang "$b/%_includedir/" find "$b/%_includedir/" -type f ! -iname "*.h" -a ! -iname "*.hpp" -print -delete ln -s SPIRV/spirv.hpp "$b/%_includedir/" find "$b/%_includedir/" -type f -exec chmod a-x "{}" "+" +cp build/StandAlone/libglslang-default-resource-limits.so "$b/%_libdir/" %files devel %defattr(-,root,root) %_bindir/gls* %_bindir/spirv* %_libdir/*.a +%_libdir/*resource*.so %_includedir/* %changelog