## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global vc_commit 27f7c4f34738f5eaf7a045b77edf8d9e034443d8 %global vc_shortcommit %(c=%{vc_commit}; echo ${c:0:7}) %global llvm_ver 22.1.8 %global llvm_sover %(echo %{llvm_ver} | cut -d. -f1,2) %if 0%{?rhel} # RHEL build here %global use_system_headers 0 %global clang_commit b953eceebb0abc6ea954a14545420e3f97540a77 %global clang_shortcommit %(c=%{clang_commit}; echo ${c:0:7}) %global translator_commit 27afcfe385cf542197dfde8c658e1f5ff53fc2fc %global translator_shortcommit %(c=%{translator_commit}; echo ${c:0:7}) %global spirv_headers_commit 575b6512579ebde466ed3dfc04e413439d14d95d %global spirv_headers_shortcommit %(c=%{spirv_headers_commit}; echo ${c:0:7}) %global spirv_tools_commit f80351511e9c4672e284842c7b124315c511078a %global spirv_tools_shortcommit %(c=%{spirv_tools_commit}; echo ${c:0:7}) # Disable LTO; LLVM/clang under LTO has produced miscompiled binaries here. %define _lto_cflags %{nil} # Disable dwz: this fails anyways, due to static linking, sometimes fails builds # when builders do not have enough RAM %define _find_debuginfo_dwz_opts %{nil} %else # Fedora build here %global use_system_headers 1 # f44 ships LLVM 22 as the main package; f45+ provide the llvm22 compat package %if 0%{?fedora} >= 45 %global llvm_compat 22 %endif %endif # Keep this override here, otherwise LTO disable will not take affect in RHEL %global optflags %{optflags} -w # This patch level is reused in cflags %global igc_patch 9 Name: intel-igc Version: 2.41.%{igc_patch} Release: %autorelease Summary: Intel Graphics Compiler for OpenCL License: MIT URL: https://github.com/intel/intel-graphics-compiler Source0: %{url}/archive/v%{version}/v%{version}.tar.gz Source1: https://github.com/intel/vc-intrinsics/archive/%{vc_commit}/vc-intrinsics-%{vc_shortcommit}.tar.gz %if ! 0%{?use_system_headers} Source2: https://github.com/intel/opencl-clang/archive/%{clang_commit}/intel-opencl-clang-%{clang_shortcommit}.tar.gz Source3: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/%{translator_commit}/spirv-llvm-translator-%{translator_shortcommit}.tar.gz Source4: https://github.com/KhronosGroup/SPIRV-Headers/archive/%{spirv_headers_commit}/spirv-headers-%{spirv_headers_shortcommit}.tar.gz Source5: https://github.com/KhronosGroup/SPIRV-Tools/archive/%{spirv_tools_commit}/spirv-tools-%{spirv_tools_shortcommit}.tar.gz Source6: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-%{llvm_ver}.tar.gz %endif Patch0: 0001-Use-Module-print-instead-of-Module-dump.patch # This is just for Intel GPUs ExclusiveArch: x86_64 BuildRequires: cmake BuildRequires: make BuildRequires: git BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: flex BuildRequires: bison BuildRequires: python3 BuildRequires: python3-mako BuildRequires: python3-pyyaml BuildRequires: zlib-devel BuildRequires: libffi-devel BuildRequires: libunwind-devel #This pkg is needed with system headers or without BuildRequires: spirv-tools-devel %if 0%{?use_system_headers} BuildRequires: llvm%{?llvm_compat}-devel BuildRequires: lld%{?llvm_compat}-devel BuildRequires: libxml2-devel BuildRequires: clang%{?llvm_compat} BuildRequires: clang-tools-extra BuildRequires: spirv-headers-devel BuildRequires: intel-opencl-clang-devel BuildRequires: spirv-llvm-translator%{?llvm_compat}-devel BuildRequires: spirv-llvm-translator%{?llvm_compat}-tools %else BuildRequires: chrpath %endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} # Unfortunately, it isn't trivially posible to build with prebuilt vc-intrinsics Provides: bundled(intel-vc-intrinsics) # For RHEL builds, we bundle quite a few things %if ! 0%{?use_system_headers} Provides: bundled(llvm) Provides: bundled(opencl-clang) Provides: bundled(spirv-llvm-translator) Provides: bundled(spirv-headers) Provides: bundled(spirv-tools) %endif %description The Intel Graphics Compiler for OpenCL is an LLVM based compiler for OpenCL targeting Intel Gen graphics hardware architecture. %package devel Summary: Intel Graphics Compiler Frontend - Devel Files Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Devel files for Intel Graphics Compiler for OpenCL. %package libs Summary: Intel Graphics Compiler Frontend - Library Files Requires: %{name} = %{version}-%{release} %description libs Library files for Intel Graphics Compiler for OpenCL. %prep tar -xf %{SOURCE1} %autosetup -n intel-graphics-compiler-%{version} -p1 -S git #This setup is needed for the bundled libraries build in RHEL %if ! 0%{?use_system_headers} # LLVM monorepo tarball mkdir -p %{_builddir}/llvm-project tar -xf %{SOURCE6} -C %{_builddir}/llvm-project --strip-components=1 # opencl-clang and SPIRV-LLVM-Translator extract directly into LLVM's projects/ rm -rf %{_builddir}/llvm-project/llvm/projects/opencl-clang \ %{_builddir}/llvm-project/llvm/projects/llvm-spirv mkdir -p %{_builddir}/llvm-project/llvm/projects/opencl-clang \ %{_builddir}/llvm-project/llvm/projects/llvm-spirv tar -xf %{SOURCE2} -C %{_builddir}/llvm-project/llvm/projects/opencl-clang --strip-components=1 tar -xf %{SOURCE3} -C %{_builddir}/llvm-project/llvm/projects/llvm-spirv --strip-components=1 # SPIRV-Headers and SPIRV-Tools live standalone (referenced by IGC cmake flags) mkdir -p %{_builddir}/SPIRV-Headers %{_builddir}/SPIRV-Tools tar -xf %{SOURCE4} -C %{_builddir}/SPIRV-Headers --strip-components=1 tar -xf %{SOURCE5} -C %{_builddir}/SPIRV-Tools --strip-components=1 # IGC cmake copies .git into the LLVM staging dir and uses git am to apply # opencl-clang patches to clang and llvm. Keep at clang/ and llvm/docs/ # adjust the directories if needed, when patches change. git config --global user.email "build@localhost" git config --global user.name "build" # Disable background gc/maintenance: it can mutate .git while IGC's cmake building git config --global gc.auto 0 git config --global maintenance.auto false git -C %{_builddir}/llvm-project init -q git -C %{_builddir}/llvm-project add -f clang/ llvm/docs git -C %{_builddir}/llvm-project commit -q -m "llvmorg-%{llvm_ver}" %endif %build # TODO: Please submit an issue to upstream (rhbz#2380657) export CMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DIGC_API_PATCH_VERSION=%{igc_patch} \ -DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \ -DIGC_BUILD__VC_ENABLED=ON \ -DIGC_OPTION__VC_INTRINSICS_MODE=Source \ -DVC_INTRINSICS_SRC="%{_builddir}/vc-intrinsics-%{vc_commit}" \ -DIGC_OPTION__LLVM_PREFERRED_VERSION=%{llvm_ver} \ %if 0%{?use_system_headers} -DIGC_OPTION__LLD_MODE=Prebuilds \ -DIGC_OPTION__LLVM_MODE=Prebuilds \ -DLLVM_ROOT=%{_libdir}/llvm%{?llvm_compat}/ \ -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \ -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \ -DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds \ -DIGC_OPTION__USE_PREINSTALLED_SPIRV_HEADERS=ON \ -DIGC_OPTION__CLANG_MODE=Prebuilds \ %else -DIGC_OPTION__LLVM_MODE=Source \ -DIGC_OPTION__SPIRV_TOOLS_MODE=Source \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="%{_builddir}/SPIRV-Headers" \ %endif -Wno-dev \ -G Ninja %cmake_build %install %cmake_install %if ! 0%{?use_system_headers} # Change permissions otherwise opencl install will fail chmod +x %{buildroot}%{_libdir}/libopencl-clang.so.%{llvm_sover} # Strip the empty rpath, otherwise check-rpaths fails the build chrpath -d %{buildroot}%{_libdir}/libopencl-clang.so.%{llvm_sover} # Removes additional non-essential symbols beyond what find-debuginfo.sh strips. # These files end up being huge. This cuts the debuginfo libs pkg in half strip --strip-unneeded %{buildroot}%{_libdir}/libopencl-clang.so.%{llvm_sover} %{buildroot}%{_libdir}/libigdfcl.so.* %endif %files %{_bindir}/iga64 %files libs %license LICENSE.md %license %{_libdir}/igc2/NOTICES.txt %dir %{_libdir}/igc2/ %{_libdir}/libiga64.so.2.* %{_libdir}/libigc.so.2.*+* %{_libdir}/libigdfcl.so.2.* %if ! 0%{?use_system_headers} %{_libdir}/libopencl-clang.so.%{llvm_sover} %{_includedir}/opencl-c.h %{_includedir}/opencl-c-base.h %endif %files devel %{_libdir}/libiga64.so.2 %{_libdir}/libiga64.so %{_libdir}/libigc.so.2 %{_libdir}/libigc.so %{_libdir}/libigdfcl.so.2 %{_libdir}/libigdfcl.so %{_includedir}/igc %{_includedir}/iga %{_includedir}/visa %{_libdir}/pkgconfig/igc-opencl.pc %changelog ## START: Generated by rpmautospec * Fri Sep 18 2026 Androniychuk, Pavel - 2.41.9-1 - New release 2.41.9 * Tue Jul 21 2026 Androniychuk, Pavel - 2.36.3-3 - Fix .git issues during koji build * Thu Jul 16 2026 Fedora Release Engineering - 2.36.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Tue Jul 14 2026 Androniychuk, Pavel - 2.36.3-1 - New release 2.36.3 * Tue Jun 09 2026 Androniychuk, Pavel - 2.34.4-2 - Add patch for LLVM15 segfault * Mon May 18 2026 Androniychuk, Pavel - 2.34.4-1 - New version v2.34.4 * Tue May 12 2026 Androniychuk, Pavel - 2.30.3-4 - RHEL: disable dwz * Fri May 08 2026 Androniychuk, Pavel - 2.30.3-3 - RHEL: fix build and other things * Wed May 06 2026 Androniychuk, Pavel - 2.30.3-2 - RHEL: Add bundled spirv-headers/tools/translator llvm and intel-opencl- clang * Mon Apr 13 2026 Androniychuk, Pavel - 2.30.3-1 - New version v2.30.3 * Mon Mar 30 2026 Androniychuk, Pavel - 2.30.2-1 - New release v2.30.2 * Mon Feb 16 2026 Cristian Le - 2.24.8-5 - Allow to build with CMake 4.0 (rhbz#2380657) * Thu Jan 15 2026 Androniychuk, Pavel - 2.24.8-3 - Rebuild on intel-opencl-clang change * Wed Jan 14 2026 Androniychuk, Pavel - 2.24.8-2 - Add clang-tools-extra to build reqs * Wed Jan 14 2026 Androniychuk, Pavel - 2.24.8-1 - Update to version 2.24.8 * Fri Dec 19 2025 Androniychuk, Pavel - 2.20.5-1 - Update igc to v2.20.5 * Fri Nov 07 2025 Androniychuk, Pavel - 2.20.4-1 - Update to v2.20.4 * Wed Oct 08 2025 František Zatloukal - 2.18.5-2 - Update .gitignore * Wed Oct 01 2025 Androniychuk, Pavel - 2.18.5-1 - Update to v2.18.5 * Thu Aug 28 2025 Androniychuk, Pavel - 2.16.0-1 - Update to v2.16.0 * Wed Aug 06 2025 Androniychuk, Pavel - 2.14.4-1 - Update to v2.14.4 * Thu Jul 24 2025 Fedora Release Engineering - 2.12.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Mon Jul 07 2025 Androniychuk, Pavel - 2.12.7-1 - Update to v2.12.7 * Thu Jun 26 2025 František Zatloukal - 2.12.5-1 - intel-igc-2.12.5 * Mon Jun 23 2025 Androniychuk, Pavel - 2.11.10-1 - Update to v2.11.10 * Thu Feb 13 2025 František Zatloukal - 2.7.8-1 - intel-igc-2.7.8 (RHBZ#2314527 , RHBZ#2340651) * Fri Jan 17 2025 Fedora Release Engineering - 1.0.17791.18-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Tue Dec 03 2024 František Zatloukal - 1.0.17791.18-2 - Rebuild * Tue Nov 26 2024 Ali Erdinc Koroglu - 1.0.17791.18-1 - Updated to 1.0.17791.18 * Tue Sep 24 2024 František Zatloukal - 1.0.17657.8-1 - intel-igc-1.0.17657.8 (RHBZ#2274079) * Fri Aug 02 2024 František Zatloukal - 1.0.17224.11-1 - intel-igc-1.0.17224.11 * Thu Jul 18 2024 Fedora Release Engineering - 1.0.16510.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed Apr 03 2024 František Zatloukal - 1.0.16510.1-1 - intel-igc-1.0.16510.1 (Fixes RHBZ#2272871) * Wed Mar 27 2024 Frantisek Zatloukal - 1.0.16510.0-1 - intel-igc-1.0.16510.0 * Wed Jan 24 2024 Fedora Release Engineering - 1.0.15313.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 1.0.15313.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Oct 06 2023 Frantisek Zatloukal - 1.0.15313.1-1 - intel-igc-1.0.15313.1 (fixes RHBZ#2183055) - Switch to llvm 17 compat package * Thu Jul 20 2023 Fedora Release Engineering - 1.0.13700.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Mar 27 2023 Frantisek Zatloukal - 1.0.13700.7-1 - intel-igc-1.0.13700.7 (fixes RHBZ#2177378 ) * Mon Mar 06 2023 Frantisek Zatloukal - 1.0.13463.1-1 - intel-igc-1.0.13463.1 (fixes RHBZ#2175129 ) * Fri Feb 17 2023 Frantisek Zatloukal - 1.0.13230.4-1 - intel-igc-1.0.13230.4 * Thu Jan 19 2023 Fedora Release Engineering - 1.0.12812.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Nov 29 2022 Frantisek Zatloukal - 1.0.12812.4-1 - intel-igc-1.0.12812.4 - LLVM 15 Support (fixes RHBZ#2127746 ) * Mon Sep 19 2022 Pete Walter - 1.0.12149-2 - Rebuild for llvm 15 * Fri Sep 16 2022 Frantisek Zatloukal - 1.0.12149.1-1 - intel-igc-1.0.12149.1 * Thu Sep 08 2022 Frantisek Zatloukal - 1.0.12149-1 - intel-igc-1.0.12149 * Tue Aug 30 2022 Frantisek Zatloukal - 1.0.12037.1-1 - intel-igc-1.0.12037.1 * Tue Aug 09 2022 Frantisek Zatloukal - 1.0.12037.1-1 - intel-igc-1.0.11702.1 * Thu Jul 21 2022 Fedora Release Engineering - 1.0.11485-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jul 01 2022 Frantisek Zatloukal - 1.0.11485-1 - intel-igc-1.0.11485 * Sun May 29 2022 Frantisek Zatloukal - 1.0.11279-1 - intel-igc-1.0.11279 - add LLVM 13 and 14 patches * Thu Mar 31 2022 Frantisek Zatloukal - 1.0.10778-1 - intel-igc-1.0.10778 * Sat Mar 19 2022 Frantisek Zatloukal - 1.0.10409-1 - intel-igc-1.0.10409 - use system spirv * Thu Feb 24 2022 Frantisek Zatloukal - 1.0.10395-1 - intel-igc-1.0.10395 * Thu Feb 24 2022 Frantisek Zatloukal - 1.0.10395-1 - intel-igc-1.0.10395 * Fri Feb 18 2022 Frantisek Zatloukal - 1.0.10200-1 - intel-igc-1.0.10200 * Mon Dec 27 2021 Frantisek Zatloukal - 1.0.9933-1 - Initial package ## END: Generated by rpmautospec