diff --git a/link_against_libclang-cpp_so.patch b/link_against_libclang-cpp_so.patch index 412ed55..4169516 100644 --- a/link_against_libclang-cpp_so.patch +++ b/link_against_libclang-cpp_so.patch @@ -1,39 +1,12 @@ -From 079c8e9862550ef7d2c6b1f134efdfdebc67c45e Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Thu, 26 Sep 2019 15:33:58 -0700 -Subject: [PATCH] Link against libclang-cpp.so when linking with shared - libraries - -libclang-cpp.so is a new shared object in clang-9.0.0 which -contains all the clang components in one library. Doing this will -save us from having to update cmake when there is a new clang component -and may provide better performance in LTO builds of clang. ---- - cmake/LLVM.cmake | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake -index a02e2ba74..591b12424 100644 ---- a/cmake/LLVM.cmake -+++ b/cmake/LLVM.cmake -@@ -219,10 +219,16 @@ string(REPLACE " -pedantic" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}") +diff -u -r pocl-1.5.orig/cmake/LLVM.cmake pocl-1.5/cmake/LLVM.cmake +--- pocl-1.5.orig/cmake/LLVM.cmake 2020-06-25 12:22:37.500539000 +0200 ++++ pocl-1.5/cmake/LLVM.cmake 2020-06-25 12:23:23.091551000 +0200 +@@ -219,7 +219,7 @@ string(REGEX REPLACE "-W[^ ]*" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}") # Llvm-config does not include clang libs --set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization -- clangParse clangSema clangRewrite clangRewriteFrontend -- clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers -- clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic) -+if(8 LESS LLVM_MAJOR AND LLVM_LIB_IS_SHARED MATCHES "shared") -+ # Link against a single shared library instead of multiple component shared -+ # libraries. -+ set(CLANG_LIBNAMES clang-cpp) -+else() -+ set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization -+ clangParse clangSema clangRewrite clangRewriteFrontend -+ clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers -+ clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic) -+endif() - - foreach(LIBNAME ${CLANG_LIBNAMES}) - find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}") +-if((9 LESS LLVM_MAJOR) AND (LLVM_LIB_IS_SHARED MATCHES "shared")) ++if((8 LESS LLVM_MAJOR) AND (LLVM_LIB_IS_SHARED MATCHES "shared")) + # Link against a single shared library instead of multiple component shared + # libraries. + set(CLANG_LIBNAMES clang-cpp) diff --git a/pocl-1.4.tar.gz b/pocl-1.4.tar.gz deleted file mode 100644 index 53e19d4..0000000 --- a/pocl-1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec237faa83bb1c803fbdf7c6e83d8a2ad68b6f0ed1879c3aa16c0e1dcc478742 -size 1560972 diff --git a/pocl-1.5.tar.gz b/pocl-1.5.tar.gz new file mode 100644 index 0000000..84b72af --- /dev/null +++ b/pocl-1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fcf4618171727d165fc044d465a66e3119217bb4577a97374f94fcd8aed330e +size 1575635 diff --git a/pocl.changes b/pocl.changes index 4e3fff5..b2fdccf 100644 --- a/pocl.changes +++ b/pocl.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jun 25 09:53:25 UTC 2020 - Stefan Dirsch + +- Update to version 1.5 + * Added support for LLVM/Clang 10.0 +- adjusted link_against_libclang-cpp_so.patch +- move pocl.icd from /usr/etc/OpenCL/vendors to + /usr/share/OpenCL/vendors (boo#1173005) + ------------------------------------------------------------------- Mon Nov 4 20:04:34 UTC 2019 - Stefan BrĂ¼ns diff --git a/pocl.spec b/pocl.spec index 3aebfc1..cd2b1b8 100644 --- a/pocl.spec +++ b/pocl.spec @@ -1,7 +1,7 @@ # # spec file for package pocl # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2014 Guillaume GARDET # # All modifications and additions to the file contributed by third parties @@ -17,9 +17,13 @@ # -%define sover 2.4.0 +%if 0%{?suse_version} <= 1550 +%define _distconfdir /etc +%endif + +%define sover 2.5.0 Name: pocl -Version: 1.4 +Version: 1.5 Release: 0 Summary: Portable Computing Language - an OpenCL implementation # The whole code is under MIT @@ -30,9 +34,8 @@ Group: Development/Tools/Other URL: http://portablecl.org/ Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: pocl-rpmlintrc -# PATCH-FIX-UPSTREAM -- https://github.com/pocl/pocl/pull/779 Patch0: link_against_libclang-cpp_so.patch -BuildConflicts: clang-devel >= 10 +BuildConflicts: clang-devel >= 11 BuildRequires: clang-devel >= 6 BuildRequires: cmake BuildRequires: gcc-c++ @@ -95,7 +98,7 @@ This subpackage provides the development files needed for pocl. %cmake \ -DENABLE_CUDA=0 \ -DENABLE_ICD=ON \ - -DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \ + -DPOCL_INSTALL_ICD_VENDORDIR=%{_distconfdir}/OpenCL/vendors \ %ifarch %{ix86} x86_64 -DKERNELLIB_HOST_CPU_VARIANTS=distro \ %endif @@ -107,13 +110,16 @@ This subpackage provides the development files needed for pocl. %endif -DWITH_LLVM_CONFIG=%{_bindir}/llvm-config +sed -i 's/-Wl,--no-undefined//g' CMakeCache.txt +sed -i 's/-Wl,--no-undefined//g' build.ninja + %make_jobs %install %cmake_install # FIXME - should be handled upstream mv %{buildroot}%{_prefix}%{_libdir} %{buildroot}%{_libdir} -sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_sysconfdir}/OpenCL/vendors/pocl.icd +sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_distconfdir}/OpenCL/vendors/pocl.icd # Unbundle vecmath #rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/ #ln -vs %%{_includedir}/vecmath %%{buildroot}/%%{_libdir}/pocl/vecmath @@ -125,9 +131,9 @@ sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_sysconfdir}/OpenCL %files %doc CHANGES README doc/sphinx/source/*.rst %license LICENSE -%dir %{_sysconfdir}/OpenCL/ -%dir %{_sysconfdir}/OpenCL/vendors -%{_sysconfdir}/OpenCL/vendors/pocl.icd +%dir %{_distconfdir}/OpenCL/ +%dir %{_distconfdir}/OpenCL/vendors +%{_distconfdir}/OpenCL/vendors/pocl.icd %{_bindir}/poclcc %dir %{_libdir}/pocl/ %{_libdir}/pocl/libllvmopencl.so