summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch')
-rw-r--r--dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch
new file mode 100644
index 000000000000..d70f0977ec8f
--- /dev/null
+++ b/dev-libs/rocm-opencl-driver/files/rocm-opencl-driver-2.6.0-install-correctly.patch
@@ -0,0 +1,49 @@
+https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/pull/85
+
+From 8819a684c9b6e154abedc041b3da545aab353d67 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 26 Jul 2019 15:54:59 -0400
+Subject: [PATCH] Use GNUInstallDirs to install to standard locations
+
+Some distributions require 64 bit libraries to be installed to lib64, for example.
+Using GNUInstallDirs ensures that files are installed to the expected locations.
+---
+ CMakeLists.txt | 3 +++
+ src/driver/CMakeLists.txt | 2 +-
+ src/roc-cl/CMakeLists.txt | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d1759b7..d21e9da 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -42,6 +42,9 @@
+
+ cmake_minimum_required(VERSION 2.8)
+
++## Include common cmake modules
++include ( GNUInstallDirs )
++
+ # Build ROCm-OpenCL-Driver with ccache if the package is present.
+ set(ROCM_OPENCL_DRIVER_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
+ if(ROCM_OPENCL_DRIVER_CCACHE_BUILD)
+diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
+index 7046e34..55ed13f 100644
+--- a/src/driver/CMakeLists.txt
++++ b/src/driver/CMakeLists.txt
+@@ -90,4 +90,4 @@ target_link_libraries(opencl_driver
+ target_link_libraries(opencl_driver ${llvm_libs})
+ target_include_directories(opencl_driver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
+-install(TARGETS opencl_driver DESTINATION lib)
++install(TARGETS opencl_driver DESTINATION ${CMAKE_INSTALL_LIBDIR} )
+diff --git a/src/roc-cl/CMakeLists.txt b/src/roc-cl/CMakeLists.txt
+index 5037453..a8e2801 100644
+--- a/src/roc-cl/CMakeLists.txt
++++ b/src/roc-cl/CMakeLists.txt
+@@ -54,4 +54,4 @@ link_directories(${LLVM_LIBRARY_DIRS})
+ add_executable(roc-cl ${sources})
+ target_link_libraries(roc-cl opencl_driver)
+
+-install(TARGETS roc-cl RUNTIME DESTINATION bin)
++install(TARGETS roc-cl RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )