From af152ac901d1648822f3639e22148ac8643d79419351626bb5bb3e137e67a6a4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 2 Feb 2017 11:04:34 +0000 Subject: [PATCH 1/2] spirv-tools-2016.7 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=8 --- _service | 4 ++-- spirv-tools-1.1.g41.tar.xz | 3 --- spirv-tools-2016.7~g24.tar.xz | 3 +++ spirv-tools.changes | 14 ++++++++++++++ spirv-tools.spec | 20 +++++++++++++------ ver.diff | 36 +++++++++++++++++++++++------------ 6 files changed, 57 insertions(+), 23 deletions(-) delete mode 100644 spirv-tools-1.1.g41.tar.xz create mode 100644 spirv-tools-2016.7~g24.tar.xz diff --git a/_service b/_service index 2b84b4d..a9cd35e 100644 --- a/_service +++ b/_service @@ -3,8 +3,8 @@ git https://github.com/KhronosGroup/SPIRV-Tools spirv-tools - spirv-1.1-rev1 - 1.1.g@TAG_OFFSET@ + 68c5f0436f1d4f1f137e608780190865d0b193ca + 2016.7~g@TAG_OFFSET@ *.tar diff --git a/spirv-tools-1.1.g41.tar.xz b/spirv-tools-1.1.g41.tar.xz deleted file mode 100644 index 011719c..0000000 --- a/spirv-tools-1.1.g41.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea51c69e9d730d4a6df8e472270bc14d0a717250524550df9cb0484f1d7c1de3 -size 159116 diff --git a/spirv-tools-2016.7~g24.tar.xz b/spirv-tools-2016.7~g24.tar.xz new file mode 100644 index 0000000..eb8fbc0 --- /dev/null +++ b/spirv-tools-2016.7~g24.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dba9a634b911fd2d1773f7cd5e02311bcb20725f7302a953e108771e009cf12 +size 288652 diff --git a/spirv-tools.changes b/spirv-tools.changes index e9aa863..9a13486 100644 --- a/spirv-tools.changes +++ b/spirv-tools.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Feb 2 10:35:57 UTC 2017 - jengelh@inai.de + +- Update to new snapshot 2016.7~g24 + * Add classes for representing SPIR-V language constructs in memory. + * Add an option to spvBinaryToText() to ignore header output. + * Add IrBuilder for constructing SPIR-V in-memory representation. + * Add Pass, PassManager, and StripDebugInfoPass. + * Add the spirv-opt command line tool. + * Fixes segfault for loops without back-edges + * Allow missing memory model instructions in modules. + * Add spirv-lesspipe.sh + * Add spirv-dis/spirv-as support for emacs when loading .spv binaries + ------------------------------------------------------------------- Mon Jun 13 09:46:37 UTC 2016 - jengelh@inai.de diff --git a/spirv-tools.spec b/spirv-tools.spec index f4b5ca0..ee523ee 100644 --- a/spirv-tools.spec +++ b/spirv-tools.spec @@ -1,7 +1,7 @@ # # spec file for package spirv-tools # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +16,14 @@ # -%define version_unconverted 1.1.g41 -%define lname libSPIRV-Tools-1_1 +%define version_unconverted 2016.7~g24 +%define lname libSPIRV-Tools-suse2 Name: spirv-tools -Version: 1.1.g41 +Version: 2016.7~g24 Release: 0 Summary: API and commands for processing SPIR-V modules -License: MIT +License: Apache-2.0 Group: Development/Libraries/C and C++ Url: https://github.com/KhronosGroup/SPIRV-Tools @@ -33,6 +33,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: cmake >= 2.8.12 BuildRequires: gcc-c++ +BuildRequires: python +BuildRequires: python-xml BuildRequires: python3 BuildRequires: spirv-headers @@ -82,13 +84,19 @@ fi %postun -n %lname -p /sbin/ldconfig %files +%defattr(-,root,root) %_bindir/spirv-* %doc LICENSE %files -n %lname -%_libdir/libSPIRV-Tools-1.1.so +%defattr(-,root,root) +%_libdir/libSPIRV-Tools.so.* +%_libdir/libSPIRV-Tools-opt.so.* %files devel +%defattr(-,root,root) +%_libdir/libSPIRV-Tools.so +%_libdir/libSPIRV-Tools-opt.so %_includedir/spirv-tools/ %changelog diff --git a/ver.diff b/ver.diff index 11e8241..ca63756 100644 --- a/ver.diff +++ b/ver.diff @@ -4,19 +4,31 @@ Date: 2016-06-13 11:46:16.846841814 +0200 Unversioned libraries suck! --- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + source/CMakeLists.txt | 1 + + source/opt/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) -Index: SPIRV-Tools/CMakeLists.txt +Index: spirv-tools-2016.7~g24/source/CMakeLists.txt =================================================================== ---- SPIRV-Tools.orig/CMakeLists.txt -+++ SPIRV-Tools/CMakeLists.txt -@@ -27,7 +27,7 @@ - cmake_minimum_required(VERSION 2.8.12) - project(spirv-tools) - enable_testing() --set(SPIRV_TOOLS "SPIRV-Tools") -+set(SPIRV_TOOLS "SPIRV-Tools-1.1") +--- spirv-tools-2016.7~g24.orig/source/CMakeLists.txt ++++ spirv-tools-2016.7~g24/source/CMakeLists.txt +@@ -219,6 +219,7 @@ set_source_files_properties( + PROPERTIES OBJECT_DEPENDS "${SPIRV_TOOLS_BUILD_VERSION_INC}") - set(CMAKE_POSITION_INDEPENDENT_CODE ON) + add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) ++set_target_properties(${SPIRV_TOOLS} PROPERTIES SOVERSION suse2) + spvtools_default_compile_options(${SPIRV_TOOLS}) + target_include_directories(${SPIRV_TOOLS} + PUBLIC ${spirv-tools_SOURCE_DIR}/include +Index: spirv-tools-2016.7~g24/source/opt/CMakeLists.txt +=================================================================== +--- spirv-tools-2016.7~g24.orig/source/opt/CMakeLists.txt ++++ spirv-tools-2016.7~g24/source/opt/CMakeLists.txt +@@ -53,6 +53,7 @@ add_library(SPIRV-Tools-opt + unify_const_pass.cpp + ) ++set_target_properties(SPIRV-Tools-opt PROPERTIES SOVERSION suse2) + spvtools_default_compile_options(SPIRV-Tools-opt) + target_include_directories(SPIRV-Tools-opt + PUBLIC ${spirv-tools_SOURCE_DIR}/include From 946010b45bebe352541e854f6ea36e6d051315aae149e4612826f5befe9f9eb0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 2 Feb 2017 19:03:27 +0000 Subject: [PATCH 2/2] unbreak g++ 4.8 i586 build OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=9 --- gcc48.diff | 30 ++++++++++++++++++++++++++++++ spirv-tools.changes | 1 + spirv-tools.spec | 3 ++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc48.diff diff --git a/gcc48.diff b/gcc48.diff new file mode 100644 index 0000000..120778c --- /dev/null +++ b/gcc48.diff @@ -0,0 +1,30 @@ +From: Jan Engelhardt +Date: 2017-02-02 19:42:44.679588946 +0100 + +build: workaround gcc 4.8 bug + +tools/io.h:41:38: +error: ignoring return value of 'long int ftell(FILE*)', +declared with attribute warn_unused_result [-Werror=unused-result,-Werror] + if (sizeof(T) != 1 && (ftell(fp) % sizeof(T))) { + +Workaround gcc 4.8's wrongful idea that ftell's return value +were ignored. +--- + tools/io.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: spirv-tools-2016.7~g24/tools/io.h +=================================================================== +--- spirv-tools-2016.7~g24.orig/tools/io.h ++++ spirv-tools-2016.7~g24/tools/io.h +@@ -38,7 +38,8 @@ bool ReadFile(const char* filename, cons + return false; + } + } else { +- if (sizeof(T) != 1 && (ftell(fp) % sizeof(T))) { ++ long ftx = ftell(fp); ++ if (sizeof(T) != 1 && ftx % sizeof(T) != 0) { + fprintf(stderr, "error: corrupted word found in file '%s'\n", filename); + return false; + } diff --git a/spirv-tools.changes b/spirv-tools.changes index 9a13486..3edce6d 100644 --- a/spirv-tools.changes +++ b/spirv-tools.changes @@ -11,6 +11,7 @@ Thu Feb 2 10:35:57 UTC 2017 - jengelh@inai.de * Allow missing memory model instructions in modules. * Add spirv-lesspipe.sh * Add spirv-dis/spirv-as support for emacs when loading .spv binaries +- Add gcc48.diff ------------------------------------------------------------------- Mon Jun 13 09:46:37 UTC 2016 - jengelh@inai.de diff --git a/spirv-tools.spec b/spirv-tools.spec index ee523ee..7bad373 100644 --- a/spirv-tools.spec +++ b/spirv-tools.spec @@ -29,6 +29,7 @@ Url: https://github.com/KhronosGroup/SPIRV-Tools Source: %name-%version.tar.xz Patch1: ver.diff +Patch2: gcc48.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: cmake >= 2.8.12 @@ -65,7 +66,7 @@ integration into other code bases directly. %prep %setup -q -%patch -P 1 -p1 +%patch -P 1 -P 2 -p1 %build %cmake -D"SPIRV-Headers_SOURCE_DIR=%_prefix"