summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2021-08-06 08:27:32 +0200
committerLars-Dominik Braun <lars@6xq.net>2021-08-08 16:47:56 +0200
commitc0f10a5dd4be70a990223b707be1067f6982c4ae (patch)
treebc148f8a37719b502345bf2307e2f1ceffff7428 /gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
parent7221722dd53e466846ba6467373f7a71b28091e9 (diff)
downloadguix-patches-c0f10a5dd4be70a990223b707be1067f6982c4ae.tar
guix-patches-c0f10a5dd4be70a990223b707be1067f6982c4ae.tar.gz
gnu: Add rocm-opencl-runtime.
* gnu/packages/rocm.scm (rocm-opencl-runtime): New variable. * gnu/packages/patches/rocm-opencl-runtime-3.10.0-add-rocclr-include-directories.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch')
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
new file mode 100644
index 0000000000..ed20f02503
--- /dev/null
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
@@ -0,0 +1,63 @@
+Do not build and install libOpenCL.
+
+--- b/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,7 +70,7 @@
+ ${ROCclr_DIR}
+ ${LIBROCclr_STATIC_DIR})
+
+-add_subdirectory(khronos/icd)
++#add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+ #add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/cltrace)
+@@ -93,9 +93,6 @@
+ OUTPUT_VARIABLE OPENCL_VERSION_GITDATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+-get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION)
+-get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION)
+-
+ find_package(ROCM QUIET CONFIG PATHS /opt/rocm)
+
+ if(ROCM_FOUND)
+@@ -117,25 +114,6 @@
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+ DESTINATION lib
+ COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-
+-# DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL"
+- DESTINATION include
+- COMPONENT DEV
+- USE_SOURCE_PERMISSIONS
+- PATTERN cl_d3d10.h EXCLUDE
+- PATTERN cl_d3d11.h EXCLUDE
+- PATTERN cl_dx9_media_sharing.h EXCLUDE
+- PATTERN cl_egl.h EXCLUDE)
+-install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT DEV)
+
+ #############################
+ # Packaging steps
+--- a/khronos/icd/CMakeLists.txt 2020-06-07 16:05:32.425022904 +0200
++++ b/khronos/icd/CMakeLists.txt 2020-06-07 16:06:03.273022786 +0200
+@@ -132,7 +132,7 @@
+ add_subdirectory (test)
+ endif()
+
+-install (TARGETS OpenCL
+- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++#install (TARGETS OpenCL
++# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})