From c68cc9095b8f0b18574961fbaf04ceb8a5c0980d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 8 Sep 2021 20:01:13 +0200 Subject: spirv-tools: update 2021.2 -> 2021.3 Drop 0001-fix-strncpy-bound-error.patch; issue fixed upstream. Bump spirv-headers revision to avoid outdated headers causing build errors. (From OE-Core rev: b1a6ac721fba17afa09f4da6c0c01730228b129c) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../spir/files/0001-fix-strncpy-bound-error.patch | 30 ---------------- meta/recipes-graphics/spir/spirv-headers_1.5.4.bb | 2 +- meta/recipes-graphics/spir/spirv-tools_2021.2.bb | 42 ---------------------- meta/recipes-graphics/spir/spirv-tools_2021.3.bb | 40 +++++++++++++++++++++ 4 files changed, 41 insertions(+), 73 deletions(-) delete mode 100644 meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch delete mode 100644 meta/recipes-graphics/spir/spirv-tools_2021.2.bb create mode 100644 meta/recipes-graphics/spir/spirv-tools_2021.3.bb diff --git a/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch b/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch deleted file mode 100644 index bc59faa37b..0000000000 --- a/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1ba007583b83468494c4146bcb7267d863de6a7b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 26 Feb 2021 23:54:10 -0800 -Subject: [PATCH] fix strncpy bound error - -This patch fixes the following error while using gcc 11 -error: 'char* __builtin_strncpy(char*, const char*, long unsigned int)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] - -Upstream-Status: Submitted [https://github.com/KhronosGroup/SPIRV-Tools/pull/4151] -Signed-off-by: Khem Raj ---- - source/diagnostic.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp -index edc27c8fd..77c29d70c 100644 ---- a/source/diagnostic.cpp -+++ b/source/diagnostic.cpp -@@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const spv_position position, - diagnostic->position = *position; - diagnostic->isTextSource = false; - memset(diagnostic->error, 0, length); -- strncpy(diagnostic->error, message, length); -+ memcpy(diagnostic->error, message, length); - return diagnostic; - } - --- -2.30.1 - diff --git a/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb b/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb index 7a43af5e6b..8f8206d15c 100644 --- a/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb +++ b/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb @@ -7,7 +7,7 @@ HOMEPAGE = "https://www.khronos.org/registry/spir-v" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d" -SRCREV = "bcf55210f13a4fa3c3d0963b509ff1070e434c79" +SRCREV = "6cae8216a6ea19ff3f237af01e54378c1ff81fcd" SRC_URI = "git://github.com/KhronosGroup/SPIRV-Headers;protocol=https" UPSTREAM_CHECK_GITTAGREGEX = "^(?P\d+(\.\d+)+)$" S = "${WORKDIR}/git" diff --git a/meta/recipes-graphics/spir/spirv-tools_2021.2.bb b/meta/recipes-graphics/spir/spirv-tools_2021.2.bb deleted file mode 100644 index f55bd5194a..0000000000 --- a/meta/recipes-graphics/spir/spirv-tools_2021.2.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "The SPIR-V Tools project provides an API and commands for \ -processing SPIR-V modules" -DESCRIPTION = "The project includes an assembler, binary module parser, \ -disassembler, validator, and optimizer for SPIR-V." -HOMEPAGE = "https://github.com/KhronosGroup/SPIRV-Tools" -SECTION = "graphics" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "e198c6a785d388db68eb9166b43ac5e5208fd5cc" -SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git \ - file://0001-fix-strncpy-bound-error.patch \ - " -UPSTREAM_CHECK_GITTAGREGEX = "^v(?P\d+(\.\d+)+)$" -S = "${WORKDIR}/git" - -inherit cmake python3native - -DEPENDS = "spirv-headers" - -EXTRA_OECMAKE += "\ - -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ - -DSPIRV_TOOLS_BUILD_STATIC=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DSPIRV_SKIP_TESTS=ON \ -" - -do_install:append:class-target() { - # reproducibility: remove build host path - sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \ - -e 's:${STAGING_DIR_HOST}::g' -} - -# all the libraries are unversioned, so don't pack it on PN-dev -SOLIBS = ".so" -FILES_SOLIBSDEV = "" - -PACKAGES =+ "${PN}-lesspipe" -FILES:${PN}-lesspipe = "${base_bindir}/spirv-lesspipe.sh" -RDEPENDS:${PN}-lesspipe += "${PN} bash" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-graphics/spir/spirv-tools_2021.3.bb b/meta/recipes-graphics/spir/spirv-tools_2021.3.bb new file mode 100644 index 0000000000..62330f285d --- /dev/null +++ b/meta/recipes-graphics/spir/spirv-tools_2021.3.bb @@ -0,0 +1,40 @@ +SUMMARY = "The SPIR-V Tools project provides an API and commands for \ +processing SPIR-V modules" +DESCRIPTION = "The project includes an assembler, binary module parser, \ +disassembler, validator, and optimizer for SPIR-V." +HOMEPAGE = "https://github.com/KhronosGroup/SPIRV-Tools" +SECTION = "graphics" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "1fbed83c8aab8517d821fcb4164c08567951938f" +SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git" +UPSTREAM_CHECK_GITTAGREGEX = "^v(?P\d+(\.\d+)+)$" +S = "${WORKDIR}/git" + +inherit cmake python3native + +DEPENDS = "spirv-headers" + +EXTRA_OECMAKE += "\ + -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ + -DSPIRV_TOOLS_BUILD_STATIC=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DSPIRV_SKIP_TESTS=ON \ +" + +do_install:append:class-target() { + # reproducibility: remove build host path + sed -i ${D}${libdir}/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake \ + -e 's:${STAGING_DIR_HOST}::g' +} + +# all the libraries are unversioned, so don't pack it on PN-dev +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +PACKAGES =+ "${PN}-lesspipe" +FILES:${PN}-lesspipe = "${base_bindir}/spirv-lesspipe.sh" +RDEPENDS:${PN}-lesspipe += "${PN} bash" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf