%global llvm_commit llvmorg-9.0.0 %global opencl_clang_commit v9.0.0 %global spirv_llvm_translator_commit v9.0.0-1 %global llvm_patches_commit 1c93162ab33af968c22fe1cbfb12ea87f5a25bfa %global igc_commit 02fb853c6b0e33cfc5d550ff49dfd418deadf5c2 %global patch_version 2878 Name: intel-igc Version: 1.0.2878 Release: 1%{?dist} Summary: Intel(R) Graphics Compiler for OpenCL(TM) Group: System Environment/Libraries License: MIT URL: https://github.com/intel/intel-graphics-compiler Source0: %{url}/archive/%{igc_commit}/igc-%{version}.tar.gz Source1: https://github.com/intel/opencl-clang/archive/%{opencl_clang_commit}/intel-opencl-clang.tar.gz Source2: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/%{spirv_llvm_translator_commit}/spirv-llvm-translator.tar.gz Source3: https://github.com/llvm/llvm-project/archive/%{llvm_commit}/llvm-project.tar.gz Source4: https://github.com/intel/llvm-patches/archive/%{llvm_patches_commit}/llvm-patches.tar.gz BuildRequires: cmake gcc-c++ make flex bison python3 pkg-config git %description Intel(R) Graphics Compiler for OpenCL(TM). %package core Summary: Intel(R) Graphics Compiler Core %description core %package opencl Summary: Intel(R) Graphics Compiler Frontend Requires: %{name}-core = %{version}-%{release} %description opencl %package opencl-devel Summary: Intel(R) Graphics Compiler development package Requires: %{name}-opencl = %{version}-%{release} %description opencl-devel %prep mkdir llvm-project tar xzf $RPM_SOURCE_DIR/llvm-project.tar.gz -C llvm-project --strip-components=1 mv llvm-project/clang llvm-project/llvm/tools/ pushd llvm-project/llvm/projects mkdir opencl-clang llvm-spirv tar xzf $RPM_SOURCE_DIR/intel-opencl-clang.tar.gz -C opencl-clang --strip-components=1 tar xzf $RPM_SOURCE_DIR/spirv-llvm-translator.tar.gz -C llvm-spirv --strip-components=1 popd mkdir igc tar xzf $RPM_SOURCE_DIR/igc-%{version}.tar.gz -C igc --strip-components=1 mkdir llvm_patches tar xzf $RPM_SOURCE_DIR/llvm-patches.tar.gz -C llvm_patches --strip-components=1 %build mkdir build pushd build cmake ../igc -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \ -DIGC_PACKAGE_RELEASE=%{patch_version} %make_build popd %install cd build %make_install rm -fv $RPM_BUILD_ROOT/usr/bin/GenX_IR rm -fv $RPM_BUILD_ROOT/usr/bin/clang-9 rm -fv $RPM_BUILD_ROOT/usr/include/opencl-c.h rm -fv $RPM_BUILD_ROOT/usr/include/opencl-c-base.h chmod +x $RPM_BUILD_ROOT/usr/lib64/libopencl-clang.so.9 %files core %defattr(-,root,root) /usr/lib64/libiga64.so.* /usr/lib64/libigc.so.* /usr/bin/iga64 %files opencl %defattr(-,root,root) /usr/lib64/libigdfcl.so.* /usr/lib64/libopencl-clang.so.* %files opencl-devel %defattr(-,root,root) /usr/include/igc/* /usr/include/iga/* /usr/include/visa/* /usr/lib64/libiga64.so /usr/lib64/libigc.so /usr/lib64/libigdfcl.so /usr/lib64/pkgconfig/* %doc %changelog * Wed Nov 20 2019 Jacek Danecki - 1.0.2878-1 - Update to 1.0.2878 * Thu Nov 14 2019 Jacek Danecki - 1.0.2805-1 - Update to 1.0.2805 * Wed Oct 30 2019 Jacek Danecki - 1.0.2714.1-1 - Update to 1.0.2714.1 - Switch to llvm/clang 9.0.0 - Include opencl-clang library