[packages/SPIRV-LLVM-Translator] up to 16.0.0

atler atler at pld-linux.org
Wed Mar 29 19:06:02 CEST 2023


commit 4d5d0efa88b42f0ff66521e7683fd9639ddf7288
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Mar 29 19:05:15 2023 +0200

    up to 16.0.0
    
    - linking patch from: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1889

 SPIRV-LLVM-Translator.spec | 18 +++++++-----
 link.patch                 | 73 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 8 deletions(-)
---
diff --git a/SPIRV-LLVM-Translator.spec b/SPIRV-LLVM-Translator.spec
index 12bec73..566b70b 100644
--- a/SPIRV-LLVM-Translator.spec
+++ b/SPIRV-LLVM-Translator.spec
@@ -1,23 +1,24 @@
 
-%define llvm_version 15.0.0
+%define llvm_version 16.0.0
 
 Summary:	LLVM/SPIR-V Bi-Directional Translator
 Summary(pl.UTF-8):	Dwustronny translator LLVM/SPIR-V
 Name:		SPIRV-LLVM-Translator
-Version:	15.0.0
+Version:	16.0.0
 Release:	1
 License:	University of Illinois/NCSA Open Source License
 Group:		Libraries
 #Source0Download: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases
 Source0:	https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	19e3ee2fb84754602ec754c594b20a1d
+# Source0-md5:	e337592c9377c60d0bc4c6e6e99d5914
+Patch0:		link.patch
 URL:		https://github.com/KhronosGroup/SPIRV-LLVM-Translator/
 BuildRequires:	cmake >= 3.13.4
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	llvm-devel >= %{llvm_version}
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.605
-BuildRequires:	spirv-headers >= 1.5.5-4
+BuildRequires:	spirv-headers >= 1.5.5-5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,6 +45,7 @@ Pliki nagłówkowe biblioteki LLVMSPIRVLib.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 install -d build
@@ -59,8 +61,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.15 $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.%{version}
-ln -s libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.15
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.16 $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.%{version}
+ln -s libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so.16
 ln -sf libLLVMSPIRVLib.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libLLVMSPIRVLib.so
 
 %clean
@@ -73,8 +75,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.md LICENSE.TXT
 %attr(755,root,root) %{_bindir}/llvm-spirv
-%attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.15.*.*
-%ghost %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.15
+%attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.16.*.*
+%ghost %attr(755,root,root) %{_libdir}/libLLVMSPIRVLib.so.16
 
 %files devel
 %defattr(644,root,root,755)
diff --git a/link.patch b/link.patch
new file mode 100644
index 0000000..cd6f21e
--- /dev/null
+++ b/link.patch
@@ -0,0 +1,73 @@
+From 98fadafeae0204defedd89f015f7fb88f2888b2f Mon Sep 17 00:00:00 2001
+From: Tulio Magno Quites Machado Filho <tuliom at redhat.com>
+Date: Fri, 17 Mar 2023 14:27:10 -0300
+Subject: [PATCH] Fix standalone builds with LLVM_LINK_LLVM_DYLIB=ON
+
+Move the LLVM components to LINK_COMPONENTS because the DEPENDS list has
+the same semantics as add_dependencies(). In this
+case it doesn't include the LLVM components when calling the linker.
+---
+ lib/SPIRV/CMakeLists.txt | 47 ++++++++++++----------------------------
+ 1 file changed, 14 insertions(+), 33 deletions(-)
+
+diff --git a/lib/SPIRV/CMakeLists.txt b/lib/SPIRV/CMakeLists.txt
+index bbef00528..2810c6b2c 100644
+--- a/lib/SPIRV/CMakeLists.txt
++++ b/lib/SPIRV/CMakeLists.txt
+@@ -38,42 +38,23 @@ set(SRC_LIST
+   libSPIRV/SPIRVType.cpp
+   libSPIRV/SPIRVValue.cpp
+ )
+-if(LLVM_LINK_LLVM_DYLIB)
+-  add_llvm_library(LLVMSPIRVLib STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
+-    ${SRC_LIST}
+-    DEPENDS
+-      intrinsics_gen
+-      LLVMAnalysis
+-      LLVMBitWriter
+-      LLVMCodeGen
+-      LLVMCore
+-      LLVMDemangle
+-      LLVMIRReader
+-      LLVMLinker
+-      LLVMPasses
+-      LLVMSupport
+-      LLVMTargetParser
+-      LLVMTransformUtils
+-  )
+-else()
+-  add_llvm_library(LLVMSPIRVLib
+-    ${SRC_LIST}
+-    LINK_COMPONENTS
+-      Analysis
+-      BitWriter
+-      CodeGen
+-      Core
+-      Demangle
+-      IRReader
+-      Linker
+-      Passes
+-      Support
+-      TargetParser
+-      TransformUtils
++add_llvm_library(LLVMSPIRVLib STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
++  ${SRC_LIST}
++  LINK_COMPONENTS
++    Analysis
++    BitWriter
++    CodeGen
++    Core
++    Demangle
++    IRReader
++    Linker
++    Passes
++    Support
++    TargetParser
++    TransformUtils
+   DEPENDS
+     intrinsics_gen
+   )
+-endif()
+ 
+ target_include_directories(LLVMSPIRVLib
+   PRIVATE
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/SPIRV-LLVM-Translator.git/commitdiff/4d5d0efa88b42f0ff66521e7683fd9639ddf7288



More information about the pld-cvs-commit mailing list