summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch49
-rw-r--r--dev-libs/rocclr/rocclr-3.5.0.ebuild1
2 files changed, 50 insertions, 0 deletions
diff --git a/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch b/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch
new file mode 100644
index 00000000000..fc9bacee502
--- /dev/null
+++ b/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch
@@ -0,0 +1,49 @@
+From 98df37fc36b6276c26532e86e89be7e389745f4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Torsten=20Ke=C3=9Fler?= <t.kessler@posteo.de>
+Date: Sun, 19 Jul 2020 11:58:24 +0200
+Subject: [PATCH] Fix search for OpenCL include dirs
+
+---
+ CMakeLists.txt | 26 +++++++++-----------------
+ 1 file changed, 9 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 122277ee..02ca4644 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,26 +53,18 @@ find_package(amd_comgr REQUIRED CONFIG
+ )
+ message(STATUS "Code Object Manager found at ${amd_comgr_DIR}.")
+
+-# FIXME: Use find_package(OpenCL)
+-find_library( OpenCL REQUIRED CONFIG
+- PATHS
+- /opt/rocm
++find_path(OPENCL_INCLUDE_DIR
++ NAMES OpenCL/cl.h CL/cl.h
++ PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
++ PATHS ${OPENCL_DIR}
++ DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
+ )
+
+-if( NOT OPENCL_DIR )
+- find_path(OPENCL_INCLUDE_DIR
+- NAMES OpenCL/cl.h CL/cl.h
+- PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64
+- PATHS /opt/rocm
+- DOC "OpenCL include header OpenCL/cl.h or CL/cl.h"
+- )
+-
+- if( NOT OPENCL_INCLUDE_DIR )
+- unset(OPENCL_INCLUDE_DIR CACHE)
+- set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
+- endif()
+- message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
++if( NOT OPENCL_INCLUDE_DIR )
++ unset(OPENCL_INCLUDE_DIR CACHE)
++ set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE )
+ endif()
++message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.")
+
+
+
diff --git a/dev-libs/rocclr/rocclr-3.5.0.ebuild b/dev-libs/rocclr/rocclr-3.5.0.ebuild
index 08630026ed2..0d721623e54 100644
--- a/dev-libs/rocclr/rocclr-3.5.0.ebuild
+++ b/dev-libs/rocclr/rocclr-3.5.0.ebuild
@@ -22,6 +22,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/rocclr-3.5.0-cmake-install-destination.patch"
+ "${FILESDIR}/rocclr-3.5.0-find-opencl.patch"
)
S="${WORKDIR}/ROCclr-roc-${PV}"