Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| cd1ad6c688 | |||
| 9dcc7a3f3a | |||
| e1e37500c2 | |||
| b2e344bd7f | |||
| 4df129c89c | |||
| 0b6ca373d4 | |||
| 7d086c11d6 | |||
| 6fd3292207 |
122
n_UsrShare-twopaths.patch
Normal file
122
n_UsrShare-twopaths.patch
Normal file
@@ -0,0 +1,122 @@
|
||||
--- ocl-icd-2.3.1/ocl_icd_loader.c.old 2025-04-10 12:42:45.754857000 +0200
|
||||
+++ ocl-icd-2.3.1/ocl_icd_loader.c 2025-04-10 17:47:11.576483000 +0200
|
||||
@@ -699,10 +699,14 @@ static void __initLayers( void ) {
|
||||
static void __initClIcd( void ) {
|
||||
debug_init();
|
||||
cl_uint num_icds = 0;
|
||||
+ cl_uint num_icds2 = 0;
|
||||
int is_dir = 0;
|
||||
DIR *dir = NULL;
|
||||
+ DIR *dir2 = NULL;
|
||||
const char* dir_path=getenv("OCL_ICD_VENDORS");
|
||||
const char* vendor_path=getenv("OPENCL_VENDOR_PATH");
|
||||
+ const char* vendor_path2="/usr/share/OpenCL/vendors";
|
||||
+ const char* dir_path2=NULL;
|
||||
if (! vendor_path || vendor_path[0]==0) {
|
||||
struct stat buf;
|
||||
int ret;
|
||||
@@ -711,14 +715,21 @@ static void __initClIcd( void ) {
|
||||
ret=stat(vendor_path, &buf);
|
||||
if (ret != 0) {
|
||||
debug(D_WARN, "Cannot stat '%s'. Trying /usr/share/OpenCL/vendors", vendor_path);
|
||||
- vendor_path="/usr/share/OpenCL/vendors";
|
||||
+ vendor_path=vendor_path2;
|
||||
+ vendor_path2=NULL;
|
||||
}
|
||||
} else {
|
||||
debug(D_DUMP, "OPENCL_VENDOR_PATH set to '%s', using it", vendor_path);
|
||||
+ vendor_path2=NULL;
|
||||
}
|
||||
if (! dir_path || dir_path[0]==0) {
|
||||
dir_path=vendor_path;
|
||||
- debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors path '%s'", dir_path);
|
||||
+ dir_path2=vendor_path2;
|
||||
+ if (! dir_path2 || dir_path2[0] == 0) {
|
||||
+ debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors path '%s'", dir_path);
|
||||
+ } else {
|
||||
+ debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors path '%s':'%s'", dir_path, dir_path2);
|
||||
+ }
|
||||
is_dir=1;
|
||||
}
|
||||
if (!is_dir) {
|
||||
@@ -737,7 +748,11 @@ static void __initClIcd( void ) {
|
||||
num_icds = 1;
|
||||
dir=NULL;
|
||||
} else {
|
||||
- debug(D_LOG,"Reading icd list from '%s'", dir_path);
|
||||
+ if (! dir_path2 || dir_path2[0] == 0) {
|
||||
+ debug(D_LOG,"Reading icd list from '%s'", dir_path);
|
||||
+ } else {
|
||||
+ debug(D_LOG,"Reading icd list from '%s':'%s'", dir_path, dir_path2);
|
||||
+ }
|
||||
dir = opendir(dir_path);
|
||||
if(dir == NULL) {
|
||||
if (errno == ENOTDIR) {
|
||||
@@ -748,12 +763,19 @@ static void __initClIcd( void ) {
|
||||
}
|
||||
|
||||
num_icds = _find_num_icds(dir);
|
||||
- if(num_icds == 0) {
|
||||
+
|
||||
+ if (dir_path2) {
|
||||
+ dir2 = opendir(dir_path2);
|
||||
+ if (dir2)
|
||||
+ num_icds2 = _find_num_icds(dir2);
|
||||
+ }
|
||||
+
|
||||
+ if((num_icds + num_icds2) == 0) {
|
||||
goto abort;
|
||||
}
|
||||
}
|
||||
|
||||
- _icds = (struct vendor_icd*)malloc(num_icds * sizeof(struct vendor_icd));
|
||||
+ _icds = (struct vendor_icd*)malloc((num_icds+num_icds2) * sizeof(struct vendor_icd));
|
||||
if (_icds == NULL) {
|
||||
goto abort;
|
||||
}
|
||||
@@ -772,17 +794,22 @@ static void __initClIcd( void ) {
|
||||
}
|
||||
} else {
|
||||
num_icds = _open_drivers(dir, dir_path);
|
||||
+ if (dir2)
|
||||
+ num_icds2 = _open_drivers(dir2, dir_path2);
|
||||
}
|
||||
- if(num_icds == 0) {
|
||||
+ if((num_icds+num_icds2) == 0) {
|
||||
goto abort;
|
||||
}
|
||||
|
||||
- _find_and_check_platforms(num_icds);
|
||||
+ _find_and_check_platforms(num_icds+num_icds2);
|
||||
if(_num_icds == 0){
|
||||
goto abort;
|
||||
}
|
||||
|
||||
- if (_num_icds < num_icds) {
|
||||
+ /* global variable magic ??? */
|
||||
+ _num_icds = num_icds + num_icds2;
|
||||
+
|
||||
+ if (_num_icds < (num_icds+num_icds2)) {
|
||||
_icds = (struct vendor_icd*)realloc(_icds, _num_icds * sizeof(struct vendor_icd));
|
||||
}
|
||||
debug(D_WARN, "%d valid vendor(s)!", _num_icds);
|
||||
@@ -790,6 +817,9 @@ static void __initClIcd( void ) {
|
||||
if (dir != NULL){
|
||||
closedir(dir);
|
||||
}
|
||||
+ if (dir2 != NULL){
|
||||
+ closedir(dir2);
|
||||
+ }
|
||||
__initLayers();
|
||||
return;
|
||||
abort:
|
||||
@@ -801,6 +831,9 @@ static void __initClIcd( void ) {
|
||||
if (dir != NULL){
|
||||
closedir(dir);
|
||||
}
|
||||
+ if (dir2 != NULL){
|
||||
+ closedir(dir2);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
BIN
ocl-icd-2.3.1.tar.gz
LFS
BIN
ocl-icd-2.3.1.tar.gz
LFS
Binary file not shown.
3
ocl-icd-2.3.4.tar.gz
Normal file
3
ocl-icd-2.3.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1a302b71b7304cca5a36f69d017b1af2b762cc4c2dd1c0c0e2fc1933db25c9cc
|
||||
size 109915
|
||||
@@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 20 08:13:41 UTC 2025 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.3.4
|
||||
* Fix sorting that would overwrite dispatch table.
|
||||
- Use %ldconfig_scriptlets macro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 10 13:23:01 UTC 2025 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- Update to version 2.3.3
|
||||
* Implement loader managed dispatch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 10 13:17:05 UTC 2025 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- Update to version 2.3.2
|
||||
* pkconfig support depends on OpenCL-Headers.pc being installed
|
||||
(since Khronos OpenCL Headers v2023.02.06)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 29 09:01:21 UTC 2025 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- improved previous changelog entry
|
||||
- added group tag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 11 12:06:32 UTC 2025 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- n_UsrShare-twopaths.patch (disabled for now)
|
||||
* first try to enable up to two paths for ICD files; i.e.
|
||||
/usr/share/OpenCL/vendors and /etc/OpenCL/vendors/
|
||||
(https://github.com/openSUSE/nvidia-driver-G06/issues/75); since
|
||||
it doesn't work, but just enables /usr/share/OpenCL/vendors
|
||||
if available, but not in addition to /etc/OpenCL/vendors/ the
|
||||
patch is disabled for now ...
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 11:52:00 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
||||
13
ocl-icd.spec
13
ocl-icd.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ocl-icd
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,15 +17,19 @@
|
||||
|
||||
|
||||
Name: ocl-icd
|
||||
Version: 2.3.1
|
||||
Version: 2.3.4
|
||||
Release: 0
|
||||
Summary: OpenCL ICD Bindings
|
||||
License: BSD-2-Clause
|
||||
Group: System/Libraries
|
||||
URL: https://github.com/OCL-dev/ocl-icd
|
||||
Source: https://github.com/OCL-dev/ocl-icd/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
# PATCH-FEATURE-OPENSUSE n_UsrShare.patch boo#1173005, comment#8
|
||||
Patch0: n_UsrShare.patch
|
||||
%ifarch dummy
|
||||
Patch1: n_UsrShare-twopaths.patch
|
||||
%endif
|
||||
BuildRequires: libtool
|
||||
BuildRequires: opencl-headers >= 2.2
|
||||
BuildRequires: pkgconfig
|
||||
@@ -82,9 +86,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
rm -rf instdocs
|
||||
mv %{buildroot}%{_datadir}/doc/%{name} instdocs
|
||||
|
||||
%post -n libOpenCL1 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libOpenCL1 -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets -n libOpenCL1
|
||||
|
||||
%check
|
||||
%make_build check
|
||||
@@ -97,6 +99,7 @@ mv %{buildroot}%{_datadir}/doc/%{name} instdocs
|
||||
%doc README NEWS
|
||||
%license COPYING
|
||||
%doc instdocs/*
|
||||
%{_bindir}/cllayerinfo
|
||||
%{_libdir}/libOpenCL.so
|
||||
%{_libdir}/pkgconfig/OpenCL.pc
|
||||
%{_libdir}/pkgconfig/ocl-icd.pc
|
||||
|
||||
Reference in New Issue
Block a user