* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2019-08-07 17:38 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2019-08-07 17:38 UTC (permalink / raw
To: gentoo-commits
commit: a14f0a3fbd2d7cb7ec3f2f04f16598be2b1b9000
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 16:18:13 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Aug 7 17:38:47 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a14f0a3f
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 <AT> gentoo.org>
.../files/rocm-comgr-2.6.0-dependencies.patch | 25 ------------------
.../files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch | 30 ++++++++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild | 7 ++---
3 files changed, 34 insertions(+), 28 deletions(-)
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
index 47f03716829..bce19d168b0 100644
--- 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
@@ -36,28 +36,3 @@ https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/19
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-unbundle-yaml-cpp.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch
new file mode 100644
index 00000000000..d61f4c2a200
--- /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)
diff --git a/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
index 0f058da194b..c000ce55ab7 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
@@ -19,6 +19,7 @@ PATCHES=(
"${FILESDIR}/${P}-find-clang.patch"
"${FILESDIR}/${P}-find-lld-includes.patch"
"${FILESDIR}/${P}-dependencies.patch"
+ "${FILESDIR}/${P}-unbundle-yaml-cpp.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
@@ -27,12 +28,12 @@ LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)"
RDEPEND="dev-libs/rocm-device-libs
- dev-cpp/yaml-cpp
- sys-devel/llvm-roc"
+ dev-cpp/yaml-cpp:=
+ sys-devel/llvm-roc:="
DEPEND="${RDEPEND}"
src_prepare() {
-# rm -rf yaml-cpp || die
+ rm -rf yaml-cpp || die
cmake-utils_src_prepare
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2025-02-13 8:38 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2025-02-13 8:38 UTC (permalink / raw
To: gentoo-commits
commit: 2ff54a47ffce807d2a1dc08f23a7453b5dc6ed18
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Thu Jan 30 15:19:55 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 08:35:31 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff54a47
dev-libs/rocm-comgr: drop 5.1.3-r3, 5.3.3-r2, 5.4.3-r1, 5.5.1
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40388
Signed-off-by: Sam James <sam <AT> gentoo.org>
...01-COMGR-changes-needed-for-upstream-llvm.patch | 66 ----------------------
.../files/rocm-comgr-4.5.2-dependencies.patch | 53 -----------------
.../files/rocm-comgr-5.1.3-clang-fix-include.patch | 12 ----
.../files/rocm-comgr-5.1.3-clang-link.patch | 17 ------
.../files/rocm-comgr-5.1.3-llvm-15-args-changed | 20 -------
.../files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu | 17 ------
...ocm-comgr-5.3.3-HIPIncludePath-not-needed.patch | 15 -----
.../files/rocm-comgr-5.3.3-fix-tests.patch | 17 ------
.../rocm-comgr-5.3.3-fno-stack-protector.patch | 14 -----
.../files/rocm-comgr-5.3.3-remove-h-option.patch | 43 --------------
.../files/rocm-comgr-5.5.1-fix-tests.patch | 17 ------
.../files/rocm-comgr-5.5.1-lld-include.patch | 22 --------
.../files/rocm-comgr-5.5.1-nullopt.patch | 23 --------
.../files/rocm-comgr-5.5.1-opt_mrelax.patch | 23 --------
.../files/rocm-comgr-5.5.1-subtargetfeatures.patch | 26 ---------
dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild | 60 --------------------
dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild | 62 --------------------
dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild | 61 --------------------
dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild | 64 ---------------------
19 files changed, 632 deletions(-)
diff --git a/dev-libs/rocm-comgr/files/0001-COMGR-changes-needed-for-upstream-llvm.patch b/dev-libs/rocm-comgr/files/0001-COMGR-changes-needed-for-upstream-llvm.patch
deleted file mode 100644
index 8200d4414f8b..000000000000
--- a/dev-libs/rocm-comgr/files/0001-COMGR-changes-needed-for-upstream-llvm.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From be2bcaaea228cdcb5981b261046175275c402fb9 Mon Sep 17 00:00:00 2001
-From: Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>
-Date: Wed, 26 Jan 2022 12:02:52 -0500
-Subject: [PATCH] COMGR changes needed for
- https://github.com/llvm/llvm-project/commit/83d59e05b201760e3f364ff6316301d347cbad95
-
-Change-Id: Iac01d024463865734879faf5f814e0862c26f7a1
----
- lib/comgr/src/comgr-compiler.cpp | 3 ++-
- lib/comgr/src/comgr-env.h | 1 +
- lib/comgr/src/comgr-objdump.cpp | 4 +++-
- 3 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
-index 6c2cba2..db4c8d5 100644
---- a/src/comgr-compiler.cpp
-+++ b/src/comgr-compiler.cpp
-@@ -605,7 +605,8 @@ static amd_comgr_status_t linkWithLLD(llvm::ArrayRef<const char *> Args,
- ArrayRef<const char *> ArgRefs = llvm::makeArrayRef(LLDArgs);
- static std::mutex MScreen;
- MScreen.lock();
-- bool LLDRet = lld::elf::link(ArgRefs, false, LogS, LogE);
-+ bool LLDRet = lld::elf::link(ArgRefs, LogS, LogE, false, false);
-+ lld::CommonLinkerContext::destroy();
- MScreen.unlock();
- if (!LLDRet) {
- return AMD_COMGR_STATUS_ERROR;
-diff --git a/lib/comgr/src/comgr-env.h b/lib/comgr/src/comgr-env.h
-index eb13e61..aef57b3 100644
---- a/src/comgr-env.h
-+++ b/src/comgr-env.h
-@@ -36,6 +36,7 @@
- #ifndef COMGR_ENV_H
- #define COMGR_ENV_H
-
-+#include "llvm/ADT/Optional.h"
- #include "llvm/ADT/StringRef.h"
-
- namespace COMGR {
-diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
-index 094bbac..b41e6c1 100644
---- a/src/comgr-objdump.cpp
-+++ b/src/comgr-objdump.cpp
-@@ -43,6 +43,7 @@
- #include "llvm/ADT/STLExtras.h"
- #include "llvm/ADT/StringExtras.h"
- #include "llvm/ADT/Triple.h"
-+#include "llvm/CodeGen/CommandFlags.h"
- #include "llvm/DebugInfo/DWARF/DWARFContext.h"
- #include "llvm/DebugInfo/Symbolize/Symbolize.h"
- #include "llvm/MC/MCAsmInfo.h"
-@@ -2395,9 +2396,10 @@ llvm::DisassemHelper::disassembleAction(StringRef Input,
- size_t ArgC = ArgV.size();
- ArgV.push_back(nullptr);
- COMGR::clearLLVMOptions();
-+ llvm::codegen::RegisterCodeGenFlags CGF;
- cl::ParseCommandLineOptions(ArgC, ArgV.data(), "llvm object file dumper\n",
- &ErrS);
-- MCPU = lld::getCPUStr();
-+ MCPU = llvm::codegen::getCPUStr();
-
- ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
- MemoryBuffer::getMemBuffer(Input);
---
-2.35.1
-
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch
deleted file mode 100644
index 13cff2e52dfe..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25
-
-From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001
-From: Craig Andrews <candrews@integralblue.com>
-Date: Sun, 1 Mar 2020 19:24:22 -0500
-Subject: [PATCH] Link additional required LLVM libraries
-
-Without these additional required dependencies, linking fails with errors such as:
-`undefined reference to llvm::errs()'`
----
- CMakeLists.txt | 20 ++++++++++++++++++--
- 1 file changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1794a07..c7b852a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -207,7 +207,11 @@ install(FILES
- DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
-
- set(CLANG_LIBS
-- clangFrontendTool)
-+ clangFrontendTool
-+ clangFrontend
-+ clangBasic
-+ clangDriver
-+ clangSerialization)
-
- set(LLD_LIBS
- lldELF
-@@ -218,8 +222,21 @@ if (LLVM_LINK_LLVM_DYLIB)
- else()
- 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
-+ Demangle
-+ BinaryFormat)
- endif()
-
- target_link_libraries(amd_comgr
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-fix-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-fix-include.patch
deleted file mode 100644
index 6bf47c610dfc..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-fix-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: comgr/src/comgr-env.h
-===================================================================
---- comgr.orig/src/comgr-env.h
-+++ comgr/src/comgr-env.h
-@@ -37,6 +37,7 @@
- #define COMGR_ENV_H
-
- #include "llvm/ADT/StringRef.h"
-+#include "llvm/ADT/Optional.h"
-
- namespace COMGR {
- namespace env {
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-link.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-link.patch
deleted file mode 100644
index 0e2a9a668216..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-clang-link.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: comgr/CMakeLists.txt
-===================================================================
---- comgr.orig/CMakeLists.txt
-+++ comgr/CMakeLists.txt
-@@ -283,11 +283,7 @@ install(FILES
- DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
-
- set(CLANG_LIBS
-- clangFrontendTool
-- clangFrontend
-- clangBasic
-- clangDriver
-- clangSerialization)
-+ clang-cpp)
-
- set(LLD_LIBS
- lldELF
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-args-changed b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-args-changed
deleted file mode 100644
index 545b1c632182..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-args-changed
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/comgr-compiler.cpp
-+++ b/src/comgr-compiler.cpp
-@@ -453,7 +453,7 @@ static bool executeAssemblerImpl(AssemblerInvocation &Opts,
- std::unique_ptr<MCCodeEmitter> MCE;
- std::unique_ptr<MCAsmBackend> MAB;
- if (Opts.ShowEncoding) {
-- MCE.reset(TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx));
-+ MCE.reset(TheTarget->createMCCodeEmitter(*MCII, Ctx));
- MCTargetOptions Options;
- MAB.reset(TheTarget->createMCAsmBackend(*STI, *MRI, Options));
- }
-@@ -472,7 +472,7 @@ static bool executeAssemblerImpl(AssemblerInvocation &Opts,
- Out = BOS.get();
- }
-
-- MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
-+ MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, Ctx);
- MCTargetOptions Options;
- MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*STI, *MRI, Options);
- Triple T(Opts.Triple);
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu
deleted file mode 100644
index 41e51a407ba9..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/src/comgr-compiler.cpp
-+++ b/src/comgr-compiler.cpp
-@@ -244,13 +244,12 @@ bool AssemblerInvocation::createFromArgs(AssemblerInvocation &Opts,
- OPT_compress_debug_sections_EQ)) {
- if (A->getOption().getID() == OPT_compress_debug_sections) {
- // TODO: be more clever about the compression type auto-detection
-- Opts.CompressDebugSections = llvm::DebugCompressionType::GNU;
-+ Opts.CompressDebugSections = llvm::DebugCompressionType::Z;
- } else {
- Opts.CompressDebugSections =
- llvm::StringSwitch<llvm::DebugCompressionType>(A->getValue())
- .Case("none", llvm::DebugCompressionType::None)
- .Case("zlib", llvm::DebugCompressionType::Z)
-- .Case("zlib-gnu", llvm::DebugCompressionType::GNU)
- .Default(llvm::DebugCompressionType::None);
- }
- }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-HIPIncludePath-not-needed.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-HIPIncludePath-not-needed.patch
deleted file mode 100644
index 54b98726026f..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-HIPIncludePath-not-needed.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-ROCM and HIPIncludePath is now /usr, which disturb the include order
-===================================================================
---- comgr.orig/src/comgr-compiler.cpp
-+++ comgr/src/comgr-compiler.cpp
-@@ -1010,10 +1010,6 @@ amd_comgr_status_t AMDGPUCompiler::addCo
- Args.push_back("x86_64-unknown-linux-gnu");
- Args.push_back("--cuda-device-only");
- Args.push_back("-nogpulib");
-- Args.push_back("-isystem");
-- Args.push_back(ROCMIncludePath.c_str());
-- Args.push_back("-isystem");
-- Args.push_back(HIPIncludePath.c_str());
- break;
- default:
- return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT;
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
deleted file mode 100644
index 08a40460c762..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
-Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
-Reference: https://github.com/llvm/llvm-project/issues/60313
-===================================================================
---- comgr.orig/test/source1.cl
-+++ comgr/test/source1.cl
-@@ -35,7 +35,9 @@
-
- #include "include-a.h"
-
-+void kernel source3(__global int *j) { *j = FOO; }
-+
- void kernel source1(__global int *j) {
- *j += 2;
-- source2(j);
-+ source3(j);
- }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protector.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protector.patch
deleted file mode 100644
index c8d078ee8946..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protector.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-This add -fno-stack-protector to all compilation, since -f-stack-protector is currently unsupported by ROCm
-Reference: https://bugs.gentoo.org/890377
-index 465187e..0baf925 100644
---- a/src/comgr-compiler.cpp
-+++ b/src/comgr-compiler.cpp
-@@ -850,6 +850,8 @@ amd_comgr_status_t AMDGPUCompiler::processFile(const char *InputFilePath,
- Argv.push_back(Arg);
- }
-
-+ Argv.push_back("-fno-stack-protector");
-+
- for (auto &Option : ActionInfo->getOptions()) {
- Argv.push_back(Option.c_str());
- if (Option.rfind("--rocm-path", 0) == 0) {
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch
deleted file mode 100644
index 1346ba4ef04d..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/commit/2d05f9e480cbc591a6b888dfd49d9f7ef1bef25f
-Reference: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/52
-Reference: https://bugs.gentoo.org/851702#c37
-This unblocks building blender with HIP cycles support
-======================================================================
-From 2d05f9e480cbc591a6b888dfd49d9f7ef1bef25f Mon Sep 17 00:00:00 2001
-From: Jacob Lambert <jacob.lambert@amd.com>
-Date: Thu, 12 Jan 2023 08:45:38 -0800
-Subject: [PATCH] Remove -h option from comgr-objdump
-
-The -h option (short for -headers) is a legal objdump option.
-However registering this as an LLVM option by Comgr prevents other
-LLVM tools or instances from registering a -h option in the same
-process, which is an issue because -h is a common short form for
--help.
-
-A long term solution will be to libraryize llvm-obj dump, and
-call it in Comgr via an API instead of re-implementation, which
-will eliminate the need for Comgr to register any LLVM options for
-objdump.
-
-Change-Id: Ieb1981aeb1826422647fd301c4827e2bfb370560
----
- lib/comgr/src/comgr-objdump.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
-index 6d20a3c..ead69fe 100644
---- a/src/comgr-objdump.cpp
-+++ b/src/comgr-objdump.cpp
-@@ -175,9 +175,9 @@ cl::opt<bool> SectionHeaders("section-headers",
- static cl::alias SectionHeadersShort("headers",
- cl::desc("Alias for --section-headers"),
- cl::aliasopt(SectionHeaders));
--static cl::alias SectionHeadersShorter("h",
-- cl::desc("Alias for --section-headers"),
-- cl::aliasopt(SectionHeaders));
-+// The following option has been removed to avoid conflicts with
-+// other llvm tools/instances also attempting to register a -h option
-+// static cl::alias SectionHeadersShorter("h", ...)
-
- cl::list<std::string>
- FilterSections("section",
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
deleted file mode 100644
index 9fd14df196a2..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
-Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
-Reference: https://github.com/llvm/llvm-project/issues/60313
-===================================================================
---- comgr.orig/test/source/source1.cl
-+++ comgr/test/source/source1.cl
-@@ -35,7 +35,9 @@
-
- #include "include-a.h"
-
-+void kernel source3(__global int *j) { *j = FOO; }
-+
- void kernel source1(__global int *j) {
- *j += 2;
-- source2(j);
-+ source3(j);
- }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
deleted file mode 100644
index 96df9291eb86..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 271fddf65f43675e675f0cb4e9aaa3d27d34c58a Mon Sep 17 00:00:00 2001
-From: Ron Lieberman <ron.lieberman@amd.com>
-Date: Thu, 29 Dec 2022 05:17:41 -0600
-Subject: [PATCH] [llvm merge] add include of lld/Common/CommonLinkerContext.h
-
-Change-Id: I5767b4c1e683e9df9146804ba23ef3c0c0b6c07a
----
- lib/comgr/src/comgr-compiler.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
-index 2a7362a..bb1c9d3 100644
---- comgr/src/comgr-compiler.cpp
-+++ comgr/src/comgr-compiler.cpp
-@@ -39,6 +39,7 @@
- #include "comgr-compiler.h"
- #include "comgr-device-libs.h"
- #include "comgr-env.h"
-+#include "lld/Common/CommonLinkerContext.h"
- #include "lld/Common/Driver.h"
- #include "clang/Basic/Version.h"
- #include "clang/CodeGen/CodeGenAction.h"
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
deleted file mode 100644
index 8bb07b55a3ab..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From e1da67c6acb2b0e4a8f9c05c89e3778252ea5aa7 Mon Sep 17 00:00:00 2001
-From: Ron Lieberman <ron.lieberman@amd.com>
-Date: Sat, 17 Dec 2022 19:58:26 -0600
-Subject: [PATCH] None -> std::nullopt
-
-Change-Id: I1cc241aa47de538f9f5b1c12cb5655aca8a4502f
----
- lib/comgr/src/comgr-env.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/comgr/src/comgr-env.cpp b/lib/comgr/src/comgr-env.cpp
-index 742f4d4..6ab6f0f 100644
---- comgr/src/comgr-env.cpp
-+++ comgr/src/comgr-env.cpp
-@@ -53,7 +53,7 @@ bool shouldSaveTemps() {
- Optional<StringRef> getRedirectLogs() {
- static char *RedirectLogs = getenv("AMD_COMGR_REDIRECT_LOGS");
- if (!RedirectLogs || StringRef(RedirectLogs) == "0") {
-- return None;
-+ return std::nullopt;
- }
- return StringRef(RedirectLogs);
- }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
deleted file mode 100644
index aa3e7c370a53..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From b582dfb33fdb51065c22800fe02dd83207185664 Mon Sep 17 00:00:00 2001
-From: Ron Lieberman <ron.lieberman@amd.com>
-Date: Sun, 1 Jan 2023 10:35:49 -0600
-Subject: [PATCH] [llvm] move to inverted OPT_mrelax_relocations_no
-
-Change-Id: I95e48e8acf5b9124d25e5e7b86c418f1a0d9389d
----
- lib/comgr/src/comgr-compiler.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
-index bb1c9d3..95c1bb4 100644
---- comgr/src/comgr-compiler.cpp
-+++ comgr/src/comgr-compiler.cpp
-@@ -259,7 +259,7 @@ bool AssemblerInvocation::createFromArgs(AssemblerInvocation &Opts,
- }
- }
-
-- Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
-+ Opts.RelaxELFRelocations = !Args.hasArg(OPT_mrelax_relocations_no);
- Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
- Opts.DwarfDebugFlags =
- std::string(Args.getLastArgValue(OPT_dwarf_debug_flags));
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
deleted file mode 100644
index 340df3852fc2..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 48c682d577a7955256d0bfac5d497b3feebff11c Mon Sep 17 00:00:00 2001
-From: Ron Lieberman <ron.lieberman@amd.com>
-Date: Mon, 16 Jan 2023 14:29:05 -0600
-Subject: [PATCH] [llvm merge] Move to Expected on SubtargetFeatures
-
-Change-Id: I060ceaa2b51eaa6ed1b472ea42c6788b98001088
----
- lib/comgr/src/comgr-objdump.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
-index 86a5d7f..6d20a3c 100644
---- comgr/src/comgr-objdump.cpp
-+++ comgr/src/comgr-objdump.cpp
-@@ -1270,7 +1270,10 @@ void llvm::DisassemHelper::DisassembleObject(const ObjectFile *Obj,
- const Target *TheTarget = getTarget(Obj);
-
- // Package up features to be passed to target/subtarget
-- SubtargetFeatures Features = Obj->getFeatures();
-+ Expected<SubtargetFeatures> FeaturesValue = Obj->getFeatures();
-+ if (!FeaturesValue)
-+ WithColor::error(errs(), ToolName) << FeaturesValue.takeError();
-+ SubtargetFeatures Features = *FeaturesValue;
- std::vector<std::string> MAttrs = lld::getMAttrs();
- if (MAttrs.size()) {
- for (unsigned I = 0; I != MAttrs.size(); ++I) {
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
deleted file mode 100644
index 3339e71dc276..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake llvm prefix
-
-LLVM_MAX_SLOT=15
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.5.2-dependencies.patch"
- "${FILESDIR}/${PN}-5.1.3-Find-CLANG_RESOURCE_DIR.patch"
- "${FILESDIR}/${PN}-5.1.3-clang-link.patch"
- "${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
- "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
- "${FILESDIR}/0001-COMGR-changes-needed-for-upstream-llvm.patch"
- "${FILESDIR}/${PN}-5.1.3-llvm-15-remove-zlib-gnu"
- "${FILESDIR}/${PN}-5.1.3-llvm-15-args-changed"
- "${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- llvm-core/clang:${LLVM_MAX_SLOT}=
- llvm-core/clang-runtime:=
- llvm-core/lld:${LLVM_MAX_SLOT}="
-DEPEND="${RDEPEND}"
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
- sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
- sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
- sed '/Args.push_back(HIPIncludePath/,+1d' -i src/comgr-compiler.cpp || die
- sed '/Args.push_back(ROCMIncludePath/,+1d' -i src/comgr-compiler.cpp || die # ROCM and HIPIncludePath is now /usr, which disturb the include order
- eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
- -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild
deleted file mode 100644
index 30112cb3b0c6..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake llvm prefix
-
-LLVM_MAX_SLOT=15
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
- "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
- "${FILESDIR}/${PN}-5.1.3-llvm-15-remove-zlib-gnu"
- "${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
- "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
- "${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
- "${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
- "${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
- "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- llvm-core/clang:${LLVM_MAX_SLOT}=
- llvm-core/clang-runtime:=
- llvm-core/lld:${LLVM_MAX_SLOT}="
-DEPEND="${RDEPEND}"
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
- sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
- sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
- eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
- -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
- -DBUILD_TESTING=$(usex test ON OFF)
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild
deleted file mode 100644
index 7863223f7e6a..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake llvm prefix
-
-LLVM_MAX_SLOT=15
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
- "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
- "${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
- "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
- "${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
- "${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
- "${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
- "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- llvm-core/clang:${LLVM_MAX_SLOT}=
- llvm-core/clang-runtime:=
- llvm-core/lld:${LLVM_MAX_SLOT}="
-DEPEND="${RDEPEND}"
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
- sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
- sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
- eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
- -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
- -DBUILD_TESTING=$(usex test ON OFF)
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild
deleted file mode 100644
index 77c1f229941c..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake llvm prefix
-
-LLVM_MAX_SLOT=16
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
- "${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
- "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
- "${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
- "${FILESDIR}/${PN}-5.5.1-fix-tests.patch"
- "${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
- "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
- "${FILESDIR}/${PN}-5.5.1-nullopt.patch"
- "${FILESDIR}/${PN}-5.5.1-opt_mrelax.patch"
- "${FILESDIR}/${PN}-5.5.1-lld-include.patch"
- "${FILESDIR}/${PN}-5.5.1-subtargetfeatures.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- llvm-core/clang:${LLVM_MAX_SLOT}=
- llvm-core/clang-runtime:=
- llvm-core/lld:${LLVM_MAX_SLOT}="
-DEPEND="${RDEPEND}"
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
- sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
- sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
- eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
- -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
- -DBUILD_TESTING=$(usex test ON OFF)
- )
- cmake_src_configure
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2024-12-01 7:57 Patrick Lauer
0 siblings, 0 replies; 13+ messages in thread
From: Patrick Lauer @ 2024-12-01 7:57 UTC (permalink / raw
To: gentoo-commits
commit: a9f94df74ad20ba69681fe30c59d62f1e962defe
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 1 07:52:24 2024 +0000
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Sun Dec 1 07:57:50 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9f94df7
dev-libs/rocm-comgr: add 6.2.4
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 1 +
.../files/rocm-comgr-6.2.2-missing-isa.patch | 9 +++
dev-libs/rocm-comgr/rocm-comgr-6.2.4.ebuild | 87 ++++++++++++++++++++++
3 files changed, 97 insertions(+)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 47b6dae79587..aefb0b28d727 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,5 +1,6 @@
DIST llvm-project-rocm-6.1.1.tar.gz 196027084 BLAKE2B 3ef0b6e3c47c66fd80289373e6ff8aaff44751f9b380addfae73a18dc388093c0535f230b0cc7528724bc43f6992e2ae6decd3d0d3c700893ca95a6166b7b8dc SHA512 e320d4eeaa6f61ed1cdbf653d67fe887d3ce9dc0d6743b4713502e1cb5318ab8afbe1ee71f8cba07635c54ce532df6683de40ade0e5be4a52e50ce25a9b70818
DIST llvm-project-rocm-6.1.2.tar.gz 195992927 BLAKE2B d821f29f2f1f7c1ff414c63a710281f16d2a394b21f3365d01b86710cc09ed27e514b49fb744bf6a36b38815afa56cc26d44f0238f38479a0c2db9bf9989f389 SHA512 5f7e5dbe5976141de35e96e603624bd9d5a2c08b0690ba9fcd81d1b32f540f94bb9f4b74539e2838fd60ae1312dbe5e0b429ba80a03871782cdf3bd834940ce0
+DIST llvm-project-rocm-6.2.4.tar.gz 206742705 BLAKE2B e4d40c900b56a3d31003295c517fcb8fdc5cb0954f298d541d545c6d142746eecfa70a44bfdcb9044d70284f15af612c27dbd55d51e94e638e03bf21c1d3bc06 SHA512 5c5784c318c607168c9d2227ce1150e92fdc6aa457a9e64d62745a70f6fce92c4d4b1202422940f1ccc37a4bccf1efb220d8be39ec2ffdba7591d17e54ec8a5f
DIST rocm-comgr-5.1.3.tar.gz 117155 BLAKE2B 40e415c4c7ae3e709dd50981299291f0fc1133f35310b4c86a86847d3bce5fd7685a3f4480f8f156873ca922921c1d4e1cb620fd33bd5cdc87f155af839f2bbe SHA512 5927250f5e03c32b7f270a1dbfe5221d349dfe32aba34143040da53d4e7eb83faa3073a43edabcff13e1fc977bc17088404523f2ab2ea95e207d2c00beb4249b
DIST rocm-comgr-5.3.3.tar.gz 120414 BLAKE2B 29b9d466d74ef94165a2b9bea35eac4616f6b2fc529cdac3c830ee7dc08f219cb9e5d4f081658881c76633f12eaebb74d1a2ea30a76652231b8ee516f9988db1 SHA512 ba7b1ef214e3624168e438ed7fd94291a07508fe89d178c0b158bf22e0998d5a8e4d8f0a7f08f05ac108ef65f725db5764fd66353a85bc25000e572a4fdcb61f
DIST rocm-comgr-5.4.3.tar.gz 120461 BLAKE2B c4eb79dd5a72a2b18e16841fc8cb9a3a33efb0c7b04a7585df9672d682bba6fa826ab8b37dba5febca3b8c5ee5aca30d8546e1fa69e77671e5c750e2a8c1f12f SHA512 1a25af99a0166d70ca6dc5df5a667068eaf583dccd74bbb18a2a5de3c1b769e0c1eb9a0c539e0cd88bc50bbbe53214a1d1b23fbdfd6fc5b6507c44da259815c4
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-6.2.2-missing-isa.patch b/dev-libs/rocm-comgr/files/rocm-comgr-6.2.2-missing-isa.patch
new file mode 100644
index 000000000000..ea8e3ee1eabf
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-6.2.2-missing-isa.patch
@@ -0,0 +1,9 @@
+--- a/src/comgr-isa-metadata.def 2024-10-14 13:40:22.023251450 -0000
++++ b/src/comgr-isa-metadata.def 2024-10-14 13:40:31.949824212 -0000
+@@ -89,7 +89,6 @@
+ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1103", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1103, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 16, 1024, 256)
+ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1150", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1150, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 16, 1024, 256)
+ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1151", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1151, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 24, 1536, 256)
+-HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1152", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1152, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 16, 1024, 256)
+ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1200", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1200, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 24, 1536, 256)
+ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1201", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1201, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 24, 1536, 256)
diff --git a/dev-libs/rocm-comgr/rocm-comgr-6.2.4.ebuild b/dev-libs/rocm-comgr/rocm-comgr-6.2.4.ebuild
new file mode 100644
index 000000000000..9ce716803fc1
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-6.2.4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( 18 )
+
+inherit cmake llvm-r1 prefix
+
+MY_P=llvm-project-rocm-${PV}
+components=( "amd/comgr" )
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/ROCm/ROCm-CompilerSupport"
+SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}/${components[0]}"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
+ "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
+ "${FILESDIR}/${PN}-6.0.0-extend-isa-compatibility-check.patch"
+ "${FILESDIR}/${PN}-6.1.0-enforce-oop-compiler.patch"
+ "${FILESDIR}/${PN}-6.1.0-fix-comgr-default-flags.patch"
+ "${FILESDIR}/${PN}-6.1.0-dont-add-nogpulib.patch"
+ "${FILESDIR}/${PN}-6.2.2-missing-isa.patch"
+)
+
+RDEPEND=">=dev-libs/rocm-device-libs-${PV}
+ sys-devel/clang-runtime:=
+ $(llvm_gen_dep '
+ sys-devel/clang:${LLVM_SLOT}=
+ sys-devel/lld:${LLVM_SLOT}=
+ ')
+ dev-util/hipcc:${SLOT}
+"
+DEPEND="${RDEPEND}"
+
+CMAKE_BUILD_TYPE=Release
+
+src_unpack() {
+ if [[ ${PV} == *9999 ]] ; then
+ git-r3_fetch
+ git-r3_checkout '' . '' "${components[@]}"
+ else
+ archive="${MY_P}.tar.gz"
+ ebegin "Unpacking from ${archive}"
+ tar -x -z -o \
+ -f "${DISTDIR}/${archive}" \
+ "${components[@]/#/${MY_P}/}" || die
+ eend ${?}
+ fi
+}
+
+src_prepare() {
+ sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
+ sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix)\")," -i src/comgr-env.cpp || die
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
+
+ cmake_src_prepare
+
+ # Replace @CLANG_RESOURCE_DIR@ in patches
+ local CLANG_RESOURCE_DIR="$("$(get_llvm_prefix)"/bin/clang -print-resource-dir)"
+ sed "s,@CLANG_RESOURCE_DIR@,\"${CLANG_RESOURCE_DIR}\"," -i src/comgr-compiler.cpp || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="$(get_llvm_prefix)"
+ -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
+ -DBUILD_TESTING=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ comgr_nested_kernel_test # See https://github.com/ROCm/llvm-project/issues/35
+ )
+ cmake_src_test
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2024-03-08 19:22 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2024-03-08 19:22 UTC (permalink / raw
To: gentoo-commits
commit: 7a3035702e3527a0e4a2140dd620d3f9221324f0
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Thu Nov 2 21:22:34 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 8 19:21:56 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a303570
dev-libs/rocm-comgr: add fix-tests-rocm-path patch
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch | 12 ++++++++++++
dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild | 1 +
2 files changed, 13 insertions(+)
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch
new file mode 100644
index 000000000000..30a44577b1aa
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch
@@ -0,0 +1,12 @@
+Vanilla clang requires either -nogpulib or both --rocm-path and --rocm-device-lib-path flags
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -39,7 +39,7 @@ endmacro()
+ macro(add_test_input_bitcode name input output)
+ add_custom_command(
+ OUTPUT "${output}"
+- COMMAND "$<TARGET_FILE:clang>" -c --offload-arch=gfx906 -emit-llvm -fgpu-rdc
++ COMMAND "$<TARGET_FILE:clang>" -c --offload-arch=gfx906 -emit-llvm -fgpu-rdc --rocm-path=@GENTOO_PORTAGE_EPREFIX@/usr --hip-device-lib-path=@GENTOO_PORTAGE_EPREFIX@/usr/lib/amdgcn/bitcode
+ --gpu-bundle-output ${ARGN} "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
+ -o "${output}"
+ VERBATIM
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
index ff181f1b4615..099a4def161a 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -50,6 +50,7 @@ src_prepare() {
sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.7.1-fix-tests-rocm-path.patch)
cmake_src_prepare
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2023-11-01 9:28 Yixun Lan
0 siblings, 0 replies; 13+ messages in thread
From: Yixun Lan @ 2023-11-01 9:28 UTC (permalink / raw
To: gentoo-commits
commit: b5e1a592b74cbf80aed97f6b75d74ce4f9073258
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sat Oct 21 06:18:48 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Nov 1 09:26:19 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5e1a592
dev-libs/rocm-comgr: Bump fix-test.patch as well
This is a small change only on test code that let all tests pass, does
not affect installed package at all.
References: https://bugs.gentoo.org/836475#c5
References: https://github.com/gentoo/gentoo/pull/33400#issuecomment-1773686422
Closes: https://bugs.gentoo.org/836475
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
.../files/rocm-comgr-5.7.1-fix-tests.patch | 50 ++++++++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild | 1 +
2 files changed, 51 insertions(+)
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch
new file mode 100644
index 000000000000..80f1f90dbe94
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch
@@ -0,0 +1,50 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+Index: comgr/test/source/source1.cl
+===================================================================
+--- comgr.orig/test/source/source1.cl
++++ comgr/test/source/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
+Index: comgr/test/mangled_names_test.c
+===================================================================
+--- comgr.orig/test/mangled_names_test.c
++++ comgr/test/mangled_names_test.c
+@@ -162,7 +162,7 @@ int main(int argc, char *argv[]) {
+ exit(1);
+ }
+
+- const char *bcNames[] = {"source1", "source2"};
++ const char *bcNames[] = {"source3", "source1"};
+
+ for (size_t I = 0; I < numNames; ++I) {
+ size_t Size;
+@@ -249,14 +249,14 @@ int main(int argc, char *argv[]) {
+
+ Status = amd_comgr_populate_mangled_names(DataExec, &numNames);
+
+- if (numNames != 4) {
++ if (numNames != 6) {
+ printf("amd_populate_mangled_names Failed: "
+- "produced %zu executable names (expected 4)\n",
++ "produced %zu executable names (expected 6)\n",
+ Count);
+ exit(1);
+ }
+
+- const char *execNames[] = {"source1", "source1.kd", "source2", "source2.kd"};
++ const char *execNames[] = {"source3", "source3.kd", "source1", "source1.kd", "source2", "source2.kd"};
+
+ for (size_t I = 0; I < numNames; ++I) {
+ size_t Size;
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
index 28f2b5385c71..dd4856872ff2 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.7.0-disassembly.patch"
"${FILESDIR}/${PN}-5.7.0-metadata.patch"
"${FILESDIR}/${PN}-5.7.0-symbolizer.patch"
+ "${FILESDIR}/${PN}-5.7.1-fix-tests.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2023-09-03 6:31 罗百科
0 siblings, 0 replies; 13+ messages in thread
From: 罗百科 @ 2023-09-03 6:31 UTC (permalink / raw
To: gentoo-commits
commit: 2406819f625713884dfba25c3fdbfe1f77106cf4
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 3 06:16:20 2023 +0000
Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Sun Sep 3 06:31:23 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2406819f
dev-libs/rocm-comgr: add 5.5.1
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 1 +
dev-libs/rocm-comgr/files/9999-include.patch | 10 ++++
.../files/rocm-comgr-5.5.1-fix-tests.patch | 17 ++++++
.../files/rocm-comgr-5.5.1-lld-include.patch | 22 ++++++++
.../files/rocm-comgr-5.5.1-nullopt.patch | 23 ++++++++
.../files/rocm-comgr-5.5.1-opt_mrelax.patch | 23 ++++++++
.../files/rocm-comgr-5.5.1-subtargetfeatures.patch | 26 +++++++++
dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild | 64 ++++++++++++++++++++++
8 files changed, 186 insertions(+)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 987ecc12644a..ffbc20898d35 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,3 +1,4 @@
DIST rocm-comgr-5.1.3.tar.gz 117155 BLAKE2B 40e415c4c7ae3e709dd50981299291f0fc1133f35310b4c86a86847d3bce5fd7685a3f4480f8f156873ca922921c1d4e1cb620fd33bd5cdc87f155af839f2bbe SHA512 5927250f5e03c32b7f270a1dbfe5221d349dfe32aba34143040da53d4e7eb83faa3073a43edabcff13e1fc977bc17088404523f2ab2ea95e207d2c00beb4249b
DIST rocm-comgr-5.3.3.tar.gz 120414 BLAKE2B 29b9d466d74ef94165a2b9bea35eac4616f6b2fc529cdac3c830ee7dc08f219cb9e5d4f081658881c76633f12eaebb74d1a2ea30a76652231b8ee516f9988db1 SHA512 ba7b1ef214e3624168e438ed7fd94291a07508fe89d178c0b158bf22e0998d5a8e4d8f0a7f08f05ac108ef65f725db5764fd66353a85bc25000e572a4fdcb61f
DIST rocm-comgr-5.4.3.tar.gz 120461 BLAKE2B c4eb79dd5a72a2b18e16841fc8cb9a3a33efb0c7b04a7585df9672d682bba6fa826ab8b37dba5febca3b8c5ee5aca30d8546e1fa69e77671e5c750e2a8c1f12f SHA512 1a25af99a0166d70ca6dc5df5a667068eaf583dccd74bbb18a2a5de3c1b769e0c1eb9a0c539e0cd88bc50bbbe53214a1d1b23fbdfd6fc5b6507c44da259815c4
+DIST rocm-comgr-5.5.1.tar.gz 127475 BLAKE2B dbcb6729b27c0b4a4be37f5e462d96b10c15a6a3b540a81a74a648fc45dc727ea5706db1a0f4583a31ac4cb5c9f0d9f4e258fa5ac792b327f4cb1dfe6d585937 SHA512 09174ef2ad21f62b197e439bb5b04a365233c360c57cc2ccf0ea3d53edfa8880dff4f127c6d6c1d430b63b6f7ea666705b14cadc2bccb89c0fefed943b0cf1c7
diff --git a/dev-libs/rocm-comgr/files/9999-include.patch b/dev-libs/rocm-comgr/files/9999-include.patch
new file mode 100644
index 000000000000..58770c819967
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/9999-include.patch
@@ -0,0 +1,10 @@
+--- comgr/src/comgr-env.h.orig 2023-06-07 02:39:28.039489253 +0200
++++ comgr/src/comgr-env.h 2023-06-07 02:39:58.502264137 +0200
+@@ -38,6 +38,7 @@
+
+ #include "llvm/ADT/Optional.h"
+ #include "llvm/ADT/StringRef.h"
++#include "llvm/ADT/None.h"
+
+ namespace COMGR {
+ namespace env {
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
new file mode 100644
index 000000000000..9fd14df196a2
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-fix-tests.patch
@@ -0,0 +1,17 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+--- comgr.orig/test/source/source1.cl
++++ comgr/test/source/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
new file mode 100644
index 000000000000..96df9291eb86
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-lld-include.patch
@@ -0,0 +1,22 @@
+From 271fddf65f43675e675f0cb4e9aaa3d27d34c58a Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Thu, 29 Dec 2022 05:17:41 -0600
+Subject: [PATCH] [llvm merge] add include of lld/Common/CommonLinkerContext.h
+
+Change-Id: I5767b4c1e683e9df9146804ba23ef3c0c0b6c07a
+---
+ lib/comgr/src/comgr-compiler.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
+index 2a7362a..bb1c9d3 100644
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -39,6 +39,7 @@
+ #include "comgr-compiler.h"
+ #include "comgr-device-libs.h"
+ #include "comgr-env.h"
++#include "lld/Common/CommonLinkerContext.h"
+ #include "lld/Common/Driver.h"
+ #include "clang/Basic/Version.h"
+ #include "clang/CodeGen/CodeGenAction.h"
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
new file mode 100644
index 000000000000..8bb07b55a3ab
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-nullopt.patch
@@ -0,0 +1,23 @@
+From e1da67c6acb2b0e4a8f9c05c89e3778252ea5aa7 Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Sat, 17 Dec 2022 19:58:26 -0600
+Subject: [PATCH] None -> std::nullopt
+
+Change-Id: I1cc241aa47de538f9f5b1c12cb5655aca8a4502f
+---
+ lib/comgr/src/comgr-env.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-env.cpp b/lib/comgr/src/comgr-env.cpp
+index 742f4d4..6ab6f0f 100644
+--- comgr/src/comgr-env.cpp
++++ comgr/src/comgr-env.cpp
+@@ -53,7 +53,7 @@ bool shouldSaveTemps() {
+ Optional<StringRef> getRedirectLogs() {
+ static char *RedirectLogs = getenv("AMD_COMGR_REDIRECT_LOGS");
+ if (!RedirectLogs || StringRef(RedirectLogs) == "0") {
+- return None;
++ return std::nullopt;
+ }
+ return StringRef(RedirectLogs);
+ }
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
new file mode 100644
index 000000000000..aa3e7c370a53
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-opt_mrelax.patch
@@ -0,0 +1,23 @@
+From b582dfb33fdb51065c22800fe02dd83207185664 Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Sun, 1 Jan 2023 10:35:49 -0600
+Subject: [PATCH] [llvm] move to inverted OPT_mrelax_relocations_no
+
+Change-Id: I95e48e8acf5b9124d25e5e7b86c418f1a0d9389d
+---
+ lib/comgr/src/comgr-compiler.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
+index bb1c9d3..95c1bb4 100644
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -259,7 +259,7 @@ bool AssemblerInvocation::createFromArgs(AssemblerInvocation &Opts,
+ }
+ }
+
+- Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
++ Opts.RelaxELFRelocations = !Args.hasArg(OPT_mrelax_relocations_no);
+ Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
+ Opts.DwarfDebugFlags =
+ std::string(Args.getLastArgValue(OPT_dwarf_debug_flags));
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
new file mode 100644
index 000000000000..340df3852fc2
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.5.1-subtargetfeatures.patch
@@ -0,0 +1,26 @@
+From 48c682d577a7955256d0bfac5d497b3feebff11c Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Mon, 16 Jan 2023 14:29:05 -0600
+Subject: [PATCH] [llvm merge] Move to Expected on SubtargetFeatures
+
+Change-Id: I060ceaa2b51eaa6ed1b472ea42c6788b98001088
+---
+ lib/comgr/src/comgr-objdump.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
+index 86a5d7f..6d20a3c 100644
+--- comgr/src/comgr-objdump.cpp
++++ comgr/src/comgr-objdump.cpp
+@@ -1270,7 +1270,10 @@ void llvm::DisassemHelper::DisassembleObject(const ObjectFile *Obj,
+ const Target *TheTarget = getTarget(Obj);
+
+ // Package up features to be passed to target/subtarget
+- SubtargetFeatures Features = Obj->getFeatures();
++ Expected<SubtargetFeatures> FeaturesValue = Obj->getFeatures();
++ if (!FeaturesValue)
++ WithColor::error(errs(), ToolName) << FeaturesValue.takeError();
++ SubtargetFeatures Features = *FeaturesValue;
+ std::vector<std::string> MAttrs = lld::getMAttrs();
+ if (MAttrs.size()) {
+ for (unsigned I = 0; I != MAttrs.size(); ++I) {
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild
new file mode 100644
index 000000000000..e005c30f1efb
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.5.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake llvm prefix
+
+LLVM_MAX_SLOT=16
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/lib/comgr"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
+ KEYWORDS="~amd64"
+fi
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
+ "${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
+ "${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
+ "${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
+ "${FILESDIR}/${PN}-5.5.1-fix-tests.patch"
+ "${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
+ "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
+ "${FILESDIR}/${PN}-5.5.1-nullopt.patch"
+ "${FILESDIR}/${PN}-5.5.1-opt_mrelax.patch"
+ "${FILESDIR}/${PN}-5.5.1-lld-include.patch"
+ "${FILESDIR}/${PN}-5.5.1-subtargetfeatures.patch"
+)
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocm-device-libs-${PV}
+ sys-devel/clang:${LLVM_MAX_SLOT}=
+ sys-devel/clang-runtime:=
+ sys-devel/lld:${LLVM_MAX_SLOT}="
+DEPEND="${RDEPEND}"
+
+CMAKE_BUILD_TYPE=Release
+
+src_prepare() {
+ sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
+ sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="$(get_llvm_prefix ${LLVM_MAX_SLOT})"
+ -DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
+ -DBUILD_TESTING=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2023-03-07 7:57 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2023-03-07 7:57 UTC (permalink / raw
To: gentoo-commits
commit: 82a2720349d070fa86090fd9434bcfae75260a68
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Wed Mar 1 02:54:09 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 7 07:56:59 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82a27203
dev-libs/rocm-comgr: Fix comgr and mesa LLVM option collision
>=dev-libs/rocm-comgr-5.3 and <=9999 needs backport a patch from
upstream to avoid register -h command line option, which resolves
conflicts with media-libs/mesa. Benefits media-gfx/blender.
Bug: https://bugs.gentoo.org/851702
Reference: https://github.com/gentoo/gentoo/pull/27552
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29866
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/rocm-comgr-5.3.3-remove-h-option.patch | 43 ++++++++++++++++++++++
...-5.3.3-r1.ebuild => rocm-comgr-5.3.3-r2.ebuild} | 1 +
...mgr-5.4.3.ebuild => rocm-comgr-5.4.3-r1.ebuild} | 1 +
3 files changed, 45 insertions(+)
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch
new file mode 100644
index 000000000000..1346ba4ef04d
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-remove-h-option.patch
@@ -0,0 +1,43 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/commit/2d05f9e480cbc591a6b888dfd49d9f7ef1bef25f
+Reference: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/52
+Reference: https://bugs.gentoo.org/851702#c37
+This unblocks building blender with HIP cycles support
+======================================================================
+From 2d05f9e480cbc591a6b888dfd49d9f7ef1bef25f Mon Sep 17 00:00:00 2001
+From: Jacob Lambert <jacob.lambert@amd.com>
+Date: Thu, 12 Jan 2023 08:45:38 -0800
+Subject: [PATCH] Remove -h option from comgr-objdump
+
+The -h option (short for -headers) is a legal objdump option.
+However registering this as an LLVM option by Comgr prevents other
+LLVM tools or instances from registering a -h option in the same
+process, which is an issue because -h is a common short form for
+-help.
+
+A long term solution will be to libraryize llvm-obj dump, and
+call it in Comgr via an API instead of re-implementation, which
+will eliminate the need for Comgr to register any LLVM options for
+objdump.
+
+Change-Id: Ieb1981aeb1826422647fd301c4827e2bfb370560
+---
+ lib/comgr/src/comgr-objdump.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/comgr/src/comgr-objdump.cpp b/lib/comgr/src/comgr-objdump.cpp
+index 6d20a3c..ead69fe 100644
+--- a/src/comgr-objdump.cpp
++++ b/src/comgr-objdump.cpp
+@@ -175,9 +175,9 @@ cl::opt<bool> SectionHeaders("section-headers",
+ static cl::alias SectionHeadersShort("headers",
+ cl::desc("Alias for --section-headers"),
+ cl::aliasopt(SectionHeaders));
+-static cl::alias SectionHeadersShorter("h",
+- cl::desc("Alias for --section-headers"),
+- cl::aliasopt(SectionHeaders));
++// The following option has been removed to avoid conflicts with
++// other llvm tools/instances also attempting to register a -h option
++// static cl::alias SectionHeadersShorter("h", ...)
+
+ cl::list<std::string>
+ FilterSections("section",
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild
similarity index 97%
rename from dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
rename to dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild
index f97e82109722..1ed450afa574 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r2.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
"${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
"${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
+ "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.4.3.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild
similarity index 97%
rename from dev-libs/rocm-comgr/rocm-comgr-5.4.3.ebuild
rename to dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild
index 4f784ee9ee57..f04009a2596a 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.4.3.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.4.3-r1.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
"${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
"${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
+ "${FILESDIR}/${PN}-5.3.3-remove-h-option.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2023-02-02 12:54 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2023-02-02 12:54 UTC (permalink / raw
To: gentoo-commits
commit: ff5673d31363d797f1e40afa8038b9a9fa4c56c1
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Jan 27 05:37:34 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 2 12:53:03 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5673d3
dev-libs/rocm-comgr: enable tests
Includes a patch that fixes the failed test due to unsupported feature
of vanilla llvm, which is a better approach compares to
https://src.fedoraproject.org/rpms/rocm-compilersupport/c/84acb10b0c831e674a4d01e677a51d7c672d2f43?branch=rawhide
100% tests passed, 0 tests failed out of 29
Total Test time (real) = 7.45 sec
* Tests succeeded.
Bug: https://bugs.gentoo.org/836475
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch | 17 +++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild | 4 ++++
2 files changed, 21 insertions(+)
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
new file mode 100644
index 000000000000..08a40460c762
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
@@ -0,0 +1,17 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+--- comgr.orig/test/source1.cl
++++ comgr/test/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
index 0215adeaba17..c00adc6c1727 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
@@ -17,6 +17,9 @@ else
KEYWORDS="~amd64"
fi
+IUSE="test"
+RESTRICT="!test? ( test )"
+
PATCHES=(
"${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
"${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
@@ -24,6 +27,7 @@ PATCHES=(
"${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
"${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
"${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
+ "${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2022-02-11 16:12 Joonas Niilola
0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2022-02-11 16:12 UTC (permalink / raw
To: gentoo-commits
commit: 592a9d11f1b9e3e5e301a71310cc37b5aa294d7e
Author: Fco Javier Felix <ffelix <AT> inode64 <DOT> com>
AuthorDate: Fri Feb 11 15:55:27 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Feb 11 16:12:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=592a9d11
dev-libs/rocm-comgr: bump to 4.5.2
Package-Manager: Portage-3.0.28-r1, Repoman-3.0.3-r1
Signed-off-by: Fco. Javier Felix <ffelix <AT> inode64.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 1 +
.../files/rocm-comgr-4.5.2-dependencies.patch | 53 ++++++++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild | 44 ++++++++++++++++++
3 files changed, 98 insertions(+)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 9dbfb98badca..529fb368e822 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -4,3 +4,4 @@ DIST rocm-comgr-4.0.0.tar.gz 98316 BLAKE2B d96200d2fe8929631d1f40577a115b72e2341
DIST rocm-comgr-4.1.0.tar.gz 101923 BLAKE2B 227317d3c96d577ff2df352721e3ffcf75e25548bfef29c425a3417af2b6fdbceeb80bc86508a9a510e9eb7f4dd2ff5c6da3c13af122dfb0dff6475d73a5c9ff SHA512 def3774072262ac6e5c836d7dcd23770045765882e76c8de87e21d04515a562ba213685736ccb4e5b01814de846b68aa9db77e40f0d834a68fc4a9b3301aaff9
DIST rocm-comgr-4.2.0.tar.gz 101877 BLAKE2B 6796ab4fc7139224af9e26f6adc5ac3ef260b36d125517766bc4adf3dd819709e5aa816680ae073f00db635d15d2a3bde7bfc69bdfbea0f49453f75930fae90d SHA512 dffc00d166eb060c6cf848878cc6c7fc63858168cd20b5f22df2b7cbf3ac7a3253fbab5df4df055823028a06c3dca3e3f379246305ae9872eb94bcdbd30dd602
DIST rocm-comgr-4.3.0.tar.gz 106250 BLAKE2B 40a3a69147ae4fc96d3713331d35ae65d952dbf92fb3c92bee75bbef394342b11f383cb51c6def85c256326905c5067b1da816e853f793fd3c40a5af9a6e0122 SHA512 5961720bdc78c6d3fc626bd83f52be0aa32b01178bf4db0a503a0639fe05c5c589b7feb2dcbeb78021d36a40ac6f936cb1262cd5ab5cda4689e8e642ab7eddc3
+DIST rocm-comgr-4.5.2.tar.gz 108521 BLAKE2B 9fe238a17bac5739d2d103d859a8dd16cb95d0333f9f85e7fd94463c4ee8bd88801b7b1d1278d978fda7425f391de5e9043a3539583ed3b8d45393a613c19bba SHA512 c466a9bb1b725b79d056673824c6dd79919866f42db88b611e4ac24b0624b12c078affe8bfc7ad7c1373ce0ca60607904c46f13751b47c9f4deaf4105e2c7cd3
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch
new file mode 100644
index 000000000000..13cff2e52dfe
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-4.5.2-dependencies.patch
@@ -0,0 +1,53 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25
+
+From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Sun, 1 Mar 2020 19:24:22 -0500
+Subject: [PATCH] Link additional required LLVM libraries
+
+Without these additional required dependencies, linking fails with errors such as:
+`undefined reference to llvm::errs()'`
+---
+ CMakeLists.txt | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1794a07..c7b852a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -207,7 +207,11 @@ install(FILES
+ DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
+
+ set(CLANG_LIBS
+- clangFrontendTool)
++ clangFrontendTool
++ clangFrontend
++ clangBasic
++ clangDriver
++ clangSerialization)
+
+ set(LLD_LIBS
+ lldELF
+@@ -218,8 +222,21 @@ if (LLVM_LINK_LLVM_DYLIB)
+ else()
+ 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
++ Demangle
++ BinaryFormat)
+ endif()
+
+ target_link_libraries(amd_comgr
diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild
new file mode 100644
index 000000000000..772aeb9b4102
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/lib/comgr"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
+ KEYWORDS="~amd64"
+fi
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.5.2-dependencies.patch"
+)
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocm-device-libs-${PV}
+ >=sys-devel/llvm-roc-${PV}:="
+DEPEND="${RDEPEND}"
+
+CMAKE_BUILD_TYPE=Release
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLD_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/lld"
+ -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/llvm"
+ -DClang_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/clang"
+ )
+ cmake_src_configure
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2020-08-25 21:08 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2020-08-25 21:08 UTC (permalink / raw
To: gentoo-commits
commit: 8841a673aeb54b8801671d7cc9cb0ebf3fca69cb
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 25 21:02:54 2020 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Aug 25 21:08:06 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8841a673
dev-libs/rocm-comgr: Cleanup old versions
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 4 --
.../files/rocm-comgr-2.6.0-find-clang.patch | 26 -------
.../files/rocm-comgr-2.6.0-find-lld-includes.patch | 43 -----------
.../files/rocm-comgr-2.8.0-dependencies.patch | 84 ----------------------
dev-libs/rocm-comgr/rocm-comgr-3.0.0.ebuild | 41 -----------
dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild | 41 -----------
dev-libs/rocm-comgr/rocm-comgr-3.3.0.ebuild | 41 -----------
dev-libs/rocm-comgr/rocm-comgr-3.5.0.ebuild | 41 -----------
8 files changed, 321 deletions(-)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index eb602155f7a..f5bcffb66d9 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,5 +1 @@
-DIST rocm-comgr-3.0.0.tar.gz 88594 BLAKE2B d3fb356962ba6a9ffc7aa295f1582f6587d55d1f4f2a9a978f5c189f4a0597a9cb3f9806a1f2f43f14e262bc19964e06f41df3c7f45ac3c1579511fe235cc940 SHA512 ffa250c44388b1985ec0dac68bf0dd27820933fe7579f7fc6b35d783852cd03fb02919b5e800b01d536c36eb3c5bff96d1a38f5c8ab6380d6584b2e6d19a25fc
-DIST rocm-comgr-3.1.0.tar.gz 88654 BLAKE2B 2b74fcde11a9fdd815526cb6fae81c1844aed5d73e961c437c9d3585b8cbd538983a9b06a5130eb75e5ac272d0a833f459053436f48116eb430c742de532ce65 SHA512 be148e92c84aacfc11724b0bfb54fab0e8cec2474eb943b1df4841517d47a3995b179afafcaa0730ddb9fadf891ca4797ce6613afac1f6f018dcc5b030a32e98
-DIST rocm-comgr-3.3.0.tar.gz 88792 BLAKE2B e84d63c0462bd64a7f10a6092d736811e834c6541aea2ee6363b60e7ab5652dc3efee16ae353dbc7ddeca343f7ce2d41b381cdd722dc98d7c9e9f2c43d4ff25f SHA512 681656f87639c1a1893e073738c253d5a0a63c23d8555e59950828c0a3d7ed997b0a70d827aae6e0af6a465a433acd0e82dd921bd12b9df31628f53ea83754a9
-DIST rocm-comgr-3.5.0.tar.gz 89330 BLAKE2B 463b5a7fed9588a87308ef7b8ad52a25000baf53556022b68c666dfd41d9d89877bb392aaf58de947b35bfae74b13ca06ae6f3770ef689c612e31318ebb9d981 SHA512 8f4b702976f31e2221ed0a545ffe028fecb268b3939b8e13b8f321786dc63398e5715ecb1910c0ca671454702dcc3671d518cc458c5a02e8cc63a90d029ca569
DIST rocm-comgr-3.7.0.tar.gz 94875 BLAKE2B 0d6b01360cbdb4a40aab9dadcc56389a3edc11380fe1c39a29a9f3c0356708ae95ce8918bf9d4d4fa46c1a077a2daf99c5bad65906d24ea4948de93e1d4d0280 SHA512 62a08b286313234c4c3226872a410afe9818c829fb3424f4c2a464f759d8d3c6a701de4a89ea21fe6ac2b9620cec0a44c04dd5a793ba30a0537ed3ddf86fff46
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
deleted file mode 100644
index dda005ab7a2..00000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-clang.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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
deleted file mode 100644
index 5b44feaf1b3..00000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-find-lld-includes.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-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.8.0-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.8.0-dependencies.patch
deleted file mode 100644
index 3a0af258c05..00000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.8.0-dependencies.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/19
-
-From 5f872ae4a059ac6a09669e301b8a60b11a25eb42 Mon Sep 17 00:00:00 2001
-From: Craig Andrews <candrews@integralblue.com>
-Date: Wed, 31 Jul 2019 11:51:17 -0400
-Subject: [PATCH 1/2] Link additional required LLVM libraries
-
-Without these additional required dependencies, linking fails with errors such as:
-`undefined reference to `llvm::errs()'`
----
- CMakeLists.txt | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 454b830..95e5799 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -185,7 +185,11 @@ add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
- include_directories(./yaml-cpp/include)
-
- set(CLANG_LIBS
-- clangFrontendTool)
-+ clangFrontendTool
-+ clangFrontend
-+ clangBasic
-+ clangDriver
-+ clangSerialization)
-
- set(LLD_LIBS
- lldELF
-@@ -193,8 +197,19 @@ set(LLD_LIBS
-
- 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
-
-From ffc4d18a7ae1fbd5c8807eec4ca8aed043524811 Mon Sep 17 00:00:00 2001
-From: Craig Andrews <candrews@integralblue.com>
-Date: Mon, 30 Sep 2019 10:52:12 -0400
-Subject: [PATCH 2/2] Link more required LLVM libraries
-
-Without these additional required dependencies, linking fails with errors such as:
-```
-in function `amd_comgr_index_list_metadata':
-<artificial>:(.text+0x4d4c): undefined reference to `llvm::msgpack::ArrayDocNode::operator[](unsigned long)'
-```
-and
-```
-undefined reference to `llvm::msgpack::Document::fromYAML(llvm::StringRef)'
-```
----
- CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 95e5799..b6123a6 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -209,7 +209,8 @@ llvm_map_components_to_libnames(LLVM_LIBS
- Core
- IRReader
- CodeGen
-- Linker)
-+ Linker
-+ BinaryFormat)
-
- target_link_libraries(amd_comgr
- PUBLIC
diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.0.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.0.0.ebuild
deleted file mode 100644
index 4eeaffa1c91..00000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.0.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-roc-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-PATCHES=(
- "${FILESDIR}/${PN}-2.6.0-find-clang.patch"
- "${FILESDIR}/${PN}-2.6.0-find-lld-includes.patch"
- "${FILESDIR}/${PN}-2.8.0-dependencies.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- >=sys-devel/llvm-roc-${PV}:="
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild
deleted file mode 100644
index 96891e69855..00000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-roc-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-PATCHES=(
- "${FILESDIR}/${PN}-2.6.0-find-clang.patch"
- "${FILESDIR}/${PN}-2.6.0-find-lld-includes.patch"
- "${FILESDIR}/${PN}-3.1.0-dependencies.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- >=sys-devel/llvm-roc-${PV}:="
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.3.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.3.0.ebuild
deleted file mode 100644
index 0c08627ebd8..00000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.3.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-PATCHES=(
- "${FILESDIR}/${PN}-2.6.0-find-clang.patch"
- "${FILESDIR}/${PN}-2.6.0-find-lld-includes.patch"
- "${FILESDIR}/${PN}-3.1.0-dependencies.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- >=sys-devel/llvm-roc-${PV}:="
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
- )
- cmake_src_configure
-}
diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.5.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.5.0.ebuild
deleted file mode 100644
index 097011983ea..00000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.5.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
- inherit git-r3
- S="${WORKDIR}/${P}/lib/comgr"
-else
- SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/ROCm-CompilerSupport-rocm-${PV}/lib/comgr"
- KEYWORDS="~amd64"
-fi
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.1.0-dependencies.patch"
-)
-
-DESCRIPTION="Radeon Open Compute Code Object Manager"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-RDEPEND=">=dev-libs/rocm-device-libs-${PV}
- >=sys-devel/llvm-roc-${PV}:="
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/llvm"
- -DClang_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/clang"
- )
- cmake_src_configure
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2020-03-02 0:39 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2020-03-02 0:39 UTC (permalink / raw
To: gentoo-commits
commit: 2c941595ab9c0a41d1b2e0ebde0fd3cdb731a82f
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 2 00:34:07 2020 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Mar 2 00:39:07 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c941595
dev-libs/rocm-comgr: 3.1.0 version bump
Closes: https://bugs.gentoo.org/711006
Package-Manager: Portage-2.3.90, Repoman-2.3.20
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 1 +
.../files/rocm-comgr-3.1.0-dependencies.patch | 52 ++++++++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild | 41 +++++++++++++++++
3 files changed, 94 insertions(+)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 6ed802333f8..12383981b19 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1 +1,2 @@
DIST rocm-comgr-3.0.0.tar.gz 88594 BLAKE2B d3fb356962ba6a9ffc7aa295f1582f6587d55d1f4f2a9a978f5c189f4a0597a9cb3f9806a1f2f43f14e262bc19964e06f41df3c7f45ac3c1579511fe235cc940 SHA512 ffa250c44388b1985ec0dac68bf0dd27820933fe7579f7fc6b35d783852cd03fb02919b5e800b01d536c36eb3c5bff96d1a38f5c8ab6380d6584b2e6d19a25fc
+DIST rocm-comgr-3.1.0.tar.gz 88654 BLAKE2B 2b74fcde11a9fdd815526cb6fae81c1844aed5d73e961c437c9d3585b8cbd538983a9b06a5130eb75e5ac272d0a833f459053436f48116eb430c742de532ce65 SHA512 be148e92c84aacfc11724b0bfb54fab0e8cec2474eb943b1df4841517d47a3995b179afafcaa0730ddb9fadf891ca4797ce6613afac1f6f018dcc5b030a32e98
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-3.1.0-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-3.1.0-dependencies.patch
new file mode 100644
index 00000000000..d70ed495700
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-3.1.0-dependencies.patch
@@ -0,0 +1,52 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25
+
+From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Sun, 1 Mar 2020 19:24:22 -0500
+Subject: [PATCH] Link additional required LLVM libraries
+
+Without these additional required dependencies, linking fails with errors such as:
+`undefined reference to llvm::errs()'`
+---
+ CMakeLists.txt | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1794a07..c7b852a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -207,7 +207,11 @@ install(FILES
+ DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
+
+ set(CLANG_LIBS
+- clangFrontendTool)
++ clangFrontendTool
++ clangFrontend
++ clangBasic
++ clangDriver
++ clangSerialization)
+
+ set(LLD_LIBS
+ lldELF
+@@ -218,8 +222,20 @@ if (LLVM_LINK_LLVM_DYLIB)
+ else()
+ 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
++ BinaryFormat)
+ endif()
+
+ target_link_libraries(amd_comgr
diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild
new file mode 100644
index 00000000000..96891e69855
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-3.1.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/lib/comgr"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-CompilerSupport-roc-${PV}/lib/comgr"
+ KEYWORDS="~amd64"
+fi
+PATCHES=(
+ "${FILESDIR}/${PN}-2.6.0-find-clang.patch"
+ "${FILESDIR}/${PN}-2.6.0-find-lld-includes.patch"
+ "${FILESDIR}/${PN}-3.1.0-dependencies.patch"
+)
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocm-device-libs-${PV}
+ >=sys-devel/llvm-roc-${PV}:="
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
+ )
+ cmake_src_configure
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2019-09-27 18:05 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2019-09-27 18:05 UTC (permalink / raw
To: gentoo-commits
commit: a7dd8be8771e2c87149d061152541aa4bdf917d7
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 27 18:04:37 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Fri Sep 27 18:05:00 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7dd8be8
dev-libs/rocm-comgr: fix llvm related build error
Closes: https://bugs.gentoo.org/695660
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
.../rocm-comgr-2.7.0-llvm-interface-change.patch | 176 +++++++++++++++++++++
dev-libs/rocm-comgr/rocm-comgr-2.7.0.ebuild | 1 +
2 files changed, 177 insertions(+)
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch
new file mode 100644
index 00000000000..dc8ed42fc46
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch
@@ -0,0 +1,176 @@
+From a73e4ce7c686787840454e206a17973685b03e62 Mon Sep 17 00:00:00 2001
+From: Michael LIAO <michaelhongbin.liao@amd.com>
+Date: Thu, 15 Aug 2019 13:25:58 -0400
+Subject: [PATCH] Fix comgr build due to LLVM interface change.
+
+Change-Id: I66c2203f09b683dd06807860eeb5f517cd200f0e
+---
+ src/comgr-objdump.cpp | 68 +++++++++++++++++++++++----------
+ 1 file changed, 47 insertions(+), 21 deletions(-)
+
+diff --git a/src/comgr-objdump.cpp b/src/comgr-objdump.cpp
+index bf490b6..59a9d05 100644
+--- a/src/comgr-objdump.cpp
++++ b/src/comgr-objdump.cpp
+@@ -307,15 +307,18 @@ class SectionFilter {
+ FilterPredicate Predicate;
+ llvm::object::ObjectFile const &Object;
+ };
++
+ SectionFilter ToolSectionFilter(llvm::object::ObjectFile const &O) {
+ return SectionFilter(
+ [](llvm::object::SectionRef const &S) {
+ if (FilterSections.empty())
+ return true;
+- llvm::StringRef String;
+- std::error_code error = S.getName(String);
+- if (error)
++ Expected<StringRef> SecNameOrErr = S.getName();
++ if (!SecNameOrErr) {
++ consumeError(SecNameOrErr.takeError());
+ return false;
++ }
++ StringRef String = *SecNameOrErr;
+ return is_contained(FilterSections, String);
+ },
+ O);
+@@ -394,6 +397,18 @@ report_error(StringRef ArchiveName, const object::Archive::Child &C,
+ report_error(ArchiveName, NameOrErr.get(), std::move(E), ArchitectureName);
+ }
+
++static LLVM_ATTRIBUTE_NORETURN void report_error(llvm::Error E,
++ StringRef File) {
++ report_error(File, std::move(E));
++}
++
++template <typename T, typename... Ts>
++T unwrapOrError(Expected<T> EO, Ts &&... Args) {
++ if (EO)
++ return std::move(*EO);
++ report_error(EO.takeError(), std::forward<Ts>(Args)...);
++}
++
+ static const Target *getTarget(const ObjectFile *Obj = nullptr) {
+ // Figure out the target triple.
+ llvm::Triple TheTriple("unknown-unknown-unknown");
+@@ -822,13 +837,13 @@ static void printRelocationTargetName(const MachOObjectFile *O,
+ for (const SectionRef &Section : ToolSectionFilter(*O)) {
+ std::error_code ec;
+
+- StringRef Name;
+ uint64_t Addr = Section.getAddress();
+ if (Addr != Val)
+ continue;
+- if ((ec = Section.getName(Name)))
+- report_error(O->getFileName(), ec);
+- fmt << Name;
++ Expected<StringRef> NameOrErr = Section.getName();
++ if (!NameOrErr)
++ report_error(O->getFileName(), NameOrErr.takeError());
++ fmt << *NameOrErr;
+ return;
+ }
+
+@@ -854,7 +869,11 @@ static void printRelocationTargetName(const MachOObjectFile *O,
+ section_iterator SI = O->section_begin();
+ // Adjust for the fact that sections are 1-indexed.
+ advance(SI, Val - 1);
+- SI->getName(S);
++ Expected<StringRef> SOrErr = SI->getName();
++ if (!SOrErr)
++ consumeError(SOrErr.takeError());
++ else
++ S = *SOrErr;
+ }
+
+ fmt << S;
+@@ -1362,8 +1381,7 @@ void llvm::DisassemHelper::DisassembleObject(const ObjectFile *Obj,
+ DataRefImpl DR = Section.getRawDataRefImpl();
+ SegmentName = MachO->getSectionFinalSegmentName(DR);
+ }
+- StringRef name;
+- error(Section.getName(name));
++ StringRef name = unwrapOrError(Section.getName(), Obj->getFileName());
+
+ if ((SectionAddr <= StopAddress) &&
+ (SectionAddr + SectSize) >= StartAddress) {
+@@ -1675,8 +1693,7 @@ void llvm::DisassemHelper::PrintRelocations(const ObjectFile *Obj) {
+ for (const SectionRef &Section : ToolSectionFilter(*Obj)) {
+ if (Section.relocation_begin() == Section.relocation_end())
+ continue;
+- StringRef secname;
+- error(Section.getName(secname));
++ StringRef secname = unwrapOrError(Section.getName(), Obj->getFileName());
+ OutS << "RELOCATION RECORDS FOR [" << secname << "]:\n";
+ for (const RelocationRef &Reloc : Section.relocations()) {
+ bool hidden = getHidden(Reloc);
+@@ -1699,8 +1716,7 @@ void llvm::DisassemHelper::PrintSectionHeaders(const ObjectFile *Obj) {
+ "Idx Name Size Address Type\n";
+ unsigned i = 0;
+ for (const SectionRef &Section : ToolSectionFilter(*Obj)) {
+- StringRef Name;
+- error(Section.getName(Name));
++ StringRef Name = unwrapOrError(Section.getName(), Obj->getFileName());
+ uint64_t Address = Section.getAddress();
+ uint64_t Size = Section.getSize();
+ bool Text = Section.isText();
+@@ -1717,9 +1733,8 @@ void llvm::DisassemHelper::PrintSectionHeaders(const ObjectFile *Obj) {
+ void llvm::DisassemHelper::PrintSectionContents(const ObjectFile *Obj) {
+ std::error_code EC;
+ for (const SectionRef &Section : ToolSectionFilter(*Obj)) {
+- StringRef Name;
+ StringRef Contents;
+- error(Section.getName(Name));
++ StringRef Name = unwrapOrError(Section.getName(), Obj->getFileName());
+ uint64_t BaseAddr = Section.getAddress();
+ uint64_t Size = Section.getSize();
+ if (!Size)
+@@ -1797,7 +1812,11 @@ void llvm::DisassemHelper::PrintSymbolTable(const ObjectFile *o,
+ section_iterator Section = *SectionOrErr;
+ StringRef Name;
+ if (Type == SymbolRef::ST_Debug && Section != o->section_end()) {
+- Section->getName(Name);
++ Expected<StringRef> NameOrErr = Section->getName();
++ if (!NameOrErr)
++ consumeError(NameOrErr.takeError());
++ else
++ Name = *NameOrErr;
+ } else {
+ Expected<StringRef> NameOrErr = Symbol.getName();
+ if (!NameOrErr)
+@@ -1846,8 +1865,7 @@ void llvm::DisassemHelper::PrintSymbolTable(const ObjectFile *o,
+ StringRef SegmentName = MachO->getSectionFinalSegmentName(DR);
+ OutS << SegmentName << ",";
+ }
+- StringRef SectionName;
+- error(Section->getName(SectionName));
++ StringRef SectionName = unwrapOrError(Section->getName(), o->getFileName());
+ OutS << SectionName;
+ }
+
+@@ -1978,7 +1996,11 @@ void llvm::DisassemHelper::printRawClangAST(const ObjectFile *Obj) {
+ Optional<object::SectionRef> ClangASTSection;
+ for (auto Sec : ToolSectionFilter(*Obj)) {
+ StringRef Name;
+- Sec.getName(Name);
++ auto NameOrErr = Sec.getName();
++ if (!NameOrErr) // FIXME: Need better error handling.
++ consumeError(NameOrErr.takeError());
++ else
++ Name = *NameOrErr;
+ if (Name == ClangASTSectionName) {
+ ClangASTSection = Sec;
+ break;
+@@ -2015,7 +2037,11 @@ void llvm::DisassemHelper::printFaultMaps(const ObjectFile *Obj) {
+
+ for (auto Sec : ToolSectionFilter(*Obj)) {
+ StringRef Name;
+- Sec.getName(Name);
++ auto NameOrErr = Sec.getName();
++ if (!NameOrErr) // FIXME: Need better error handling.
++ consumeError(NameOrErr.takeError());
++ else
++ Name = *NameOrErr;
+ if (Name == FaultMapSectionName) {
+ FaultMapSection = Sec;
+ break;
diff --git a/dev-libs/rocm-comgr/rocm-comgr-2.7.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-2.7.0.ebuild
index 17cde649143..e357310f253 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-2.7.0.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-2.7.0.ebuild
@@ -20,6 +20,7 @@ PATCHES=(
"${FILESDIR}/${PN}-2.6.0-find-lld-includes.patch"
"${FILESDIR}/${PN}-2.6.0-dependencies.patch"
"${FILESDIR}/${PN}-2.6.0-unbundle-yaml-cpp.patch"
+ "${FILESDIR}/${PN}-2.7.0-llvm-interface-change.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/
@ 2019-08-07 17:38 Craig Andrews
0 siblings, 0 replies; 13+ messages in thread
From: Craig Andrews @ 2019-08-07 17:38 UTC (permalink / raw
To: gentoo-commits
commit: c0aa27dab035db39ddc15bc22c0aba651513fead
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 31 15:53:28 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Aug 7 17:38:46 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0aa27da
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 <AT> gentoo.org>
dev-libs/rocm-comgr/Manifest | 1 +
.../files/rocm-comgr-2.6.0-correctly-install.patch | 44 +++++++++++++++
.../files/rocm-comgr-2.6.0-dependencies.patch | 63 ++++++++++++++++++++++
.../files/rocm-comgr-2.6.0-find-clang.patch | 26 +++++++++
.../files/rocm-comgr-2.6.0-find-lld-includes.patch | 43 +++++++++++++++
dev-libs/rocm-comgr/metadata.xml | 14 +++++
dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild | 45 ++++++++++++++++
7 files changed, 236 insertions(+)
diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
new file mode 100644
index 00000000000..8e7150e7fd2
--- /dev/null
+++ b/dev-libs/rocm-comgr/Manifest
@@ -0,0 +1 @@
+DIST rocm-comgr-2.6.0.tar.gz 1484343 BLAKE2B fcb496b4997d672640e3f75622e74085eeb9dfe83c88ae025530389d3cdca7628155168060e71f7a3ff915e933ffe70c7026720dc124d128d16ef4df397525e7 SHA512 b14e90603d2b6e17f6b0335ea35da2e5d7e31710f301d7a7f7751a45d996e3dbbfbf84a03e2e911e8798e72e77b87b5cd88317e897cb4de3ee5cf0e7c3222d68
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 00000000000..74206760f39
--- /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 00000000000..47f03716829
--- /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 00000000000..dda005ab7a2
--- /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 00000000000..5b44feaf1b3
--- /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/metadata.xml b/dev-libs/rocm-comgr/metadata.xml
new file mode 100644
index 00000000000..20237687f91
--- /dev/null
+++ b/dev-libs/rocm-comgr/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">RadeonOpenCompute/ROCm-CompilerSupport</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ Radeon Open Compute Code Object Manager
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
new file mode 100644
index 00000000000..0f058da194b
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-2.6.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/lib/comgr"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-CompilerSupport-roc-${PV}/lib/comgr"
+ KEYWORDS="~amd64"
+fi
+PATCHES=(
+ "${FILESDIR}/${P}-correctly-install.patch"
+ "${FILESDIR}/${P}-find-clang.patch"
+ "${FILESDIR}/${P}-find-lld-includes.patch"
+ "${FILESDIR}/${P}-dependencies.patch"
+)
+
+DESCRIPTION="Radeon Open Compute Code Object Manager"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND="dev-libs/rocm-device-libs
+ dev-cpp/yaml-cpp
+ sys-devel/llvm-roc"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+# rm -rf yaml-cpp || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/"
+ )
+ cmake-utils_src_configure
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-02-13 8:39 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 17:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/files/, dev-libs/rocm-comgr/ Craig Andrews
-- strict thread matches above, loose matches on Subject: below --
2025-02-13 8:38 Sam James
2024-12-01 7:57 Patrick Lauer
2024-03-08 19:22 Sam James
2023-11-01 9:28 Yixun Lan
2023-09-03 6:31 罗百科
2023-03-07 7:57 Sam James
2023-02-02 12:54 Sam James
2022-02-11 16:12 Joonas Niilola
2020-08-25 21:08 Craig Andrews
2020-03-02 0:39 Craig Andrews
2019-09-27 18:05 Craig Andrews
2019-08-07 17:38 Craig Andrews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox