summaryrefslogtreecommitdiff
path: root/dev-libs/rocm-comgr/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /dev-libs/rocm-comgr/files
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'dev-libs/rocm-comgr/files')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch44
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch38
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-clang.patch26
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-lld-includes.patch43
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch30
5 files changed, 181 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch
new file mode 100644
index 000000000000..74206760f39a
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch
@@ -0,0 +1,44 @@
+From 98f589636729b1e25625db6880fbd7820dcf9e40 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Wed, 31 Jul 2019 10:04:11 -0400
+Subject: [PATCH] Install to standard locations using GNUInstallDirs
+
+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 | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 454b830..a89af16 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ cmake_minimum_required(VERSION 3.2.0)
+
++include (GNUInstallDirs)
++
+ # Build ROCM-Compiler-Support with ccache if the package is present.
+ set(ROCM_COMPILER_SUPPORT_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
+ if(ROCM_COMPILER_SUPPORT_CCACHE_BUILD)
+@@ -146,17 +148,17 @@ configure_file("cmake/${AMD_COMGR_CONFIG_NAME}.in"
+
+ install(TARGETS amd_comgr
+ EXPORT amd_comgr_export
+- DESTINATION lib)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ install(FILES
+ "include/amd_comgr.h"
+- DESTINATION include)
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ install(FILES
+ "README.md"
+ "LICENSE.txt"
+ "NOTICES.txt"
+- DESTINATION share/amd_comgr)
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/amd_comgr)
+
+ # Generate the install-tree package.
+ set(AMD_COMGR_PREFIX_CODE "
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
new file mode 100644
index 000000000000..bce19d168b0a
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch
@@ -0,0 +1,38 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/19
+
+--- comgr/CMakeLists.old 2019-07-19 17:19:26.080276421 +0200
++++ comgr/CMakeLists.txt 2019-07-19 18:17:25.780163592 +0200
+@@ -185,7 +185,11 @@
+ include_directories(./yaml-cpp/include)
+
+ set(CLANG_LIBS
+- clangFrontendTool)
++ clangFrontendTool
++ clangFrontend
++ clangBasic
++ clangDriver
++ clangSerialization)
+
+ set(LLD_LIBS
+ lldELF
+@@ -193,8 +197,19 @@
+
+ llvm_map_components_to_libnames(LLVM_LIBS
+ ${LLVM_TARGETS_TO_BUILD}
++ Option
+ DebugInfoDWARF
+- Symbolize)
++ Symbolize
++ Support
++ Object
++ BitWriter
++ MC
++ MCParser
++ MCDisassembler
++ Core
++ IRReader
++ CodeGen
++ Linker)
+
+ target_link_libraries(amd_comgr
+ PUBLIC
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-clang.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-clang.patch
new file mode 100644
index 000000000000..dda005ab7a21
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-clang.patch
@@ -0,0 +1,26 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/16
+
+From 09eb70afa22e2d6066a5f29888158c6005170ca6 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Wed, 31 Jul 2019 10:13:30 -0400
+Subject: [PATCH] Find Clang avoiding the system (non-ROC) LLVM
+
+Use NO_DEFAULT_PATH to avoid finding the system (non-ROC) LLVM.
+Use /opt/rocm/llvm as an additional hint to be consistent with the build systems of other ROC projects (such as ROCm-OpenCL-Driver)
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 454b830..8642c98 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,7 +13,7 @@ endif()
+
+ project(code_object_manager)
+
+-find_package(Clang REQUIRED CONFIG)
++find_package(Clang REQUIRED CONFIG PATHS ${LLVM_DIR} "/opt/rocm/llvm" NO_DEFAULT_PATH)
+ add_definitions(${LLVM_DEFINITIONS})
+ include_directories(${LLVM_INCLUDE_DIRS})
+ link_directories(${LLVM_LIBRARY_DIRS})
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-lld-includes.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-lld-includes.patch
new file mode 100644
index 000000000000..5b44feaf1b3d
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-lld-includes.patch
@@ -0,0 +1,43 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/17
+
+From 4588c1a5aad3edae9d3e121685d8d1f5fddd54ba Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Wed, 31 Jul 2019 10:45:01 -0400
+Subject: [PATCH] Find lld includes in LLVM_INCLUDE_DIRS
+
+Allows building against an LLVM build tree
+---
+ CMakeLists.txt | 20 ++------------------
+ 1 file changed, 2 insertions(+), 18 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 454b830..db28533 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,24 +19,8 @@ include_directories(${LLVM_INCLUDE_DIRS})
+ link_directories(${LLVM_LIBRARY_DIRS})
+ include_directories(${CLANG_INCLUDE_DIRS})
+
+-# FIXME: There is no way to directly determine the include paths for LLD when
+-# working with an LLVM build tree, but we want to avoid having to install LLVM
+-# to build Comgr. This should eventually be fixed in usptream LLD so this can
+-# be removed.
+-if(DEFINED LLVM_BUILD_MAIN_SRC_DIR)
+- set(INTERNAL_LLD_INCLUDE_DIRS "${LLVM_BUILD_MAIN_SRC_DIR}/tools/lld/include")
+- set(EXTERNAL_LLD_INCLUDE_DIRS "${LLVM_BUILD_MAIN_SRC_DIR}/../lld/include")
+- if (EXISTS "${INTERNAL_LLD_INCLUDE_DIRS}"
+- AND IS_DIRECTORY "${INTERNAL_LLD_INCLUDE_DIRS}")
+- set(LLD_INCLUDE_DIRS "${INTERNAL_LLD_INCLUDE_DIRS}")
+- elseif (EXISTS "${EXTERNAL_LLD_INCLUDE_DIRS}"
+- AND IS_DIRECTORY "${EXTERNAL_LLD_INCLUDE_DIRS}")
+- set(LLD_INCLUDE_DIRS "${EXTERNAL_LLD_INCLUDE_DIRS}")
+- else()
+- message(FATAL_ERROR "You are attempting to compile using an LLVM build tree, but the LLD include directory could not be located. The paths '${INTERNAL_LLD_INCLUDE_DIRS}' and '${EXTERNAL_LLD_INCLUDE_DIRS}' were tried.")
+- endif()
+- include_directories(${LLD_INCLUDE_DIRS})
+-endif()
++set(LLD_INCLUDE_DIRS "${LLVM_INCLUDE_DIRS}/lld")
++include_directories(${LLD_INCLUDE_DIRS})
+
+ find_package(AMDDeviceLibs CONFIG)
+
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch
new file mode 100644
index 000000000000..d61f4c2a2003
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch
@@ -0,0 +1,30 @@
+diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt
+index 454b830..70e2526 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -90,12 +90,8 @@ if (UNIX)
+ -Wl,--no-undefined)
+ endif()
+ endif()
+- # FIXME: Remove when yaml-cpp is removed from the build.
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ else()
+ list(APPEND AMD_COMGR_PRIVATE_COMPILE_OPTIONS "/W0" "/wd4244")
+- # FIXME: Make this private once yaml-cpp is removed from the build.
+- add_definitions(-D_HAS_EXCEPTIONS=0)
+ endif()
+
+ # Windows is strict about visibility of exports in shared libraries, so we ask
+@@ -179,10 +175,8 @@ install(EXPORT amd_comgr_export
+ DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}"
+ FILE "${AMD_COMGR_TARGETS_NAME}")
+
+-set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE)
+-set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE)
+-add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
+-include_directories(./yaml-cpp/include)
++find_package(yaml-cpp REQUIRED)
++include_directories(${YAML_CPP_INCLUDE_DIR})
+
+ set(CLANG_LIBS
+ clangFrontendTool)