From: Andreas Beckmann Date: Sun, 6 Aug 2023 13:50:40 +0000 (+0200) Subject: [PATCH 41/42] disable the device if kernellib or cpu detection failed X-Git-Tag: archive/raspbian/4.0-3+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f372b8d3965293b52e84f5f218e386fbf1089c03;p=pocl.git [PATCH 41/42] disable the device if kernellib or cpu detection failed Gbp-Pq: Name 0041-disable-the-device-if-kernellib-or-cpu-detection-fai.patch --- diff --git a/lib/CL/devices/common.c b/lib/CL/devices/common.c index 4b2e3f5..01803a5 100644 --- a/lib/CL/devices/common.c +++ b/lib/CL/devices/common.c @@ -1663,6 +1663,8 @@ pocl_init_default_device_infos (cl_device_id dev) #if defined(KERNELLIB_HOST_DISTRO_VARIANTS) dev->kernellib_name = pocl_get_distro_kernellib_name (); dev->llvm_cpu = pocl_get_distro_cpu_name (dev->kernellib_name); + if (!dev->kernellib_name || !dev->llvm_cpu) + dev->available = CL_FALSE; #elif defined(HOST_CPU_FORCED) dev->kernellib_name = OCL_KERNEL_TARGET_CPU; dev->llvm_cpu = OCL_KERNEL_TARGET_CPU;