summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch11
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch14
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch29
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch25
-rw-r--r--gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch65
5 files changed, 57 insertions, 87 deletions
diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
index c91d273f92..fc2c74718a 100644
--- a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
+++ b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
@@ -11,11 +11,11 @@ Without these additional required dependencies, linking fails with errors such a
  CMakeLists.txt | 20 ++++++++++++++++++--
  1 file changed, 18 insertions(+), 2 deletions(-)
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1794a07..c7b852a 100644
+diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt
+index 8b5ca2f..a7d226f 100644
 --- a/lib/comgr/CMakeLists.txt
 +++ b/lib/comgr/CMakeLists.txt
-@@ -207,7 +207,11 @@ install(FILES
+@@ -294,7 +294,11 @@ install(FILES
    DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
  
  set(CLANG_LIBS
@@ -28,7 +28,7 @@ index 1794a07..c7b852a 100644
  
  set(LLD_LIBS
    lldELF
-@@ -218,8 +222,20 @@ if (LLVM_LINK_LLVM_DYLIB)
+@@ -305,8 +309,21 @@ if (LLVM_LINK_LLVM_DYLIB)
  else()
    llvm_map_components_to_libnames(LLVM_LIBS
      ${LLVM_TARGETS_TO_BUILD}
@@ -46,7 +46,8 @@ index 1794a07..c7b852a 100644
 +    IRReader
 +    CodeGen
 +    Linker
++    Demangle
 +    BinaryFormat)
  endif()
  
- target_link_libraries(amd_comgr
+ target_link_options(amd_comgr
diff --git a/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch b/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch
deleted file mode 100644
index d81bb0747f..0000000000
--- a/gnu/packages/patches/rocm-opencl-runtime-3.10.0-includes.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Add missing include dirs for ROCclr.
-
---- a/amdocl/CMakeLists.txt	2020-12-05 22:05:55.838529158 +0100
-+++ b/amdocl/CMakeLists.txt	2020-12-05 22:07:35.677524507 +0100
-@@ -23,6 +23,9 @@
- include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos)
- include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers)
- include_directories(${CMAKE_CURRENT_LIST_DIR}/../khronos/headers/opencl2.2)
-+include_directories(${ROCclr_DIR}/../../../include)
-+include_directories(${ROCclr_DIR}/../../../include/compiler/lib/include/)
-+include_directories(${ROCclr_DIR}/../../../include/elf/)
- 
- if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
-    (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang"))
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch
index 5709e0d19a..97376fd421 100644
--- a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch
@@ -4,25 +4,26 @@ diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
 index 76847d3..3f62bfe 100644
 --- a/CMakeLists.txt.orig
 +++ b/CMakeLists.txt
-@@ -72,7 +72,7 @@ find_package(ROCclr REQUIRED CONFIG
+@@ -15,9 +15,9 @@ option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward co
  
- add_subdirectory(khronos/icd)
+ 
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
+ #add_subdirectory(khronos/icd)
  add_subdirectory(amdocl)
 -add_subdirectory(tools/clinfo)
 +#add_subdirectory(tools/clinfo)
  add_subdirectory(tools/cltrace)
  if(BUILD_TESTS)
    add_subdirectory(tests/ocltst)
-@@ -108,9 +108,9 @@ endif()
- ###--- Packaging ------------------------------------------------------------###
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 48353eb..cd1e7c1 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -5,6 +5,6 @@ set(CPACK_COMPONENTS_ALL binary dev icd)
+ set(CPACK_DEB_COMPONENT_INSTALL ON)
+ set(CPACK_RPM_COMPONENT_INSTALL ON)
  
- # MAIN package
--install(PROGRAMS $<TARGET_FILE:clinfo>
--        DESTINATION bin
--        COMPONENT MAIN)
-+#install(PROGRAMS $<TARGET_FILE:clinfo>
-+#        DESTINATION bin
-+#        COMPONENT MAIN)
- install(PROGRAMS $<TARGET_FILE:cltrace>
-         DESTINATION lib
-         COMPONENT MAIN)
+-install(TARGETS clinfo DESTINATION bin COMPONENT binary)
++#install(TARGETS clinfo DESTINATION bin COMPONENT binary)
+ install(TARGETS amdocl DESTINATION lib COMPONENT binary)
+ install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION share/doc/${CMAKE_PROJECT_NAME} COMPONENT binary)
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch
deleted file mode 100644
index e0328d7734..0000000000
--- a/gnu/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Do not build and install cltrace.
-
-diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
-index c449db4..9cff673 100644
---- a/CMakeLists.txt.orig
-+++ b/CMakeLists.txt
-@@ -73,7 +73,7 @@ find_package(ROCclr REQUIRED CONFIG
- #add_subdirectory(khronos/icd)
- add_subdirectory(amdocl)
- #add_subdirectory(tools/clinfo)
--add_subdirectory(tools/cltrace)
-+#add_subdirectory(tools/cltrace)
- if(BUILD_TESTS)
-   add_subdirectory(tests/ocltst)
- endif()
-@@ -108,9 +108,6 @@ endif()
- #install(PROGRAMS $<TARGET_FILE:clinfo>
- #        DESTINATION bin
- #        COMPONENT MAIN)
--install(PROGRAMS $<TARGET_FILE:cltrace>
--        DESTINATION lib
--        COMPONENT MAIN)
- install(PROGRAMS $<TARGET_FILE:amdocl64>
-         DESTINATION lib
-         COMPONENT MAIN)
diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
index ed20f02503..9f80d7da9d 100644
--- a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
+++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch
@@ -2,36 +2,21 @@ Do not build and install libOpenCL.
 
 --- b/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -70,7 +70,7 @@
-     ${ROCclr_DIR}
-     ${LIBROCclr_STATIC_DIR})
+@@ -15,9 +15,9 @@ option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward co
  
+ 
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
 -add_subdirectory(khronos/icd)
 +#add_subdirectory(khronos/icd)
  add_subdirectory(amdocl)
- #add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/clinfo)
  add_subdirectory(tools/cltrace)
-@@ -93,9 +93,6 @@
-     OUTPUT_VARIABLE OPENCL_VERSION_GITDATE
-     OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(BUILD_TESTS)
+   add_subdirectory(tests/ocltst)
+@@ -25,16 +25,6 @@ endif()
+ 
+ ###--- Packaging ------------------------------------------------------------###
  
--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
@@ -41,15 +26,26 @@ Do not build and install libOpenCL.
 -        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
+ #############################
+@@ -53,8 +43,8 @@ if (DEFINED ROCM_PATCH_VERSION)
+   set(OPENCL_AMD_ICD_FILE "amdocl64_${ROCM_PATCH_VERSION}.icd")
+ endif()
+ 
+-get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION)
+-get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION)
++#get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION)
++#get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION)
+ 
+ #Set Package Version
+ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+diff --git a/khronos/icd/CMakeLists.txt b/khronos/icd/CMakeLists.txt
+index 4bafa86..987dd6f 100644
 --- 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 @@
+@@ -132,7 +132,7 @@ if (BUILD_TESTING)
      add_subdirectory (test)
  endif()
  
@@ -61,3 +57,14 @@ Do not build and install libOpenCL.
 +#    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 +#    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
 +#    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 48353eb..cd1e7c1 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -17,5 +17,5 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL
+         PATTERN cl_dx9_media_sharing.h EXCLUDE
+         PATTERN cl_egl.h EXCLUDE )
+ 
+-install(TARGETS OpenCL DESTINATION lib COMPONENT icd )
++#install(TARGETS OpenCL DESTINATION lib COMPONENT icd )
+ install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION share/doc/rocm-ocl-icd COMPONENT icd)