diff options
author | Craig Andrews <candrews@gentoo.org> | 2019-07-31 11:53:28 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2019-08-07 13:38:46 -0400 |
commit | c0aa27dab035db39ddc15bc22c0aba651513fead (patch) | |
tree | 79feebf0b18ed4a2390935f13ffede90a9986364 /dev-libs/rocm-comgr/files | |
parent | dev-libs/rocm-hostcall: Radeon Open Compute hostcall API (diff) | |
download | gentoo-c0aa27dab035db39ddc15bc22c0aba651513fead.tar.gz gentoo-c0aa27dab035db39ddc15bc22c0aba651513fead.tar.bz2 gentoo-c0aa27dab035db39ddc15bc22c0aba651513fead.zip |
dev-libs/rocm-comgr: Radeon Open Compute Code Object Manager
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-comgr/files')
4 files changed, 176 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..47f037168299 --- /dev/null +++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch @@ -0,0 +1,63 @@ +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 +@@ -203,8 +218,8 @@ + ${AMD_COMGR_PRIVATE_LINKER_OPTIONS} + yaml-cpp + ${CLANG_LIBS} +- ${LLD_LIBS} + ${LLVM_LIBS} ++ ${LLD_LIBS} + ) + + if (NOT UNIX) +@@ -238,3 +253,14 @@ + if (NOT CPack_CMake_INCLUDED) + include(CPack) + endif() ++ ++MESSAGE(STATUS "<<< Gentoo configuration >>> ++Build type ${CMAKE_BUILD_TYPE} ++Install path ${CMAKE_INSTALL_PREFIX} ++Compiler flags: ++C ${CMAKE_C_FLAGS} ++C++ ${CMAKE_CXX_FLAGS} ++Linker flags: ++Executable ${CMAKE_EXE_LINKER_FLAGS} ++Module ${CMAKE_MODULE_LINKER_FLAGS} ++Shared ${CMAKE_SHARED_LINKER_FLAGS}\n") 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) + |