%global vc_commit 753ad5002af5a5e467b3a0194a2b0e9a3243059e %global vc_shortcommit %(c=%{vc_commit}; echo ${c:0:7}) %global spirv_tools_tag 2021.4 %global spirv_headers_tag sdk-1.2.198.0 %global toolchain clang %global optflags %{optflags} -Wno-everything -Qunused-arguments Name: intel-igc Version: 1.0.9933 Release: 1%{?dist} Summary: Intel(R) Graphics Compiler for OpenCL(TM) License: MIT URL: https://github.com/intel/intel-graphics-compiler Source0: %{url}/archive/igc-%{version}/igc-%{version}.tar.gz Source1: https://github.com/intel/vc-intrinsics/archive/%{vc_commit}/vc-intrinsics-%{vc_shortcommit}.tar.gz Source2: https://github.com/KhronosGroup/SPIRV-Tools/archive/v%{spirv_tools_tag}/SPIRV-Tools-v%{spirv_tools_tag}.tar.gz Source3: https://github.com/KhronosGroup/SPIRV-Headers/archive/%{spirv_headers_tag}/SPIRV-Headers-%{spirv_headers_tag}.tar.gz # https://github.com/intel/intel-graphics-compiler/pull/210 Patch01: 210.patch # https://github.com/intel/intel-graphics-compiler/pull/220 Patch02: 220.patch # https://github.com/intel/intel-graphics-compiler/pull/226 Patch03: 226.patch Patch04: 0001-Don-t-return-NULL-string-which-fails-on-GCC-12.patch BuildRequires: cmake BuildRequires: make BuildRequires: git BuildRequires: ninja-build BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: lld BuildRequires: lld-devel BuildRequires: clang BuildRequires: flex BuildRequires: bison BuildRequires: python3 BuildRequires: zlib-devel BuildRequires: intel-opencl-clang BuildRequires: libunwind-devel BuildRequires: spirv-llvm-translator BuildRequires: spirv-llvm-translator-devel BuildRequires: spirv-llvm-translator-tools %description The Intel® Graphics Compiler for OpenCL™ is an LLVM based compiler for OpenCL™ targeting Intel Gen graphics hardware architecture. %package devel Summary: Intel(R) Graphics Compiler Frontend - Devel Files Requires: %{name} = %{version}-%{release} %description devel Devel files for Intel(R) Graphics Compiler for OpenCL(TM). %prep tar -xf %{SOURCE1} tar -xf %{SOURCE2} tar -xf %{SOURCE3} mv %{_builddir}/SPIRV-Tools-%{spirv_tools_tag} %{_builddir}/SPIRV-Tools mv %{_builddir}/SPIRV-Headers-%{spirv_headers_tag} %{_builddir}/SPIRV-Headers %setup -q -n intel-graphics-compiler-igc-%{version} %patch01 -p1 %patch02 -p1 %patch03 -p1 %patch04 -p1 %build %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DIGC_OPTION__LLVM_PREFERRED_VERSION='13.0.0' \ -DVC_INTRINSICS_SRC="%{_builddir}/vc-intrinsics-%{vc_commit}" \ -DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \ -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \ -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_VC=ON \ -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_SC=OFF \ -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \ -DIGC_OPTION__CLANG_MODE=Prebuilds \ -DIGC_OPTION__LLD_MODE=Prebuilds \ -DIGC_OPTION__LLVM_MODE=Prebuilds \ -DINSTALL_GENX_IR=ON \ -Wno-dev \ -G Ninja %cmake_build %install %cmake_install %files %{_libdir}/libiga64.so* %{_libdir}/libigc.so* %{_libdir}/libigdfcl.so* %{_bindir}/iga64 %{_bindir}/GenX_IR %{_libdir}/igc/NOTICES.txt %files devel %{_includedir}/igc/* %{_includedir}/iga/* %{_includedir}/visa/* %{_libdir}/pkgconfig/igc-opencl.pc %doc %changelog * Mon Dec 27 2021 Frantisek Zatloukal - 1.0.9636-1 - Initial package