diff --git a/fix_resources_path_version_dependency.patch b/fix_resources_path_version_dependency.patch deleted file mode 100644 index 4eedd4f..0000000 --- a/fix_resources_path_version_dependency.patch +++ /dev/null @@ -1,44 +0,0 @@ -From dd408ae373b06ee46e178401ab28ecb62b9d2f06 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Mon, 29 Jul 2019 17:01:50 +0200 -Subject: [PATCH] Determine CLANG resources dir at runtime - -When the resources dir is determined at compile time, it also includes -the full version (e.g. /usr/lib64/clang/8.0.0/include/opencl-c.h). If -clang gets a minor version update later (e.g. from 8.0.0 to 8.0.1), pocl -will still add the obsolete path for the header lookup. - -Determine the path at runtime instead. LLVM 9.0 adds a static method -llvm::driver::Driver::GetResourcesPath(...) which can be used, LLVM 8.0 -and older have to use a dummy Driver instance. - -Fixes #747. ---- - lib/CL/pocl_llvm_build.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/lib/CL/pocl_llvm_build.cc b/lib/CL/pocl_llvm_build.cc -index f0b897f4..00a6fb26 100644 ---- a/lib/CL/pocl_llvm_build.cc -+++ b/lib/CL/pocl_llvm_build.cc -@@ -438,7 +438,16 @@ int pocl_llvm_build_program(cl_program program, - po.Includes.push_back(BuiltinRenamesH); - #ifndef LLVM_OLDER_THAN_4_0 - // Use Clang's opencl-c.h header. -- po.Includes.push_back(CLANG_RESOURCE_DIR "/include/opencl-c.h"); -+ { -+#if (!defined(LLVM_OLDER_THAN_8_0)) && (!defined(LLVM_8_0)) -+ std::string ClangResourcesDir = driver::Driver::GetResourcesPath(CLANG); -+#else -+ DiagnosticsEngine Diags{new DiagnosticIDs, new DiagnosticOptions}; -+ driver::Driver TheDriver(CLANG, "", Diags); -+ std::string ClangResourcesDir = TheDriver.ResourceDir; -+#endif -+ po.Includes.push_back(ClangResourcesDir + "/include/opencl-c.h"); -+ } - #endif - po.Includes.push_back(KernelH); - clang::TargetOptions &ta = pocl_build.getTargetOpts(); --- -2.22.0 - diff --git a/link_against_libclang-cpp_so.patch b/link_against_libclang-cpp_so.patch new file mode 100644 index 0000000..412ed55 --- /dev/null +++ b/link_against_libclang-cpp_so.patch @@ -0,0 +1,39 @@ +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}") + 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}") diff --git a/pocl-1.3.tar.gz b/pocl-1.3.tar.gz deleted file mode 100644 index 5a59aa6..0000000 --- a/pocl-1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6527e3f47fab7c21e96bc757c4ae3303901f35e23f64642d6da5cc4c4fcc915a -size 1414807 diff --git a/pocl-1.4.tar.gz b/pocl-1.4.tar.gz new file mode 100644 index 0000000..53e19d4 --- /dev/null +++ b/pocl-1.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec237faa83bb1c803fbdf7c6e83d8a2ad68b6f0ed1879c3aa16c0e1dcc478742 +size 1560972 diff --git a/pocl.changes b/pocl.changes index 5d4d513..4e3fff5 100644 --- a/pocl.changes +++ b/pocl.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Nov 4 20:04:34 UTC 2019 - Stefan Brüns + +- Update to version 1.4 + * Support for LLVM/Clang 8.0 and 9.0 + * Support for LLVM older than 6.0 has been removed. + * Improved SPIR and SPIR-V support for CPU device + * pocl-accel: An example driver and support infrastructure for + OpenCL 1.2 CL_DEVICE_TYPE_CUSTOM hardware accelerators. +- Remove upstreamed fix_resources_path_version_dependency.patch +- Fix build with single-component libclang-cpp.so, add + link_against_libclang-cpp_so.patch + ------------------------------------------------------------------- Sun Jul 28 19:15:03 UTC 2019 - Stefan Brüns diff --git a/pocl.spec b/pocl.spec index 90489b8..3aebfc1 100644 --- a/pocl.spec +++ b/pocl.spec @@ -17,9 +17,9 @@ # -%define sover 2.3.0 +%define sover 2.4.0 Name: pocl -Version: 1.3 +Version: 1.4 Release: 0 Summary: Portable Computing Language - an OpenCL implementation # The whole code is under MIT @@ -30,14 +30,12 @@ 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 - The clang resources path at compile time includes the full version, determine at runtime -Patch0: fix_resources_path_version_dependency.patch -BuildRequires: clang -BuildConflicts: clang >= 9 -BuildRequires: clang-devel >= 4 +# PATCH-FIX-UPSTREAM -- https://github.com/pocl/pocl/pull/779 +Patch0: link_against_libclang-cpp_so.patch +BuildConflicts: clang-devel >= 10 +BuildRequires: clang-devel >= 6 BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: libtool-ltdl-devel BuildRequires: ninja BuildRequires: opencl-headers BuildRequires: pkgconfig @@ -45,10 +43,6 @@ BuildRequires: pkgconfig(OpenCL) BuildRequires: pkgconfig(hwloc) # Autoreq does not look into the ICD file Requires: libpocl2 -%if 0%{?sle_version} == 150000 && 0%{?is_opensuse} -# Old versions have opencl-c.h in the clang package, not libclang -Requires: clang5 -%endif # PPC has limited support/testing from upstream # s390(x) is also not supported, so use ExclusiveArch ExclusiveArch: %{ix86} x86_64 %arm aarch64