The package rpms/intel-opencl-clang.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/intel-opencl-clang.git/commit/?id...
https://src.fedoraproject.org/cgit/rpms/intel-opencl-clang.git/commit/?id....
Change:
+%ifnarch i686
-ExcludeArch: armv7hl
Thanks.
Full change:
============
commit bbfdb7b04a4827e4244c0d4303e93616f5e88508
Author: František Zatloukal <fzatlouk(a)redhat.com>
Date: Fri Oct 6 00:04:20 2023 +0200
Do not shuffle libraries on 32 bit build
diff --git a/intel-opencl-clang.spec b/intel-opencl-clang.spec
index e443e25..c771b33 100644
--- a/intel-opencl-clang.spec
+++ b/intel-opencl-clang.spec
@@ -58,11 +58,13 @@ sed -i
's/$<TARGET_FILE:clang>/$<TARGET_FILE:clang%{?llvm_compat}>/'
cl_headers/
%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
commit cfa2b3ffd560c9fa70ff0adb01132ba0d837596c
Author: František Zatloukal <fzatlouk(a)redhat.com>
Date: Thu Oct 5 23:47:48 2023 +0200
Add forgotten patch
diff --git a/415.patch b/415.patch
new file mode 100644
index 0000000..c6cd729
--- /dev/null
+++ b/415.patch
@@ -0,0 +1,26 @@
+From 7798045b4177ac38995f87c4877f9acac1f3d03d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk(a)redhat.com>
+Date: Fri, 14 Apr 2023 11:45:57 +0200
+Subject: [PATCH] Fix standalone build
+
+Fixes
https://github.com/intel/opencl-clang/issues/406
+Fixes
https://github.com/intel/opencl-clang/issues/374
+---
+ cl_headers/CMakeLists.txt | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
+index 788adff..86df76f 100644
+--- a/cl_headers/CMakeLists.txt
++++ b/cl_headers/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ set(CL_HEADERS_LIB cl_headers)
+-set(CLANG_COMMAND $<TARGET_FILE:clang> )
++if(USE_PREBUILT_LLVM)
++ find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++else()
++ set(CLANG_COMMAND $<TARGET_FILE:clang>)
++endif()
+ if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
+ build_native_tool(clang CLANG_COMMAND)
+ endif()
commit f97b0ead85c8d08c3f5533f4f759b7df56b4f5ea
Author: František Zatloukal <fzatlouk(a)redhat.com>
Date: Fri Sep 29 23:21:05 2023 +0200
Rebase, switch to llvm 15 (Fixes RHBZ#2225928)
diff --git a/.gitignore b/.gitignore
index 9fa01b6..966f6f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/intel-opencl-clang-06c7c0d.tar.gz
/intel-opencl-clang-5dd5031.tar.gz
/intel-opencl-clang-c78c1f8.tar.gz
+/intel-opencl-clang-bc1d13e.tar.gz
diff --git a/intel-opencl-clang.spec b/intel-opencl-clang.spec
index f9115eb..e443e25 100644
--- a/intel-opencl-clang.spec
+++ b/intel-opencl-clang.spec
@@ -1,8 +1,11 @@
-%global toolchain clang
-
-%global commit c78c1f884ffe8b40e1681a90ebde1a919c08ddb1
+%global commit bc1d13ecc1c6f7aa5da3acf33165037d3fc5ed06
%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
+%endif
+
Name: intel-opencl-clang
Version: 15.0.0
Release: %autorelease
@@ -12,13 +15,21 @@ License: NCSA
URL:
https://github.com/intel/opencl-clang
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
-ExcludeArch: armv7hl
+#
https://github.com/intel/opencl-clang/pull/415
+Patch01: 415.patch
BuildRequires: cmake
+BuildRequires: clang%{?llvm_compat}
+BuildRequires: gcc
+BuildRequires: gcc-c++
BuildRequires: make
-BuildRequires: llvm-devel
-BuildRequires: clang-devel
-BuildRequires: spirv-llvm-translator-devel
+BuildRequires: llvm%{?llvm_compat}-devel
+BuildRequires: clang%{?llvm_compat}-devel
+%if %{?llvm_compat} == 15
+BuildRequires: spirv-llvm15.0-translator-devel
+%else
+BuildRequires: spirv-llvm-translator%{?llvm_compat}-devel
+%endif
BuildRequires: zlib-devel
%description
@@ -34,15 +45,25 @@ This package contains libraries and header files for
developing against %{name}
%prep
-%setup -q -n opencl-clang-%{commit}
+%autosetup -n opencl-clang-%{commit} -p1
+sed -i 's/$<TARGET_FILE:clang>/$<TARGET_FILE:clang%{?llvm_compat}>/'
cl_headers/CMakeLists.txt
%build
-%cmake -DPREFERRED_LLVM_VERSION='%(rpm -q --qf '%%{version}' llvm-devel | cut
-d. -f1 | sed "s/$/.0.0/")'
+%cmake \
+ -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/
%cmake_build
%install
%cmake_install
+# This is ugly, but a combined behavior of LLVM_DIR=*/lib/* and LLVM_LIBDIR_SUFFIX=64 is
borked
+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
+
%files
%license LICENSE
%{_libdir}/libopencl-clang.so.*
@@ -50,6 +71,9 @@ developing against %{name}
%files devel
%{_libdir}/libopencl-clang.so
%{_includedir}/cclang/common_clang.h
+%{_includedir}/cclang/opencl-c.h
+%{_includedir}/cclang/opencl-c-base.h
+%{_includedir}/cclang/module.modulemap
%changelog
%autochangelog
diff --git a/sources b/sources
index 9099db9..26e64c5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (intel-opencl-clang-c78c1f8.tar.gz) =
19e155875205f9623873f73f14ea20412fb5c241e56f271396dc24884bf5d69e044a90fc1dd1cef44ac8c852d0b326ae9a06929fbd46bc4c488bcf859cacd11f
+SHA512 (intel-opencl-clang-bc1d13e.tar.gz) =
560cb6b4facecc811e05447187926a91f9c73e866006f8c02a9f5d37c21a6c1ec80e14e0ac6624f5194d4071bd9d162987b276c46aceeced17f6bab56b540adf
commit a23cf61be5b775ad039dc35d3dbb1249e1143559
Author: František Zatloukal <fzatlouk(a)redhat.com>
Date: Thu Jul 27 19:30:52 2023 +0200
Convert to %autorelease and %autochangelog
[skip changelog]
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..aa757d9
--- /dev/null
+++ b/changelog
@@ -0,0 +1,23 @@
+* Thu Jul 20 2023 Fedora Release Engineering <releng(a)fedoraproject.org> - 15.0.0-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
+
+* Thu Jan 19 2023 Fedora Release Engineering <releng(a)fedoraproject.org> - 15.0.0-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
+
+* Mon Sep 26 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 15.0.0-2
+- Rebuild for spirv-llvm-translator against llvm 15
+
+* Fri Sep 16 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 15.0.0-1
+- Update to llvm 15
+
+* Thu Jul 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 14.0.0-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
+* Fri Jul 08 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 14.0.0-2
+- Bump to a later commit with bunch of fixes
+
+* Thu Mar 31 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 14.0.0-1
+- Update to llvm 14
+
+* Mon Dec 06 2021 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 13.0.0-1
+- Initial package
diff --git a/intel-opencl-clang.spec b/intel-opencl-clang.spec
index 3dded69..f9115eb 100644
--- a/intel-opencl-clang.spec
+++ b/intel-opencl-clang.spec
@@ -5,7 +5,7 @@
Name: intel-opencl-clang
Version: 15.0.0
-Release: 4%{?dist}
+Release: %autorelease
Summary: Library to compile OpenCL C kernels to SPIR-V modules
License: NCSA
@@ -52,26 +52,4 @@ developing against %{name}
%{_includedir}/cclang/common_clang.h
%changelog
-* Thu Jul 20 2023 Fedora Release Engineering <releng(a)fedoraproject.org> - 15.0.0-4
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Thu Jan 19 2023 Fedora Release Engineering <releng(a)fedoraproject.org> - 15.0.0-3
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Mon Sep 26 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 15.0.0-2
-- Rebuild for spirv-llvm-translator against llvm 15
-
-* Fri Sep 16 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 15.0.0-1
-- Update to llvm 15
-
-* Thu Jul 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 14.0.0-3
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Fri Jul 08 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 14.0.0-2
-- Bump to a later commit with bunch of fixes
-
-* Thu Mar 31 2022 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 14.0.0-1
-- Update to llvm 14
-
-* Mon Dec 06 2021 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 13.0.0-1
-- Initial package
+%autochangelog