ci: specs files fixes

- update devtoolset-4 to devtoolset-7 for Centos 7.7
- added patches to fix versioning in igc
- addtional flags to build correctly devel packages for gmmlib

Change-Id: I548ffa31b24c58bc25e7a3afa3846693da01f4d5
Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
This commit is contained in:
Jacek Danecki
2019-09-19 18:42:36 +02:00
committed by sys_ocldev
parent 33e64747fd
commit 0ba2cec970
6 changed files with 87 additions and 71 deletions

View File

@@ -1,4 +1,4 @@
%global igc_commit_id 8b0b9d18e0bc602b732fd50a920b203c23ef630f
%global igc_commit_id 6dd3bde8f93ee61f798f84a34a9c9e66d0aedd49
%global cclang_commit_id 41cad395859684b18e762ca4a2c713c2fa349622
%global spirv_llvm_commit_id 83298e3c9b124486c16d0fde54c764a6c5a2b554
%global llvm_commit_id release_80
@@ -6,26 +6,28 @@
%global llvm_patches_id 605739e09f4b5b176a93613c43727fd37fd77e71
%global major_version 1
%global minor_version 0
%global patch_version 2456
%global patch_version 2500
%global package_release 1
Name: intel-igc
Version: %{major_version}.%{minor_version}.%{patch_version}
Release: %{package_release}%{?dist}
Summary: Intel(R) Graphics Compiler for OpenCL(TM)
Name: intel-igc
Version: %{major_version}.%{minor_version}.%{patch_version}
Release: %{package_release}%{?dist}
Summary: Intel(R) Graphics Compiler for OpenCL(TM)
Group: System Environment/Libraries
License: MIT
URL: https://github.com/intel/intel-graphics-compiler
Source0: https://github.com/intel/intel-graphics-compiler/archive/%{igc_commit_id}/igc.tar.gz
Source1: https://github.com/intel/opencl-clang/archive/%{cclang_commit_id}/intel-opencl-clang.tar.gz
Source2: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/%{spirv_llvm_commit_id}/spirv-llvm-translator.tar.gz
Source3: https://github.com/llvm-mirror/llvm/archive/%{llvm_commit_id}/llvm-80.tar.gz
Source4: https://github.com/llvm-mirror/clang/archive/%{clang_commit_id}/clang-80.tar.gz
Source5: https://github.com/intel/llvm-patches/archive/%{llvm_patches_id}/llvm-patches.tar.gz
Group: System Environment/Libraries
License: MIT
URL: https://github.com/intel/intel-graphics-compiler
Source0: https://github.com/intel/intel-graphics-compiler/archive/%{igc_commit_id}/igc.tar.gz
Source1: https://github.com/intel/opencl-clang/archive/%{cclang_commit_id}/intel-opencl-clang.tar.gz
Source2: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/%{spirv_llvm_commit_id}/spirv-llvm-translator.tar.gz
Source3: https://github.com/llvm-mirror/llvm/archive/%{llvm_commit_id}/llvm-80.tar.gz
Source4: https://github.com/llvm-mirror/clang/archive/%{clang_commit_id}/clang-80.tar.gz
Source5: https://github.com/intel/llvm-patches/archive/%{llvm_patches_id}/llvm-patches.tar.gz
Patch0: https://github.com/intel/intel-graphics-compiler/commit/8621841947517aaf4b4278f9f6e94d74cc126747.patch
Patch1: https://github.com/intel/intel-graphics-compiler/commit/0a69375bf58c5d100cf5d77b3d903720b4af966e.patch
BuildRequires: centos-release-scl epel-release
BuildRequires: devtoolset-4-gcc-c++ cmake3
BuildRequires: devtoolset-7-gcc-c++ cmake3
BuildRequires: git make patch pkgconfig python2 procps bison flex
%description
@@ -48,13 +50,7 @@ Requires: %{name}-opencl = %{version}-%{release}
%description opencl-devel
%clean
echo "==== CLEAN ===="
%prep
echo "==== PREP ===="
mkdir llvm_source
tar xzf $RPM_SOURCE_DIR/llvm-80.tar.gz -C llvm_source --strip-components=1
@@ -88,18 +84,22 @@ cd ../../..
mkdir igc
tar xzf $RPM_SOURCE_DIR/igc.tar.gz -C igc --strip-components=1
cd igc
patch -p1 < $RPM_SOURCE_DIR/8621841947517aaf4b4278f9f6e94d74cc126747.patch
patch -p1 < $RPM_SOURCE_DIR/0a69375bf58c5d100cf5d77b3d903720b4af966e.patch
cd ..
mkdir llvm_patches
tar xzf $RPM_SOURCE_DIR/llvm-patches.tar.gz -C llvm_patches --strip-components=1
%build
echo "==== BUILD ===="
mkdir build
pushd build
scl enable devtoolset-4 "cmake3 ../igc -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCOMMON_CLANG_LIBRARY_NAME=opencl-clang -DIGC_PREFERRED_LLVM_VERSION=8.0.0"
scl enable devtoolset-4 "make -j `nproc`"
scl enable devtoolset-7 "cmake3 ../igc -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
-DCOMMON_CLANG_LIBRARY_NAME=opencl-clang -DIGC_PREFERRED_LLVM_VERSION=8.0.0 -DIGC_PACKAGE_RELEASE=%{patch_version}"
scl enable devtoolset-7 "make -j `nproc`"
popd
@@ -119,14 +119,14 @@ echo "==== DONE ===="
%files core
%defattr(-,root,root)
/usr/lib64/libiga64.so.%{major_version}
/usr/lib64/libiga64.so.%{major_version}.%{minor_version}.10
/usr/lib64/libiga64.so.%{major_version}.%{minor_version}.%{patch_version}
/usr/lib64/libigc.so.%{major_version}
/usr/lib64/libigc.so.%{major_version}.%{minor_version}.10
/usr/lib64/libigc.so.%{major_version}.%{minor_version}.%{patch_version}
%files opencl
%defattr(-,root,root)
/usr/lib64/libigdfcl.so.%{major_version}
/usr/lib64/libigdfcl.so.%{major_version}.%{minor_version}.10
/usr/lib64/libigdfcl.so.%{major_version}.%{minor_version}.%{patch_version}
/usr/lib64/libopencl-clang.so.8
%files opencl-devel

View File

@@ -2,7 +2,7 @@
%global major_version 19
%global minor_version 2
%global patch_version 3
%global package_release 1
%global package_release 3
%global api_major_version 9
%global api_minor_version 0
%global api_patch_version 589
@@ -19,7 +19,7 @@ Source0: https://github.com/intel/gmmlib/archive/%{gmmlib_commit_id}.tar.gz
%if 0%{?el7}
BuildRequires: centos-release-scl epel-release
BuildRequires: devtoolset-4-gcc-c++ cmake3
BuildRequires: devtoolset-7-gcc-c++ cmake3
%else
BuildRequires: gcc-c++ cmake
%endif
@@ -47,11 +47,17 @@ cd build
%if 0%{?el7}
echo building for el7: %{el7}
scl enable devtoolset-4 "cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release -DPATCH_VERSION=%{api_patch_version} -DRUN_TEST_SUITE:BOOL='ON' ../gmmlib"
scl enable devtoolset-4 "make -j`nproc` DESTDIR=$RPM_BUILD_DIR/build/install igfx_gmmumd_dll install"
scl enable devtoolset-7 "cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TYPE=release \
-DMAJOR_VERSION=%{major_version} -DMINOR_VERSION=%{minor_version} -DPATCH_VERSION=%{patch_version} \
-DGMMLIB_API_PATCH_VERSION=%{api_patch_version} \
-DRUN_TEST_SUITE:BOOL='ON' ../gmmlib"
scl enable devtoolset-7 "make -j`nproc` DESTDIR=$RPM_BUILD_DIR/build/install igfx_gmmumd_dll install"
%else
echo building for Fedora
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release -DPATCH_VERSION=%{api_patch_version} -DRUN_TEST_SUITE:BOOL='ON' ../gmmlib
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TYPE=release \
-DMAJOR_VERSION=%{major_version} -DMINOR_VERSION=%{minor_version} -DPATCH_VERSION=%{patch_version} \
-DGMMLIB_API_PATCH_VERSION=%{api_patch_version} \
-DRUN_TEST_SUITE:BOOL='ON' ../gmmlib
make -j `nproc` DESTDIR=$RPM_BUILD_DIR/build/install igfx_gmmumd_dll install
%endif

View File

@@ -1,7 +1,7 @@
%global neo_commit_id 5f2de3e0839a3b93d1d5b0f9d5d9447fd7cb3c36
%global neo_commit_id dface02b191e5de876f287761291ae487dbd5520
Name: intel-opencl
Version: 19.34.13959
Version: 19.36.14103
Release: 1%{?dist}
Summary: Intel(R) Graphics Compute Runtime for OpenCL(TM)
@@ -12,25 +12,23 @@ Source0: https://github.com/intel/compute-runtime/archive/%{neo_commit_id}/neo-%
%if 0%{?el7}
BuildRequires: centos-release-scl epel-release
BuildRequires: devtoolset-4-gcc-c++ cmake3 make
BuildRequires: devtoolset-7-gcc-c++ cmake3 make
%else
BuildRequires: make libva-devel gcc-c++ cmake
%endif
BuildRequires: intel-gmmlib-devel >= 19.2.3
BuildRequires: intel-igc-opencl-devel >= 1.0.2456
BuildRequires: intel-igc-opencl-devel >= 1.0.2500
Requires: intel-gmmlib >= 19.2.3
Requires: intel-igc-opencl >= 1.0.2456
Requires: intel-igc-opencl >= 1.0.2500
%description
Intel(R) Graphics Compute Runtime for OpenCL(TM).
%prep
%build
echo "==== BUILD ===="
rm -rf *
mkdir neo
@@ -40,25 +38,19 @@ mkdir build
cd build
%if 0%{?el7}
scl enable devtoolset-4 "cmake3 ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}"
scl enable devtoolset-4 "make -j`nproc` igdrcl_dll"
scl enable devtoolset-7 "cmake3 ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}"
scl enable devtoolset-7 "make -j`nproc` igdrcl_dll"
%else
cmake ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}
make -j`nproc` igdrcl_dll
%endif
echo "==== DONE ===="
%install
echo "==== INSTALL ===="
mkdir -p $RPM_BUILD_ROOT/usr/lib64/intel-opencl
mkdir -p $RPM_BUILD_ROOT/etc/OpenCL/vendors
cp $RPM_BUILD_DIR/build/bin/libigdrcl.so $RPM_BUILD_ROOT/usr/lib64/intel-opencl
strip $RPM_BUILD_ROOT/usr/lib64/intel-opencl/libigdrcl.so
echo "/usr/lib64/intel-opencl/libigdrcl.so" > $RPM_BUILD_ROOT/etc/OpenCL/vendors/intel.icd
echo "==== DONE ===="
%files
%defattr(-,root,root)
@@ -69,5 +61,4 @@ echo "==== DONE ===="
# %doc
# %changelog