public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/intel-opencl-clang] f44: Merge branch 'rawhide' into f44
@ 2026-09-21 20:17 Pavel Androniychuk
0 siblings, 0 replies; only message in thread
From: Pavel Androniychuk @ 2026-09-21 20:17 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/intel-opencl-clang
Branch : f44
Commit : ea883319257d58651d76de705e1fdb8c483f7090
Author : Pavel Androniychuk <pavel.androniychuk@intel.com>
Date : 2026-09-21T13:16:18-07:00
Stats : +37/-27 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/intel-opencl-clang/c/ea883319257d58651d76de705e1fdb8c483f7090?branch=f44
Log:
Merge branch 'rawhide' into f44
---
diff --git a/.gitignore b/.gitignore
index 7dd72d6..a131307 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@
/intel-opencl-clang-2ce8d3f.tar.gz
/intel-opencl-clang-feac411.tar.gz
/intel-opencl-clang-02dcaa1.tar.gz
+/intel-opencl-clang-b953ece.tar.gz
+/SPIRV-LLVM-Translator-27afcfe.tar.gz
diff --git a/intel-opencl-clang.spec b/intel-opencl-clang.spec
index 1305749..63e5051 100644
--- a/intel-opencl-clang.spec
+++ b/intel-opencl-clang.spec
@@ -1,13 +1,20 @@
-%global commit 02dcaa1ce900da296d1b91ecdd6e1f1ff0f5ab70
+%global commit b953eceebb0abc6ea954a14545420e3f97540a77
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-# not compatible with newer clang versions
-%if 0%{?fedora} >= 38 || 0%{?rhel} >= 8
-%global llvm_compat 15
+%global llvm_ver 22
+
+# f44 ships LLVM 22 as the main package; f45+ provide llvm22 compat
+%if 0%{?fedora} >= 45
+%global llvm_compat %{llvm_ver}
+%global llvm_bindir %{_libdir}/llvm%{llvm_ver}/bin
+%global llvm_cmake %{_libdir}/llvm%{llvm_ver}/%{_lib}/cmake
+%else
+%global llvm_bindir %{_bindir}
+%global llvm_cmake %{_libdir}/cmake
%endif
Name: intel-opencl-clang
-Version: 15.0.9
+Version: 22.1.4
Release: %autorelease
Summary: Library to compile OpenCL C kernels to SPIR-V modules
@@ -16,17 +23,17 @@ URL: https://github.com/intel/opencl-clang
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
BuildRequires: cmake
-BuildRequires: clang%{?llvm_compat}
+BuildRequires: clang%{?llvm_compat}-devel
BuildRequires: gcc gcc-c++
-BuildRequires: libffi-devel
BuildRequires: make
+BuildRequires: ninja-build
+BuildRequires: libffi-devel
+BuildRequires: llvm%{?llvm_compat}
BuildRequires: llvm%{?llvm_compat}-devel
-BuildRequires: clang%{?llvm_compat}-devel
-%if %{?llvm_compat} == 15
-BuildRequires: spirv-llvm15.0-translator-devel
-%else
+BuildRequires: llvm%{?llvm_compat}-static
BuildRequires: spirv-llvm-translator%{?llvm_compat}-devel
-%endif
+BuildRequires: spirv-headers-devel
+BuildRequires: spirv-tools-devel
BuildRequires: zlib-devel
%description
@@ -43,13 +50,23 @@ developing against %{name}
%prep
%autosetup -n opencl-clang-%{commit} -p1
-sed -i 's/$<TARGET_FILE:clang>/$<TARGET_FILE:clang%{?llvm_compat}>/' cl_headers/CMakeLists.txt
+# compat clang keeps its resource dir in /usr/lib/clang/<major>, not under LLVM_LIBRARY_DIR
+sed -i -E 's|message\(FATAL_ERROR "\[OPENCL-CLANG\] Couldn.t find prebuilt LLVM include directory\."\)|set(OPENCL_HEADERS_DIR "%{_prefix}/lib/clang/%{llvm_ver}/include/")|' cl_headers/CMakeLists.txt
+grep -q 'OPENCL_HEADERS_DIR "/usr/lib/clang' cl_headers/CMakeLists.txt
%build
+export PATH=%{llvm_bindir}:$PATH
+LLVM_FULL_VER=$(llvm-config --version | sed 's/~.*//;s/git//')
+LLVM_MAJOR=$(echo "$LLVM_FULL_VER" | cut -d. -f1)
+if [ "$LLVM_MAJOR" != "%{llvm_ver}" ]; then
+ echo "Expected LLVM %{llvm_ver}, got $LLVM_FULL_VER" >&2
+ exit 1
+fi
+
%cmake \
- -USE_PREBUILT_LLVM=ON \
- -DPREFERRED_LLVM_VERSION='%(rpm -q --qf '%%{version}' llvm%{?llvm_compat}-devel | cut -d. -f1 | sed "s/$/.0.0/")' \
- -DLLVM_DIR=%{_libdir}/llvm%{?llvm_compat}/lib/cmake/llvm/ \
+ -DUSE_PREBUILT_LLVM=ON \
+ -DPREFERRED_LLVM_VERSION=$LLVM_FULL_VER \
+ -DLLVM_DIR=%{llvm_cmake}/llvm \
-DLLVMSPIRV_INCLUDED_IN_LLVM=OFF \
-DSPIRV_TRANSLATOR_DIR=/usr
%cmake_build
@@ -57,22 +74,13 @@ sed -i 's/$<TARGET_FILE:clang>/$<TARGET_FILE:clang%{?llvm_compat}>/' cl_headers/
%install
%cmake_install
-# This is ugly, but a combined behavior of LLVM_DIR=*/lib/* and LLVM_LIBDIR_SUFFIX=64 is borked
-%ifnarch i686
-mkdir -p %{buildroot}%{_libdir}/
-cp %{buildroot}/usr/lib/libopencl-clang.so.* %{buildroot}%{_libdir}/
-cp %{buildroot}/usr/lib/libopencl-clang.so %{buildroot}%{_libdir}/
-rm %{buildroot}/usr/lib/libopencl-clang.so.*
-rm %{buildroot}/usr/lib/libopencl-clang.so
-%endif
-
%files
%license LICENSE
%{_libdir}/libopencl-clang.so.*
%files devel
%{_libdir}/libopencl-clang.so
-%{_includedir}/cclang/common_clang.h
+%{_includedir}/cclang/opencl_clang.h
%{_includedir}/cclang/opencl-c.h
%{_includedir}/cclang/opencl-c-base.h
%{_includedir}/cclang/module.modulemap
diff --git a/sources b/sources
index 95eb503..5621bbc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (intel-opencl-clang-02dcaa1.tar.gz) = 8c65580c4efa3f79919865e226f56ef2451f76c156c658263326377823e49cf6072b10e03bd344a8e1f89f31aa556110b7316c941abfd9f54041303db7f50285
+SHA512 (intel-opencl-clang-b953ece.tar.gz) = 2c50ec5826c152092d0532f82670613ca5efb6d265561d9b99e6e9193a77bb9b1a8222261f88abdefd28c73b7c48dfb084162c429652ed6e8a227678f5341677
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-21 20:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 20:17 [rpms/intel-opencl-clang] f44: Merge branch 'rawhide' into f44 Pavel Androniychuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox