public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Androniychuk, Pavel <pavel.androniychuk@intel.com>
To: git-commits@fedoraproject.org
Subject: [rpms/intel-opencl-clang] f45: New version release 22.x
Date: Mon, 21 Sep 2026 15:13:00 GMT	[thread overview]
Message-ID: <179000358028.1.2856736786048964082.rpms-intel-opencl-clang-c1e95e7ad878@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/intel-opencl-clang
Branch : f45
Commit : c1e95e7ad8788c6bcfc508ba61f66c57f13a7c16
Author : Androniychuk, Pavel <pavel.androniychuk@intel.com>
Date   : 2026-09-18T09:15:54-07:00
Stats  : +37/-27 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/intel-opencl-clang/c/c1e95e7ad8788c6bcfc508ba61f66c57f13a7c16?branch=f45

Log:
New version release 22.x

---
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

                 reply	other threads:[~2026-09-21 15:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179000358028.1.2856736786048964082.rpms-intel-opencl-clang-c1e95e7ad878@fedoraproject.org \
    --to=pavel.androniychuk@intel.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox