1
0
forked from pool/spirv-tools

- Add gcc11.diff [boo#1181882]

OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=59
This commit is contained in:
Jan Engelhardt 2021-02-10 10:45:19 +00:00 committed by Git OBS Bridge
parent 3e125e5571
commit 40a5b2e8c2
3 changed files with 46 additions and 1 deletions

37
gcc11.diff Normal file
View File

@ -0,0 +1,37 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2021-02-10 11:35:55.577457480 +0100
gcc-11 is just too picky.
Unrelatedly, -Werror is stupid for distributions.
---
CMakeLists.txt | 2 +-
source/diagnostic.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: SPIRV-Tools-2020.6/CMakeLists.txt
===================================================================
--- SPIRV-Tools-2020.6.orig/CMakeLists.txt
+++ SPIRV-Tools-2020.6/CMakeLists.txt
@@ -106,7 +106,7 @@ if(${COMPILER_IS_LIKE_GNU})
endif()
if(${SPIRV_WERROR})
- set(SPIRV_WARNINGS ${SPIRV_WARNINGS} -Werror)
+ set(SPIRV_WARNINGS ${SPIRV_WARNINGS})
endif()
elseif(MSVC)
set(SPIRV_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /wd4800)
Index: SPIRV-Tools-2020.6/source/diagnostic.cpp
===================================================================
--- SPIRV-Tools-2020.6.orig/source/diagnostic.cpp
+++ SPIRV-Tools-2020.6/source/diagnostic.cpp
@@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const
diagnostic->position = *position;
diagnostic->isTextSource = false;
memset(diagnostic->error, 0, length);
- strncpy(diagnostic->error, message, length);
+ strcpy(diagnostic->error, message);
return diagnostic;
}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 10 10:37:23 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Add gcc11.diff [boo#1181882]
-------------------------------------------------------------------
Tue Dec 8 12:30:46 UTC 2020 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package spirv-tools
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -31,6 +31,7 @@ Source: https://github.com/KhronosGroup/SPIRV-Tools/archive/v%version.ta
Source9: baselibs.conf
Patch1: ver.diff
Patch2: gcc48.diff
Patch3: gcc11.diff
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
BuildRequires: gcc-c++
@ -68,6 +69,8 @@ integration into other code bases directly.
%autosetup -p1 -n SPIRV-Tools-%version
%build
# silence false positive
export CFLAGS="%optflags -Wno-error=stringop-overflow" CXXFLAGS="$CFLAGS"
%cmake -DSPIRV-Headers_SOURCE_DIR="%_prefix" \
-DSPIRV_TOOLS_BUILD_STATIC:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON
%cmake_build