Dominique Leuenberger 2020-06-26 19:49:45 +00:00 committed by Git OBS Bridge
commit 774fea0adf
5 changed files with 38 additions and 49 deletions

View File

@ -1,39 +1,12 @@
From 079c8e9862550ef7d2c6b1f134efdfdebc67c45e Mon Sep 17 00:00:00 2001 diff -u -r pocl-1.5.orig/cmake/LLVM.cmake pocl-1.5/cmake/LLVM.cmake
From: Tom Stellard <tstellar@redhat.com> --- pocl-1.5.orig/cmake/LLVM.cmake 2020-06-25 12:22:37.500539000 +0200
Date: Thu, 26 Sep 2019 15:33:58 -0700 +++ pocl-1.5/cmake/LLVM.cmake 2020-06-25 12:23:23.091551000 +0200
Subject: [PATCH] Link against libclang-cpp.so when linking with shared @@ -219,7 +219,7 @@
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}")
string(REGEX REPLACE "-W[^ ]*" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}") string(REGEX REPLACE "-W[^ ]*" "" LLVM_CXXFLAGS "${LLVM_CXXFLAGS}")
# Llvm-config does not include clang libs # Llvm-config does not include clang libs
-set(CLANG_LIBNAMES clangCodeGen clangFrontendTool clangFrontend clangDriver clangSerialization -if((9 LESS LLVM_MAJOR) AND (LLVM_LIB_IS_SHARED MATCHES "shared"))
- clangParse clangSema clangRewrite clangRewriteFrontend +if((8 LESS LLVM_MAJOR) AND (LLVM_LIB_IS_SHARED MATCHES "shared"))
- clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers # Link against a single shared library instead of multiple component shared
- clangStaticAnalyzerCore clangAnalysis clangEdit clangAST clangASTMatchers clangLex clangBasic) # libraries.
+if(8 LESS LLVM_MAJOR AND LLVM_LIB_IS_SHARED MATCHES "shared") set(CLANG_LIBNAMES clang-cpp)
+ # 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}")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec237faa83bb1c803fbdf7c6e83d8a2ad68b6f0ed1879c3aa16c0e1dcc478742
size 1560972

3
pocl-1.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fcf4618171727d165fc044d465a66e3119217bb4577a97374f94fcd8aed330e
size 1575635

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Jun 26 11:05:12 UTC 2020 - Stefan Dirsch <sndirsch@suse.com>
- moved pocl.icd to /usr/share/OpenCL/vendors for real ...
-------------------------------------------------------------------
Thu Jun 25 09:53:25 UTC 2020 - Stefan Dirsch <sndirsch@suse.com>
- 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 <stefan.bruens@rwth-aachen.de> Mon Nov 4 20:04:34 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package pocl # spec file for package pocl
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org> # Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -17,9 +17,9 @@
# #
%define sover 2.4.0 %define sover 2.5.0
Name: pocl Name: pocl
Version: 1.4 Version: 1.5
Release: 0 Release: 0
Summary: Portable Computing Language - an OpenCL implementation Summary: Portable Computing Language - an OpenCL implementation
# The whole code is under MIT # The whole code is under MIT
@ -30,9 +30,8 @@ Group: Development/Tools/Other
URL: http://portablecl.org/ URL: http://portablecl.org/
Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99: pocl-rpmlintrc Source99: pocl-rpmlintrc
# PATCH-FIX-UPSTREAM -- https://github.com/pocl/pocl/pull/779
Patch0: link_against_libclang-cpp_so.patch Patch0: link_against_libclang-cpp_so.patch
BuildConflicts: clang-devel >= 10 BuildConflicts: clang-devel >= 11
BuildRequires: clang-devel >= 6 BuildRequires: clang-devel >= 6
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -95,7 +94,7 @@ This subpackage provides the development files needed for pocl.
%cmake \ %cmake \
-DENABLE_CUDA=0 \ -DENABLE_CUDA=0 \
-DENABLE_ICD=ON \ -DENABLE_ICD=ON \
-DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \ -DPOCL_INSTALL_ICD_VENDORDIR=%{_datadir}/OpenCL/vendors \
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
-DKERNELLIB_HOST_CPU_VARIANTS=distro \ -DKERNELLIB_HOST_CPU_VARIANTS=distro \
%endif %endif
@ -107,13 +106,16 @@ This subpackage provides the development files needed for pocl.
%endif %endif
-DWITH_LLVM_CONFIG=%{_bindir}/llvm-config -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 %make_jobs
%install %install
%cmake_install %cmake_install
# FIXME - should be handled upstream # FIXME - should be handled upstream
mv %{buildroot}%{_prefix}%{_libdir} %{buildroot}%{_libdir} 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}%{_datadir}/OpenCL/vendors/pocl.icd
# Unbundle vecmath # Unbundle vecmath
#rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/ #rm -vf %%{buildroot}/%%{_libdir}/pocl/vecmath/
#ln -vs %%{_includedir}/vecmath %%{buildroot}/%%{_libdir}/pocl/vecmath #ln -vs %%{_includedir}/vecmath %%{buildroot}/%%{_libdir}/pocl/vecmath
@ -125,9 +127,9 @@ sed -i 's|%{_prefix}%{_prefix}/|%{_prefix}/|g' %{buildroot}%{_sysconfdir}/OpenCL
%files %files
%doc CHANGES README doc/sphinx/source/*.rst %doc CHANGES README doc/sphinx/source/*.rst
%license LICENSE %license LICENSE
%dir %{_sysconfdir}/OpenCL/ %dir %{_datadir}/OpenCL/
%dir %{_sysconfdir}/OpenCL/vendors %dir %{_datadir}/OpenCL/vendors
%{_sysconfdir}/OpenCL/vendors/pocl.icd %{_datadir}/OpenCL/vendors/pocl.icd
%{_bindir}/poclcc %{_bindir}/poclcc
%dir %{_libdir}/pocl/ %dir %{_libdir}/pocl/
%{_libdir}/pocl/libllvmopencl.so %{_libdir}/pocl/libllvmopencl.so