Hello community, here is the log from the commit of package pocl for openSUSE:Factory checked in at 2019-08-05 10:36:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pocl (Old) and /work/SRC/openSUSE:Factory/.pocl.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pocl" Mon Aug 5 10:36:15 2019 rev:19 rq:720127 version:1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/pocl/pocl.changes 2019-04-08 10:40:00.655290681 +0200 +++ /work/SRC/openSUSE:Factory/.pocl.new.4126/pocl.changes 2019-08-05 10:36:24.951334309 +0200 @@ -1,0 +2,17 @@ +Sun Jul 28 19:15:03 UTC 2019 - Stefan BrĂ¼ns <[email protected]> + +- Use GCC (default host compiler) for compiling the library itself, + and only compile the openCL kernel bytecode with clang, which is the + upstream default setup. This also fixes problems where clang chokes + on the GCC LTO options. +- Drop unused boost_headers, glew, ncurses and uthash devel BuildRequires. +- Remove unneeded extra linker flags. +- Fix build on ARM, and enable Arch64 (needs explicit CPU specification), + supported since pocl 1.1. +- Fix failing header lookup when minor libclang version changes + (https://github.com/pocl/pocl/issues/747), add + fix_resources_path_version_dependency.patch +- Require implementation (libpocl2) from the main package which + contains the ICD referencing it. + +------------------------------------------------------------------- New: ---- fix_resources_path_version_dependency.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pocl.spec ++++++ --- /var/tmp/diff_new_pack.FQSKcG/_old 2019-08-05 10:36:26.359334149 +0200 +++ /var/tmp/diff_new_pack.FQSKcG/_new 2019-08-05 10:36:26.367334148 +0200 @@ -30,28 +30,28 @@ URL: http://portablecl.org/ Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: pocl-rpmlintrc -BuildRequires: clang < 9 -BuildRequires: clang-devel < 9 +# 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 BuildRequires: cmake -BuildRequires: libboost_headers-devel -BuildRequires: libtool +BuildRequires: gcc-c++ BuildRequires: libtool-ltdl-devel -BuildRequires: ncurses-devel BuildRequires: ninja BuildRequires: opencl-headers BuildRequires: pkgconfig -BuildRequires: uthash-devel BuildRequires: pkgconfig(OpenCL) -BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(hwloc) -Requires: clang < 9 -Requires: gcc -Requires: libstdc++-devel -Requires: libut2 -# Only armv7l is supported -# PPC support is currently broken, due to path problems -# s390(x) and aarch64 also not supported, so use ExclusiveArch -ExclusiveArch: %{ix86} x86_64 armv7l armv7hl +# 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 %description Portable Computing Language (pocl) is an implementation of the OpenCL standard @@ -76,7 +76,7 @@ which can be adapted for new targets and devices, both for homogeneous CPU and heterogenous GPUs/accelerators. -This subpackage contains the share library part of pocl. +This subpackage contains the shared library part of pocl. %package devel Summary: Development files for the Portable Computing Language @@ -94,6 +94,7 @@ %prep %setup -q +%patch0 -p1 %build %define __builder ninja @@ -101,16 +102,17 @@ -DENABLE_CUDA=0 \ -DENABLE_ICD=ON \ -DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ %ifarch %{ix86} x86_64 -DKERNELLIB_HOST_CPU_VARIANTS=distro \ %endif - -DEXTRA_KERNEL_CXX_FLAGS="%{optflags} -std=c++11" \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \ +%ifarch %{arm} + -DLLC_HOST_CPU=cortex-a9 \ +%endif +%ifarch aarch64 + -DLLC_HOST_CPU=cortex-a53 \ +%endif -DWITH_LLVM_CONFIG=%{_bindir}/llvm-config + %make_jobs %install ++++++ fix_resources_path_version_dependency.patch ++++++ >From dd408ae373b06ee46e178401ab28ecb62b9d2f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> 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
