Accepting request 433980 from home:pluskalm:branches:science
- Use cmake macros - Use ninja to speedup building OBS-URL: https://build.opensuse.org/request/show/433980 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=12
This commit is contained in:
parent
89c9b90d01
commit
f667c3481a
@ -1,8 +1,8 @@
|
||||
diff --git a/cmake/bitcode_rules.cmake b/cmake/bitcode_rules.cmake
|
||||
index dd6853b..708ba24 100644
|
||||
--- a/cmake/bitcode_rules.cmake
|
||||
+++ b/cmake/bitcode_rules.cmake
|
||||
@@ -62,7 +62,7 @@ function(compile_cc_to_bc FILENAME SUBDIR BC_FILE_LIST)
|
||||
Index: cmake/bitcode_rules.cmake
|
||||
===================================================================
|
||||
--- cmake/bitcode_rules.cmake.orig
|
||||
+++ cmake/bitcode_rules.cmake
|
||||
@@ -62,7 +62,7 @@ function(compile_cc_to_bc FILENAME SUBDI
|
||||
DEPENDS "${FULL_F_PATH}"
|
||||
${KERNEL_DEPEND_HEADERS}
|
||||
COMMAND "${CLANGXX}" ${CLANG_FLAGS} ${KERNEL_CLANGXX_FLAGS}
|
||||
@ -11,11 +11,11 @@ index dd6853b..708ba24 100644
|
||||
COMMENT "Building C++ to LLVM bitcode ${BC_FILE}"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
diff --git a/lib/kernel/rules.mk b/lib/kernel/rules.mk
|
||||
index 27bc9d4..aa9912c 100644
|
||||
--- a/lib/kernel/rules.mk
|
||||
+++ b/lib/kernel/rules.mk
|
||||
@@ -74,7 +74,7 @@ _kernel.h.pch: @top_builddir@/include/${TARGET_DIR}/types.h @top_srcdir@/include
|
||||
Index: lib/kernel/rules.mk
|
||||
===================================================================
|
||||
--- lib/kernel/rules.mk.orig
|
||||
+++ lib/kernel/rules.mk
|
||||
@@ -74,7 +74,7 @@ _kernel.h.pch: @top_builddir@/include/${
|
||||
@CLANG@ ${CLANG_FLAGS} ${CLFLAGS} ${DEVICE_CL_FLAGS} -D__CBUILD__ -c -o $@ -include ${abs_top_srcdir}/include/_kernel_c.h $<
|
||||
%.cc.bc: %.cc ${LKERNEL_HDRS_EXTRA}
|
||||
mkdir -p ${dir $@}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 9 09:17:33 UTC 2016 - mpluskal@suse.com
|
||||
|
||||
- Use cmake macros
|
||||
- Use ninja to speedup building
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 4 15:04:04 UTC 2016 - mardnh@gmx.de
|
||||
|
||||
|
37
pocl.spec
37
pocl.spec
@ -18,11 +18,11 @@
|
||||
|
||||
|
||||
Name: pocl
|
||||
Version: 0.13
|
||||
Release: 0
|
||||
Summary: Portable Computing Language - an OpenCL implementation
|
||||
License: MIT
|
||||
Group: Productivity/Other
|
||||
Version: 0.13
|
||||
Release: 0
|
||||
# The whole code is under MIT
|
||||
# except include/utlist.h which is under BSD (and unbundled) and
|
||||
# except lib/kernel/vecmath which is under GPLv3+ or LGPLv3+ (and unbundled in future)
|
||||
@ -30,11 +30,6 @@ Url: http://portablecl.org/
|
||||
Source0: http://portablecl.org/downloads/%{name}-%{version}.tar.gz
|
||||
Source99: pocl-rpmlintrc
|
||||
Patch0: 0001-Fixes-357-broken-build-with-GCC-6.1.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# 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
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: cmake >= 2.8.12
|
||||
BuildRequires: libtool
|
||||
@ -44,15 +39,21 @@ BuildRequires: llvm-clang > 3.5
|
||||
BuildRequires: llvm-clang-devel > 3.5
|
||||
BuildRequires: llvm-devel > 3.5
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: ninja
|
||||
BuildRequires: opencl-headers
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: uthash-devel
|
||||
BuildRequires: pkgconfig(OpenCL)
|
||||
BuildRequires: pkgconfig(glew)
|
||||
BuildRequires: pkgconfig(hwloc)
|
||||
#BuildRequires: vecmath-devel
|
||||
Requires: libstdc++-devel
|
||||
Requires: llvm-clang > 3.5
|
||||
Requires: uthash
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# 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
|
||||
|
||||
%description
|
||||
Portable Computing Language (pocl) aims to become a MIT-licensed open source
|
||||
@ -71,10 +72,9 @@ multicore, multithread ...
|
||||
Additional purpose of the project is to serve as a research platform for
|
||||
issues in parallel programming on heterogeneous platforms.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Portable Computing Language - development files
|
||||
Group: Development/Languages/Other
|
||||
Group: Development/Languages/Other
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: opencl-headers
|
||||
|
||||
@ -85,20 +85,20 @@ and devices, both for homogeneous CPU and heterogenous GPUs/accelerators.
|
||||
|
||||
This Subpackage provides the development files needed for pocl.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch0
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..\
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
%define __builder ninja
|
||||
%cmake ..\
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DWITH_LLVM_CONFIG=/usr/bin/llvm-config
|
||||
make %{?_smp_mflags}
|
||||
-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" \
|
||||
-DWITH_LLVM_CONFIG=%{_bindir}/llvm-config
|
||||
%make_jobs
|
||||
|
||||
# docs
|
||||
#cd doc/sphinx
|
||||
@ -109,6 +109,7 @@ make %{?_smp_mflags}
|
||||
|
||||
# FIXME - should be handled upstream
|
||||
chmod 755 %{buildroot}/%{_bindir}/pocl-standalone
|
||||
mv %{buildroot}%{_prefix}%{_libdir} %{buildroot}%{_libdir}
|
||||
|
||||
# Unbundle vecmath
|
||||
#rm -vf %{buildroot}/%{_libdir}/pocl/vecmath/
|
||||
|
Loading…
Reference in New Issue
Block a user