summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRanieri Althoff2020-02-04 04:55:47 -0300
committerRanieri Althoff2020-02-04 04:55:47 -0300
commitbcf0f75ee3d9a9dbf3bbdb9ea5b34c9eb9916fa8 (patch)
tree16ca2bf2029ca7cbb9d6759aa6547a266e486df6
parent3595582a0882d75e7153c12e8464499bfd5e2e27 (diff)
downloadaur-bcf0f75ee3d9a9dbf3bbdb9ea5b34c9eb9916fa8.tar.gz
v3.0.0-3
- Add patch to trim useless artifacts - Cleanup scripts - Fix licenses
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD30
-rw-r--r--rocm-opencl-runtime-3.0.0-change-install-location.patch140
3 files changed, 165 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 75471e9e55b..ad8a2d91a03 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,13 @@
pkgbase = rocm-opencl-runtime
- pkgdesc = Radeon Open Compute - OpenCL runtime
pkgver = 3.0.0
- pkgrel = 2
- url = https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime
+ pkgrel = 3
+ url = https://github.com/RadeonOpenCompute
arch = x86_64
- license = MIT
makedepends = mesa
makedepends = cmake
makedepends = git
makedepends = llvm-roc
makedepends = rocm-comgr
- depends = roct-thunk-interface>=3.0.0
- depends = rocr-runtime>=3.0.0
- depends = opencl-icd-loader
provides = rocm-device-libs
provides = opencl-driver
source = rocm-device-libs::git+https://github.com/RadeonOpenCompute/ROCm-Device-Libs#tag=roc-ocl-3.0.0
@@ -21,20 +16,25 @@ pkgbase = rocm-opencl-runtime
source = opencl-icd-loader::git+https://github.com/KhronosGroup/OpenCL-ICD-Loader#commit=978b4b3a29a3aebc86ce9315d5c5963e88722d03
source = rocm-opencl-runtime-2.8.0-change-AMDCompilerh.patch
source = rocm-opencl-runtime-2.8.0-change-opencl.patch
- source = rocm-opencl-runtime-2.8.0-update-README.patch
source = rocm-opencl-runtime-2.8.0-amdocl64icd.patch
- source = fix_rocm_opencl_build_order.patch
+ source = rocm-opencl-runtime-3.0.0-change-install-location.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 07c437ff43942a90a658986f88d5df3d5159af3d5c506aa8d1d7281fbb74d7be
sha256sums = 3af5c9c3b8b88b78a2fd574f339e88a5cd62c365d94e9289c2a2cb4afef3d435
- sha256sums = 9b72ea0101c39a0e67c94d0907061fe493bd0765d884585b2e55d51fafc99fff
sha256sums = 2cfd11bda9a485d6de2231c56742ad553329cab9b6dcc009dbddbcde1436f485
- sha256sums = 0f735299810e9e22cd57f5b96a7628a0f399d445a1f3bacefd8b890e84ca372f
+ sha256sums = 941a29f8704a2839c32bcf3cf374dde30bc8a839c1136d4faa65c60a7500cf98
pkgname = rocm-device-libs
+ pkgdesc = Radeon Open Compute - device libs
+ license = unknown
pkgname = rocm-opencl-runtime
+ pkgdesc = Radeon Open Compute - OpenCL runtime
+ license = MIT
+ depends = roct-thunk-interface>=3.0.0
+ depends = rocr-runtime>=3.0.0
+ depends = opencl-icd-loader
diff --git a/PKGBUILD b/PKGBUILD
index fd3f6222038..390043cc811 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,13 +4,10 @@ _opencl_icd_loader_commit='978b4b3a29a3aebc86ce9315d5c5963e88722d03'
pkgbase=rocm-opencl-runtime
pkgname=(rocm-device-libs rocm-opencl-runtime)
-pkgdesc='Radeon Open Compute - OpenCL runtime'
pkgver=3.0.0
-pkgrel=2
+pkgrel=3
arch=('x86_64')
-url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime'
-license=('MIT')
-depends=("roct-thunk-interface>=${pkgver}" "rocr-runtime>=${pkgver}" 'opencl-icd-loader')
+url='https://github.com/RadeonOpenCompute'
makedepends=(mesa cmake git llvm-roc rocm-comgr)
provides=("$pkgname" 'opencl-driver')
source=(
@@ -20,12 +17,8 @@ source=(
"opencl-icd-loader::git+https://github.com/KhronosGroup/OpenCL-ICD-Loader#commit=${_opencl_icd_loader_commit}"
"rocm-opencl-runtime-2.8.0-change-AMDCompilerh.patch"
"rocm-opencl-runtime-2.8.0-change-opencl.patch"
- "rocm-opencl-runtime-2.8.0-update-README.patch"
"rocm-opencl-runtime-2.8.0-amdocl64icd.patch"
-
- # Fix build missing dependency
- # https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/64#issuecomment-473502685
- 'fix_rocm_opencl_build_order.patch'
+ "rocm-opencl-runtime-3.0.0-change-install-location.patch"
)
sha256sums=('SKIP'
@@ -34,9 +27,8 @@ sha256sums=('SKIP'
'SKIP'
'07c437ff43942a90a658986f88d5df3d5159af3d5c506aa8d1d7281fbb74d7be'
'3af5c9c3b8b88b78a2fd574f339e88a5cd62c365d94e9289c2a2cb4afef3d435'
- '9b72ea0101c39a0e67c94d0907061fe493bd0765d884585b2e55d51fafc99fff'
'2cfd11bda9a485d6de2231c56742ad553329cab9b6dcc009dbddbcde1436f485'
- '0f735299810e9e22cd57f5b96a7628a0f399d445a1f3bacefd8b890e84ca372f')
+ '941a29f8704a2839c32bcf3cf374dde30bc8a839c1136d4faa65c60a7500cf98')
prepare() {
cd "$srcdir/rocm-opencl-runtime"
@@ -75,6 +67,7 @@ build() {
cd "$srcdir/rocm-device-libs"
mkdir -p build && cd build
cmake ${CMAKE_FLAGS[@]} \
+ -DCMAKE_INSTALL_PREFIX=/opt/rocm \
-DPREPARE_BUILTINS="$srcdir/rocm-device-libs/utils/utils/prepare-builtins/prepare-builtins" \
..
make
@@ -83,6 +76,8 @@ build() {
cd "$srcdir/rocm-opencl-runtime"
mkdir -p build && cd build
cmake ${CMAKE_FLAGS[@]} \
+ -DCMAKE_INSTALL_PREFIX=/opt/rocm \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_MODULE_PATH="$srcdir/rocm-cmake/share/rocm/cmake" \
-DUSE_COMGR_LIBRARY=yes \
-Damd_comgr_DIR='/opt/rocm/lib/cmake/amd_comgr' \
@@ -91,15 +86,18 @@ build() {
}
package_rocm-device-libs() {
+ pkgdesc='Radeon Open Compute - device libs'
+ license=('unknown')
+
DESTDIR="$pkgdir/" make -C "$srcdir/rocm-device-libs/build" install
}
package_rocm-opencl-runtime() {
- DESTDIR="$pkgdir/" make -C "$srcdir/rocm-opencl-runtime/build" install
+ pkgdesc='Radeon Open Compute - OpenCL runtime'
+ depends=("roct-thunk-interface>=${pkgver}" "rocr-runtime>=${pkgver}" 'opencl-icd-loader')
+ license=('MIT')
- # OpenCL vendor file
- mkdir -p "$pkgdir/etc/OpenCL/vendors"
- echo '/opt/rocm/lib/x86_64/libamdocl64.so' > "$pkgdir/etc/OpenCL/vendors/rocm-opencl64.icd"
+ DESTDIR="$pkgdir/" make -C "$srcdir/rocm-opencl-runtime/build" install
mkdir -p "$pkgdir/etc/ld.so.conf.d"
echo '/opt/rocm/lib' > "$pkgdir/etc/ld.so.conf.d/rocm-opencl.conf"
diff --git a/rocm-opencl-runtime-3.0.0-change-install-location.patch b/rocm-opencl-runtime-3.0.0-change-install-location.patch
new file mode 100644
index 00000000000..90580e450f7
--- /dev/null
+++ b/rocm-opencl-runtime-3.0.0-change-install-location.patch
@@ -0,0 +1,140 @@
+--- a/CMakeLists.txt 2019-12-28 09:34:17.470030419 +0100
++++ b/CMakeLists.txt 2019-12-28 09:32:14.939030886 +0100
+@@ -21,12 +21,19 @@
+
+ project(rocm-opencl)
+
++include (GNUInstallDirs)
++
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2" CACHE PATH "")
+
+ find_package(ROCT REQUIRED)
+ find_package(ROCR REQUIRED)
+
++find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "/opt/rocm/llvm" NO_DEFAULT_PATH)
++set(USE_COMGR_LIBRARY "yes")
++find_package(amd_comgr REQUIRED CONFIG)
++add_definitions(-DUSE_COMGR_LIBRARY)
++
+ # FIXME: Remove following if block after enabling COMGR by default
+ if (${USE_COMGR_LIBRARY} STREQUAL "no")
+ set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+@@ -39,29 +53,19 @@
+ # override default option value in library and driver
+ set(GENERIC_IS_ZERO ON CACHE BOOL ON FORCE)
+
+- add_subdirectory(compiler/llvm EXCLUDE_FROM_ALL)
+-
+- find_package(LLVM REQUIRED CONFIG PATHS ${CMAKE_BINARY_DIR}/compiler/llvm NO_DEFAULT_PATH)
++ find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "/opt/rocm/llvm" NO_DEFAULT_PATH)
+
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
+ include(AddLLVM)
+
+ add_definitions(${LLVM_DEFINITIONS})
+- # TODO: add find_package for Clang and lld, and also use LLVM/Clang variables got from their config
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/tools/clang/include)
+- include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/tools/clang/include)
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/tools/lld/include)
+-
+- # TODO: move AMDGPU.h header to include folder
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/lib/Target/AMDGPU)
+- include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/lib/Target/AMDGPU)
+
+ set(BUILD_HC_LIB OFF CACHE BOOL "")
+ set(ROCM_DEVICELIB_INCLUDE_TESTS OFF CACHE BOOL "")
+ set(AMDGCN_TARGETS_LIB_LIST "AMDGCN_LIB_TARGETS")
+ set(AMDGCN_TARGETS_LIB_DEPS "AMDGCN_DEP_TARGETS")
+ set(AMDGPU_TARGET_TRIPLE "amdgcn-amd-amdhsa")
+- add_subdirectory(library/amdgcn EXCLUDE_FROM_ALL)
++
+ add_subdirectory(compiler/driver EXCLUDE_FROM_ALL)
+
+ install(PROGRAMS $<TARGET_FILE:clang> $<TARGET_FILE:lld>
+@@ -77,22 +81,22 @@
+ endforeach()
+ endif() # if (${USE_COMGR_LIBRARY} STREQUAL "no")
+
+-if(${USE_COMGR_LIBRARY} MATCHES "yes")
+- set(COMGR_DYN_DLL "yes")
+- add_definitions(-DCOMGR_DYN_DLL)
+- add_definitions(-DUSE_COMGR_LIBRARY)
+- if( ${BUILD_HIP} MATCHES "yes")
+- add_subdirectory(api/hip)
+- endif()
+-endif()
++#if(${USE_COMGR_LIBRARY} MATCHES "yes")
++# set(COMGR_DYN_DLL "yes")
++# add_definitions(-DCOMGR_DYN_DLL)
++# add_definitions(-DUSE_COMGR_LIBRARY)
++# if( ${BUILD_HIP} MATCHES "yes")
++# add_subdirectory(api/hip)
++# endif()
++#endif()
+
+ add_subdirectory(api/opencl/amdocl)
+ add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
+ add_subdirectory(runtime)
+-add_subdirectory(tools/clinfo)
++#add_subdirectory(tools/clinfo)
+
+ set(BUILD_SHARED_LIBS "Build shared libs" ON)
+-add_subdirectory(api/opencl/khronos/icd)
++#add_subdirectory(api/opencl/khronos/icd)
+
+ ###--- Packaging ------------------------------------------------------------###
+
+@@ -101,31 +105,31 @@
+ rocm_setup_version( VERSION "2.0.0" )
+
+ # MAIN package
+-install(PROGRAMS $<TARGET_FILE:clinfo>
+- DESTINATION bin/x86_64
+- COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:clinfo>
++# DESTINATION bin/x86_64
++# COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+- DESTINATION lib/x86_64
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib/x86_64
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib/x86_64
++ DESTINATION lib
+ COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:OpenCL>
++# DESTINATION lib/x86_64
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
++# DESTINATION lib/x86_64
++# COMPONENT MAIN)
+
+ # DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/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/x86_64
+- COMPONENT DEV)
++#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/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/x86_64
++# COMPONENT DEV)
+
+ # Generic CPACK variables
+ set(CPACK_GENERATOR "DEB;RPM" CACHE STRING "Default packaging generators")