diff options
author | Demyan Rogozhin <Demyan.Rogozhin@gmail.com> | 2020-09-15 19:16:19 +0200 |
---|---|---|
committer | Daniƫl de Kok <me@danieldk.eu> | 2020-09-30 19:16:24 +0200 |
commit | 26d930cb76b475986f7b01cfeddd036d01b7be29 (patch) | |
tree | b96b6f8662b7e201a8abb0d59e3ea3abf7ad04d4 /pkgs/tools/system/opencl-info | |
parent | 9232ca2ac1d120526c30f1f90a69fe8db23437c8 (diff) |
opencl-info: fix build
Diffstat (limited to 'pkgs/tools/system/opencl-info')
-rw-r--r-- | pkgs/tools/system/opencl-info/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff | 22 |
2 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/system/opencl-info/default.nix b/pkgs/tools/system/opencl-info/default.nix index a5013a688855a..34295c90ae435 100644 --- a/pkgs/tools/system/opencl-info/default.nix +++ b/pkgs/tools/system/opencl-info/default.nix @@ -10,6 +10,14 @@ stdenv.mkDerivation { sha256 = "114lxgnjg40ivjjszkv4n3f3yq2lbrvywryvbazf20kqmdz7315l"; }; + patches = [ + # The cl.hpp header was removed from opencl-clhpp. This patch + # updates opencl-info to use the new cp2.hpp header. + # + # Submitted upstream: https://github.com/marchv/opencl-info/pull/2 + ./opencl-info-clhpp2.diff + ]; + buildInputs = [ opencl-clhpp ocl-icd ]; NIX_LDFLAGS = "-lOpenCL"; diff --git a/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff b/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff new file mode 100644 index 0000000000000..013222beebf74 --- /dev/null +++ b/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff @@ -0,0 +1,22 @@ +diff --git a/opencl-info.cpp b/opencl-info.cpp +index a23015d..a6de0c1 100644 +--- a/opencl-info.cpp ++++ b/opencl-info.cpp +@@ -7,7 +7,7 @@ + #if defined(__APPLE__) || defined(__MACOSX) + # include <OpenCL/cl.hpp> + #else +-# include <CL/cl.hpp> ++# include <CL/cl2.hpp> + #endif + + #include <iostream> +@@ -130,7 +130,7 @@ int main() { + PconstEnd; + P(device, CL_DEVICE_LOCAL_MEM_SIZE); + Pbool(device, CL_DEVICE_ERROR_CORRECTION_SUPPORT); +- Pbool(device, CL_DEVICE_HOST_UNIFIED_MEMORY); ++ // Pbool(device, CL_DEVICE_HOST_UNIFIED_MEMORY); /* Deprecated in 2.0 */ + P(device, CL_DEVICE_PROFILING_TIMER_RESOLUTION); + Pbool(device, CL_DEVICE_ENDIAN_LITTLE); + Pbool(device, CL_DEVICE_AVAILABLE); |