public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2019-09-30 15:23 Craig Andrews
  0 siblings, 0 replies; 11+ messages in thread
From: Craig Andrews @ 2019-09-30 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     3b9ae6bac044f6115bf35f42c44cc9f7b2fe0344
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 30 15:07:28 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Mon Sep 30 15:07:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b9ae6ba

dev-libs/rocm-comgr: 2.8.0 version bump

Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocm-comgr/Manifest                       |  1 +
 .../files/rocm-comgr-2.8.0-dependencies.patch      | 84 ++++++++++++++++++++++
 dev-libs/rocm-comgr/rocm-comgr-2.8.0.ebuild        | 42 +++++++++++
 3 files changed, 127 insertions(+)

diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 0133d5015d7..d53d3bee114 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,2 +1,3 @@
 DIST rocm-comgr-2.6.0.tar.gz 1484343 BLAKE2B fcb496b4997d672640e3f75622e74085eeb9dfe83c88ae025530389d3cdca7628155168060e71f7a3ff915e933ffe70c7026720dc124d128d16ef4df397525e7 SHA512 b14e90603d2b6e17f6b0335ea35da2e5d7e31710f301d7a7f7751a45d996e3dbbfbf84a03e2e911e8798e72e77b87b5cd88317e897cb4de3ee5cf0e7c3222d68
 DIST rocm-comgr-2.7.0.tar.gz 1500771 BLAKE2B 275ad4cab34d554f8a131101eda474926f7270a44a0af9941d8f1233c29b44b3efb3ba83c6b541d501a3e2fc751c591c0f6a993563bbacf539b5bcd04b23963b SHA512 afb4a7318c2e137db6ac0502041ed53e63783ec1ab458962b1b16f0f2f28e09ce2ae70d048b858740eca8bf06328858400a68bed4e91d7cfc4b7714a66d85bc9
+DIST rocm-comgr-2.8.0.tar.gz 85502 BLAKE2B 14e18191a475c3d05e324f15e3b2d0829eed56bfa625b48e217e6540836e005675a4ffdd0813664c7f61177431d0987499eb9a75ec83acfa0e554e954770fbc9 SHA512 516832f2a1be5e66d93dddfd1275861605afcb6e3410cb518e6d8647a25c18da058e37cbce8434d5b7133a2147c8c84dc48a485f7b855b74a3b49c9f7dae4a0e

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
new file mode 100644
index 00000000000..3a0af258c05
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-2.8.0-dependencies.patch
@@ -0,0 +1,84 @@
+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-2.8.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-2.8.0.ebuild
new file mode 100644
index 00000000000..ff0ede91ae2
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-2.8.0.ebuild
@@ -0,0 +1,42 @@
+# 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}/${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-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] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2022-01-24 14:46 Benda XU
  0 siblings, 0 replies; 11+ messages in thread
From: Benda XU @ 2022-01-24 14:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2748258294bd38ddfe450715bd5ff94e1dd41ffb
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 24 14:41:45 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Mon Jan 24 14:46:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27482582

dev-libs/rocm-comgr: strip off ROCM_PATH/include.

On Gentoo ROCM_PATH=/usr. We should not set the header path.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../files/rocm-comgr-4.3.0_strip-usr-include.patch | 16 +++++++++
 dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild     | 39 ++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
new file mode 100644
index 000000000000..9d722a57d2a6
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
@@ -0,0 +1,16 @@
+On Gentoo, ROCM_PATH=/usr we do not need to set -I${ROCM_PATH}/include.
+Actually it is harmful to the `include_next`s.
+
+Index: ROCm-CompilerSupport-rocm-4.3.0/lib/comgr/src/comgr-compiler.cpp
+===================================================================
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -927,8 +927,6 @@ AMDGPUCompiler::addTargetIdentifierFlags
+ 
+ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
+   HIPIncludePath = (Twine(env::getHIPPath()) + "/include").str();
+-  // HIP headers depend on hsa.h which is in ROCM_DIR/include.
+-  ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
+   ClangIncludePath =
+       (Twine(env::getLLVMPath()) + "/lib/clang/" + CLANG_VERSION_STRING).str();
+   ClangIncludePath2 = (Twine(env::getLLVMPath()) + "/lib/clang/" +

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild
new file mode 100644
index 000000000000..192ddca854e1
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild
@@ -0,0 +1,39 @@
+# 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}-3.1.0-dependencies.patch
+	"${FILESDIR}"/${PN}-4.3.0_strip-usr-include.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_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] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2022-03-22  4:09 Benda XU
  0 siblings, 0 replies; 11+ messages in thread
From: Benda XU @ 2022-03-22  4:09 UTC (permalink / raw
  To: gentoo-commits

commit:     d63a56ead059b304497a936c3602e5553a01188c
Author:     YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sun Feb 20 06:57:58 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 04:09:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63a56ea

dev-libs/rocm-comgr: bump version to 5.0.2

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 dev-libs/rocm-comgr/Manifest                       |  1 +
 .../files/rocm-comgr-5.0-rocm_path.patch           | 14 ++++++
 dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild        | 50 ++++++++++++++++++++++
 3 files changed, 65 insertions(+)

diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 529fb368e822..37fa70a1b490 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -5,3 +5,4 @@ DIST rocm-comgr-4.1.0.tar.gz 101923 BLAKE2B 227317d3c96d577ff2df352721e3ffcf75e2
 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
+DIST rocm-comgr-5.0.2.tar.gz 117092 BLAKE2B 1ffcb74f9716a8f050d722f569cced66e8e9fa5a23a7156edd1b4dfd7dd7b09a175f3555bbf29ef452d7e4371f65ebe4c6fac30c583468a5563dd59fa92b53e4 SHA512 d2cf4517fc1da1adc367aaa6f53cc099547a931be30cc261d68c8174a5a9ffe3af937fbb298987abbdd7fd5d80364bef6ea9112dcaaf326a410fdd215e568f2f

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch
new file mode 100644
index 000000000000..6e908847a54f
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch
@@ -0,0 +1,14 @@
+Index: comgr/src/comgr-env.cpp
+===================================================================
+--- comgr.orig/src/comgr-env.cpp
++++ comgr/src/comgr-env.cpp
+@@ -247,6 +247,9 @@ InstallationDetector *getDetectorImpl()
+   if (EnvROCMPath) {
+     ROCmInstallPath = EnvROCMPath;
+   }
++  else {
++	ROCmInstallPath = "@GENTOO_PORTAGE_EPREFIX@/usr";
++  }
+ 
+   InstallationDetector *Detector;
+   if (ROCmInstallPath == "") {

diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild
new file mode 100644
index 000000000000..e7ed23e8d3a5
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake prefix
+
+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() {
+	sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
+	sed '/sys::path::append(LLVMPath/s,"llvm","lib/llvm/roc",' -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=(
+		-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"
+		-DCMAKE_STRIP=""  # disable stripping defined at lib/comgr/CMakeLists.txt:58
+	)
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2022-11-19 11:50 Benda XU
  0 siblings, 0 replies; 11+ messages in thread
From: Benda XU @ 2022-11-19 11:50 UTC (permalink / raw
  To: gentoo-commits

commit:     6d019ee6f384e80ba61a74c429a654a96d0b09ec
Author:     Jack de Kleuver <jackdekleuver <AT> gmail <DOT> com>
AuthorDate: Sat Nov  5 07:13:32 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 11:50:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d019ee6

dev-libs/rocm-comgr: Bump LLVM version to 15

patch files to work with new compiler version

Signed-off-by: Jack de Kleuver <jackdekleuver <AT> gmail.com>
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../files/rocm-comgr-5.1.3-llvm-15-args-changed      | 20 ++++++++++++++++++++
 .../files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu   | 17 +++++++++++++++++
 ...gr-5.1.3-r1.ebuild => rocm-comgr-5.1.3-r2.ebuild} |  4 +++-
 3 files changed, 40 insertions(+), 1 deletion(-)

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
new file mode 100644
index 000000000000..545b1c632182
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-args-changed
@@ -0,0 +1,20 @@
+--- 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
new file mode 100644
index 000000000000..41e51a407ba9
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.1.3-llvm-15-remove-zlib-gnu
@@ -0,0 +1,17 @@
+--- 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/rocm-comgr-5.1.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r2.ebuild
similarity index 94%
rename from dev-libs/rocm-comgr/rocm-comgr-5.1.3-r1.ebuild
rename to dev-libs/rocm-comgr/rocm-comgr-5.1.3-r2.ebuild
index 0674badac939..b080235a4798 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 inherit cmake llvm prefix
 
-LLVM_MAX_SLOT=14
+LLVM_MAX_SLOT=15
 
 if [[ ${PV} == *9999 ]] ; then
 	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/"
@@ -24,6 +24,8 @@ PATCHES=(
 	"${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"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2022-12-19 14:00 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2022-12-19 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     e785d13c8e869aeeb0c824f70b0444618f99f420
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 19:04:06 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 19 14:00:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e785d13c

dev-libs/rocm-comgr: drop versions 3* and 4*

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/rocm-comgr/Manifest                       |  7 ---
 .../files/rocm-comgr-3.1.0-dependencies.patch      | 52 ----------------------
 .../files/rocm-comgr-4.3.0_strip-usr-include.patch | 16 -------
 dev-libs/rocm-comgr/rocm-comgr-3.10.0.ebuild       | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-3.9.0.ebuild        | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-4.0.0.ebuild        | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-4.1.0.ebuild        | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-4.2.0.ebuild        | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild     | 45 -------------------
 dev-libs/rocm-comgr/rocm-comgr-4.3.0.ebuild        | 42 -----------------
 dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild        | 44 ------------------
 11 files changed, 416 deletions(-)

diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index ec997d659c13..fff0983ed5b8 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,9 +1,2 @@
-DIST rocm-comgr-3.10.0.tar.gz 98322 BLAKE2B a7245531eb7e5e7a306a91ca917f03b25a159729a8fbd830cbb02355f807900f439d3d793c416ea277aa0aa64829e697ef8bb32a246a3618ed9bc2c42d25acdf SHA512 b9e0ae6d10a39d55855c35305560af8c5cdbef8f9d41022c40dc60b4fcc629a73a91c6d7235dd0785aba5e14f566f7ce0911a5a1c52c39cebd947f7b585c4d5a
-DIST rocm-comgr-3.9.0.tar.gz 98316 BLAKE2B 424ff5152d99b1ea001985fbd9a6ca1a0925931579205b487505a6c3733d95fe4ee21d91453c538995b3696984acdf4d45cc77c43e1a7c75db78ad1164e3f9e6 SHA512 f49c91ba0db244a0f0d820edeb60013c8a09220e9e1a6be464c48766ac3322b18ed1d0f009e5b1df58340a6dd324a75717194696214e2bb7455cb85e516f071a
-DIST rocm-comgr-4.0.0.tar.gz 98316 BLAKE2B d96200d2fe8929631d1f40577a115b72e2341a66941e9de9de2e61c3d9eab9cb4a0cb51f3b2abc183be832ee86404b5f24d053396615038f4ca6bda23a7331d5 SHA512 fdbb334ff1cb2cd5eb40b9dcf1bbcb138b95d24fac80a90c12c9b5b2ac24226eed4f30ac2fa1923c274fae830e52542d5725436a77c404d1680266b103444549
-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
 DIST rocm-comgr-5.0.2.tar.gz 117092 BLAKE2B 1ffcb74f9716a8f050d722f569cced66e8e9fa5a23a7156edd1b4dfd7dd7b09a175f3555bbf29ef452d7e4371f65ebe4c6fac30c583468a5563dd59fa92b53e4 SHA512 d2cf4517fc1da1adc367aaa6f53cc099547a931be30cc261d68c8174a5a9ffe3af937fbb298987abbdd7fd5d80364bef6ea9112dcaaf326a410fdd215e568f2f
 DIST rocm-comgr-5.1.3.tar.gz 117155 BLAKE2B 40e415c4c7ae3e709dd50981299291f0fc1133f35310b4c86a86847d3bce5fd7685a3f4480f8f156873ca922921c1d4e1cb620fd33bd5cdc87f155af839f2bbe SHA512 5927250f5e03c32b7f270a1dbfe5221d349dfe32aba34143040da53d4e7eb83faa3073a43edabcff13e1fc977bc17088404523f2ab2ea95e207d2c00beb4249b

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
deleted file mode 100644
index d70ed4957002..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-3.1.0-dependencies.patch
+++ /dev/null
@@ -1,52 +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,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/files/rocm-comgr-4.3.0_strip-usr-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
deleted file mode 100644
index 9d722a57d2a6..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-On Gentoo, ROCM_PATH=/usr we do not need to set -I${ROCM_PATH}/include.
-Actually it is harmful to the `include_next`s.
-
-Index: ROCm-CompilerSupport-rocm-4.3.0/lib/comgr/src/comgr-compiler.cpp
-===================================================================
---- comgr/src/comgr-compiler.cpp
-+++ comgr/src/comgr-compiler.cpp
-@@ -927,8 +927,6 @@ AMDGPUCompiler::addTargetIdentifierFlags
- 
- amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
-   HIPIncludePath = (Twine(env::getHIPPath()) + "/include").str();
--  // HIP headers depend on hsa.h which is in ROCM_DIR/include.
--  ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
-   ClangIncludePath =
-       (Twine(env::getLLVMPath()) + "/lib/clang/" + CLANG_VERSION_STRING).str();
-   ClangIncludePath2 = (Twine(env::getLLVMPath()) + "/lib/clang/" +

diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.10.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.10.0.ebuild
deleted file mode 100644
index 4401982de06b..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.10.0.ebuild
+++ /dev/null
@@ -1,42 +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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-3.9.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-3.9.0.ebuild
deleted file mode 100644
index 4401982de06b..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-3.9.0.ebuild
+++ /dev/null
@@ -1,42 +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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.0.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.0.0.ebuild
deleted file mode 100644
index 4401982de06b..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.0.0.ebuild
+++ /dev/null
@@ -1,42 +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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.1.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.1.0.ebuild
deleted file mode 100644
index 5b3f588b3d54..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.1.0.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2021 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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.2.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.2.0.ebuild
deleted file mode 100644
index 5b3f588b3d54..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.2.0.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2021 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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild
deleted file mode 100644
index fcb897e2ab38..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.3.0-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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}-3.1.0-dependencies.patch
-	"${FILESDIR}"/${PN}-4.3.0_strip-usr-include.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() {
-	sed '/sys::path::append(HIPPath/s,"hip","lib/hip",' -i src/comgr-env.cpp || die
-	sed '/sys::path::append(LLVMPath/s,"llvm","lib/llvm/roc",' -i src/comgr-env.cpp || die
-	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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.3.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.3.0.ebuild
deleted file mode 100644
index 5b3f588b3d54..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.3.0.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2021 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=(
-		-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
-}

diff --git a/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild
deleted file mode 100644
index 772aeb9b4102..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-4.5.2.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-02-01  9:53 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2023-02-01  9:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b4a0add72872dedca2c46b09ef7b8fcfe92925fa
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 22:15:55 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 09:52:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a0add7

dev-libs/rocm-comgr: drop 5.0.2

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/rocm-comgr/Manifest                       |  1 -
 .../files/rocm-comgr-5.0-rocm_path.patch           | 14 ------
 dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild        | 50 ----------------------
 3 files changed, 65 deletions(-)

diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index 037c51bb814e..6675acc0cfeb 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -1,3 +1,2 @@
-DIST rocm-comgr-5.0.2.tar.gz 117092 BLAKE2B 1ffcb74f9716a8f050d722f569cced66e8e9fa5a23a7156edd1b4dfd7dd7b09a175f3555bbf29ef452d7e4371f65ebe4c6fac30c583468a5563dd59fa92b53e4 SHA512 d2cf4517fc1da1adc367aaa6f53cc099547a931be30cc261d68c8174a5a9ffe3af937fbb298987abbdd7fd5d80364bef6ea9112dcaaf326a410fdd215e568f2f
 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

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch
deleted file mode 100644
index 6e908847a54f..000000000000
--- a/dev-libs/rocm-comgr/files/rocm-comgr-5.0-rocm_path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: comgr/src/comgr-env.cpp
-===================================================================
---- comgr.orig/src/comgr-env.cpp
-+++ comgr/src/comgr-env.cpp
-@@ -247,6 +247,9 @@ InstallationDetector *getDetectorImpl()
-   if (EnvROCMPath) {
-     ROCmInstallPath = EnvROCMPath;
-   }
-+  else {
-+	ROCmInstallPath = "@GENTOO_PORTAGE_EPREFIX@/usr";
-+  }
- 
-   InstallationDetector *Detector;
-   if (ROCmInstallPath == "") {

diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild
deleted file mode 100644
index e7ed23e8d3a5..000000000000
--- a/dev-libs/rocm-comgr/rocm-comgr-5.0.2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake prefix
-
-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() {
-	sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
-	sed '/sys::path::append(LLVMPath/s,"llvm","lib/llvm/roc",' -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=(
-		-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"
-		-DCMAKE_STRIP=""  # disable stripping defined at lib/comgr/CMakeLists.txt:58
-	)
-	cmake_src_configure
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-02-02 12:54 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-02-02 12:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ae32bce0b823140512aaf748572216e4e91e98b1
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sat Jan 28 09:31:48 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 12:53:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae32bce0

dev-libs/rocm-comgr: append -fno-stack-protector at runtime

Closes: https://bugs.gentoo.org/892371
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29291
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/rocm-comgr-5.3.3-fno-stack-protecter.patch       | 14 ++++++++++++++
 ...cm-comgr-5.1.3-r2.ebuild => rocm-comgr-5.1.3-r3.ebuild} |  1 +
 dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild             |  1 +
 3 files changed, 16 insertions(+)

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protecter.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protecter.patch
new file mode 100644
index 000000000000..c8d078ee8946
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protecter.patch
@@ -0,0 +1,14 @@
+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/rocm-comgr-5.1.3-r2.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
similarity index 97%
rename from dev-libs/rocm-comgr/rocm-comgr-5.1.3-r2.ebuild
rename to dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
index b080235a4798..5165add2a564 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r2.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
@@ -26,6 +26,7 @@ PATCHES=(
 	"${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-protecter.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"

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 c00adc6c1727..1c491f3f83b8 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
@@ -28,6 +28,7 @@ PATCHES=(
 	"${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-protecter.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-02-02 12:54 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-02-02 12:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b9205ac0a5a0626397c00ca60a77933377404232
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Wed Jan 25 06:03:18 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 12:53:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9205ac0

dev-libs/rocm-comgr: fix clang include dir search

With two patches

1. rocm-comgr uses clang -print-resource-dir to find correct headers
   during cmake configuration.

2. comgr initializes the clang driver correctly, so no need to specify
   clang include dir.

Also this makes the original sed command invalid. Turn it into another
patch.

Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...RESOURCE_DIR-using-clang-print-resource-d.patch | 48 ++++++++++++++++++++
 ...Specify-clang-exe-path-in-Driver-Creation.patch | 52 ++++++++++++++++++++++
 ...ocm-comgr-5.3.3-HIPIncludePath-not-needed.patch | 15 +++++++
 ...mgr-5.3.3.ebuild => rocm-comgr-5.3.3-r1.ebuild} |  9 ++--
 4 files changed, 120 insertions(+), 4 deletions(-)

diff --git a/dev-libs/rocm-comgr/files/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch b/dev-libs/rocm-comgr/files/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch
new file mode 100644
index 000000000000..a61d92794d51
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch
@@ -0,0 +1,48 @@
+From 4c210fdf6943c0c40b5fe0f66800c7b9c7ca84d3 Mon Sep 17 00:00:00 2001
+From: Yiyang Wu <xgreenlandforwyy@gmail.com>
+Date: Tue, 14 Jun 2022 20:21:22 +0800
+Subject: [PATCH] Find CLANG_RESOURCE_DIR using clang -print-resource-dir
+
+Suggested-By: https://reviews.llvm.org/D49486
+Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
+---
+ lib/comgr/cmake/opencl_pch.cmake | 24 +++---------------------
+ 1 file changed, 3 insertions(+), 21 deletions(-)
+
+diff --git a/lib/comgr/cmake/opencl_pch.cmake b/lib/comgr/cmake/opencl_pch.cmake
+index 95311fc..71050c8 100644
+--- a/cmake/opencl_pch.cmake
++++ b/cmake/opencl_pch.cmake
+@@ -1,26 +1,8 @@
+ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   find_package(Clang REQUIRED CONFIG)
+-
+-  # FIXME: CLANG_CMAKE_DIR seems like the most stable way to find this, but
+-  # really there is no way to reliably discover this header.
+-  #
+-  # We effectively back up to the Clang output directory (for the case of a build
+-  # tree) or install prefix (for the case of an installed copy), and then search
+-  # for a file named opencl-c.h anywhere below that. We take the first result in
+-  # the case where there are multiple (e.g. if there is an installed copy nested
+-  # in a build directory). This is a bit imprecise, but it covers cases like MSVC
+-  # adding some additional configuration-specific subdirectories to the build
+-  # tree but not to an installed copy.
+-  file(GLOB_RECURSE OPENCL_C_H_LIST "${CLANG_CMAKE_DIR}/../../../*/opencl-c.h")
+-
+-  list(GET OPENCL_C_H_LIST 0 OPENCL_C_H)
+-
+-  if (NOT EXISTS "${OPENCL_C_H}" OR IS_DIRECTORY "${OPENCL_C_H}")
+-    message(FATAL_ERROR "Unable to locate opencl-c.h from the supplied Clang. The path '${CLANG_CMAKE_DIR}/../../../*' was searched.")
+-  endif()
+-else()
+-  get_target_property(clang_build_header_dir clang-resource-headers RUNTIME_OUTPUT_DIRECTORY)
+-  set(OPENCL_C_H "${clang_build_header_dir}/opencl-c.h")
++  execute_process(COMMAND "${CLANG_CMAKE_DIR}/../../../bin/clang" -print-resource-dir OUTPUT_VARIABLE CLANG_RESOURCE_DIR)
++  string(STRIP ${CLANG_RESOURCE_DIR} CLANG_RESOURCE_DIR)
++  set(OPENCL_C_H "${CLANG_RESOURCE_DIR}/include/opencl-c.h")
+ endif()
+ 
+ # Macro to create and install a custom target for generating PCH for given
+-- 
+2.39.0
+

diff --git a/dev-libs/rocm-comgr/files/0001-Specify-clang-exe-path-in-Driver-Creation.patch b/dev-libs/rocm-comgr/files/0001-Specify-clang-exe-path-in-Driver-Creation.patch
new file mode 100644
index 000000000000..a1ce8cae50b8
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/0001-Specify-clang-exe-path-in-Driver-Creation.patch
@@ -0,0 +1,52 @@
+From e0fb8aca856eb61d2f774a0893e2243742eed341 Mon Sep 17 00:00:00 2001
+From: Yiyang Wu <xgreenlandforwyy@gmail.com>
+Date: Fri, 18 Nov 2022 15:41:53 +0800
+Subject: [PATCH] Specify clang exe path in Driver Creation
+
+By doing so, TheDriver can get the correct resource dir.
+
+Closes: #48
+Reference: #49
+---
+ lib/comgr/src/comgr-compiler.cpp | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/lib/comgr/src/comgr-compiler.cpp b/lib/comgr/src/comgr-compiler.cpp
+index 80849d4..67fe82b 100644
+--- a/src/comgr-compiler.cpp
++++ b/src/comgr-compiler.cpp
+@@ -660,7 +660,7 @@ AMDGPUCompiler::executeInProcessDriver(ArrayRef<const char *> Args) {
+   IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs);
+   DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
+   ProcessWarningOptions(Diags, *DiagOpts, /*ReportDiags=*/false);
+-  Driver TheDriver("", "", Diags);
++  Driver TheDriver((Twine(env::getLLVMPath()) + "/bin/clang").str(), "", Diags);
+   TheDriver.setTitle("AMDGPU Code Object Manager");
+   TheDriver.setCheckInputsExist(false);
+ 
+@@ -998,11 +998,6 @@ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
+   HIPIncludePath = (Twine(env::getHIPPath()) + "/include").str();
+   // HIP headers depend on hsa.h which is in ROCM_DIR/include.
+   ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
+-  ClangIncludePath =
+-      (Twine(env::getLLVMPath()) + "/lib/clang/" + CLANG_VERSION_STRING).str();
+-  ClangIncludePath2 = (Twine(env::getLLVMPath()) + "/lib/clang/" +
+-                       CLANG_VERSION_STRING + "/include")
+-                          .str();
+ 
+   Args.push_back("-x");
+ 
+@@ -1028,10 +1023,6 @@ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
+     Args.push_back(ROCMIncludePath.c_str());
+     Args.push_back("-isystem");
+     Args.push_back(HIPIncludePath.c_str());
+-    Args.push_back("-isystem");
+-    Args.push_back(ClangIncludePath.c_str());
+-    Args.push_back("-isystem");
+-    Args.push_back(ClangIncludePath2.c_str());
+     break;
+   default:
+     return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT;
+-- 
+2.39.0
+

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
new file mode 100644
index 000000000000..54b98726026f
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-HIPIncludePath-not-needed.patch
@@ -0,0 +1,15 @@
+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/rocm-comgr-5.3.3.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
similarity index 82%
rename from dev-libs/rocm-comgr/rocm-comgr-5.3.3.ebuild
rename to dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
index 5a5aa22a9098..0215adeaba17 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,10 +18,12 @@ else
 fi
 
 PATCHES=(
-	"${FILESDIR}/${PN}-5.1.3-Find-CLANG_RESOURCE_DIR.patch"
 	"${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"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"
@@ -40,8 +42,6 @@ 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
 }
@@ -50,6 +50,7 @@ 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] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-02-02 12:58 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-02-02 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     1f8969b69713cd75d5166b22b53bf5ee8360865d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  2 12:56:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 12:56:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f8969b6

dev-libs/rocm-comgr: fix typo in patch name

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...stack-protecter.patch => rocm-comgr-5.3.3-fno-stack-protector.patch} | 0
 dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild                          | 2 +-
 dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild                          | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protecter.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protector.patch
similarity index 100%
rename from dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protecter.patch
rename to dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fno-stack-protector.patch

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
index ff38c3ce81b1..0cdcd9271898 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.1.3-r3.ebuild
@@ -26,7 +26,7 @@ PATCHES=(
 	"${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-protecter.patch"
+	"${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"

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 1c491f3f83b8..f97e82109722 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
@@ -28,7 +28,7 @@ PATCHES=(
 	"${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-protecter.patch"
+	"${FILESDIR}/${PN}-5.3.3-fno-stack-protector.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-10-09 12:34 罗百科
  0 siblings, 0 replies; 11+ messages in thread
From: 罗百科 @ 2023-10-09 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5317890716b7c71dfd56745929dc5c04183ef33f
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  9 12:25:03 2023 +0000
Commit:     罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 12:33:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53178907

dev-libs/rocm-comgr: add 5.7.0

Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>

 dev-libs/rocm-comgr/Manifest                       |   1 +
 .../files/rocm-comgr-5.7.0-disassembly.patch       |  20 ++++
 .../rocm-comgr/files/rocm-comgr-5.7.0-lld.patch    |  39 +++++++
 .../files/rocm-comgr-5.7.0-metadata.patch          |  73 +++++++++++++
 .../files/rocm-comgr-5.7.0-optional.patch          | 113 +++++++++++++++++++++
 .../files/rocm-comgr-5.7.0-symbolizer.patch        |  39 +++++++
 dev-libs/rocm-comgr/rocm-comgr-5.7.0.ebuild        |  61 +++++++++++
 7 files changed, 346 insertions(+)

diff --git a/dev-libs/rocm-comgr/Manifest b/dev-libs/rocm-comgr/Manifest
index ffbc20898d35..78b8815b05cf 100644
--- a/dev-libs/rocm-comgr/Manifest
+++ b/dev-libs/rocm-comgr/Manifest
@@ -2,3 +2,4 @@ DIST rocm-comgr-5.1.3.tar.gz 117155 BLAKE2B 40e415c4c7ae3e709dd50981299291f0fc11
 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
+DIST rocm-comgr-5.7.0.tar.gz 137929 BLAKE2B 955253295311764406fc37505ce417aef9efdc35d705109d890a85202e546581de74803f446221636a192bbaf0bec9f8dc31067e7d1d332113e1b1d43468c269 SHA512 e73eeb11bdf81408693263dd4f6d751f4804358d8fabda06e70e3a3b66f14525a408db1f281a04d539cb37b95bede26df15a1473c1719bd7805d774399d104ab

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-disassembly.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-disassembly.patch
new file mode 100644
index 000000000000..6c1052b0b968
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-disassembly.patch
@@ -0,0 +1,20 @@
+commit 446d142de276a8ca1039798726a2b81937ece952
+Author: Ron Lieberman <ron.lieberman@amd.com>
+Date:   Thu Jul 13 19:42:47 2023 -0500
+
+    add #include llvm/ADT/StringExtras.h to comgr-disassembly.cpp
+    
+    Change-Id: Id0086adec6e33db55769a12f6a886202c8afd9e0
+
+diff --git a/src/comgr-disassembly.cpp b/src/comgr-disassembly.cpp
+index 8703c0d..31e9634 100644
+--- a/src/comgr-disassembly.cpp
++++ b/src/comgr-disassembly.cpp
+@@ -34,6 +34,7 @@
+  ******************************************************************************/
+ 
+ #include "comgr-disassembly.h"
++#include "llvm/ADT/StringExtras.h"
+ #include "llvm/MC/TargetRegistry.h"
+ 
+ using namespace llvm;

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-lld.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-lld.patch
new file mode 100644
index 000000000000..ee21b87fb782
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-lld.patch
@@ -0,0 +1,39 @@
+commit 3f4486f33bdeff6d705431b7a3b6cb5d064cc2b2
+Author: Scott Linder <Scott.Linder@amd.com>
+Date:   Mon Jun 19 19:24:26 2023 +0000
+
+    Update to use lld::lldMain introduced in D119049
+    
+    Change-Id: I9dd8de3f599fab14b62f482352ae43874ff87373
+
+diff --git a/src/comgr-compiler.cpp b/src/comgr-compiler.cpp
+index 30e838c..7b51d3f 100644
+--- a/src/comgr-compiler.cpp
++++ b/src/comgr-compiler.cpp
+@@ -85,6 +85,8 @@
+ 
+ #include <csignal>
+ 
++LLD_HAS_DRIVER(elf)
++
+ using namespace llvm;
+ using namespace llvm::opt;
+ using namespace llvm::sys;
+@@ -614,13 +616,14 @@ static amd_comgr_status_t linkWithLLD(llvm::ArrayRef<const char *> Args,
+                                       llvm::raw_ostream &LogE) {
+   ArgStringList LLDArgs(llvm::iterator_range<ArrayRef<const char *>::iterator>(
+       Args.begin(), Args.end()));
+-  LLDArgs.insert(LLDArgs.begin(), "lld");
++  LLDArgs.insert(LLDArgs.begin(), "ld.lld");
+   LLDArgs.push_back("--threads=1");
+ 
+   ArrayRef<const char *> ArgRefs = llvm::ArrayRef(LLDArgs);
+-  bool LLDRet = lld::elf::link(ArgRefs, LogS, LogE, false, false);
++  lld::Result LLDRet =
++      lld::lldMain(ArgRefs, LogS, LogE, {{lld::Gnu, &lld::elf::link}});
+   lld::CommonLinkerContext::destroy();
+-  if (!LLDRet) {
++  if (LLDRet.retCode || !LLDRet.canRunAgain) {
+     return AMD_COMGR_STATUS_ERROR;
+   }
+   return AMD_COMGR_STATUS_SUCCESS;

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-metadata.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-metadata.patch
new file mode 100644
index 000000000000..78fc4f34f45c
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-metadata.patch
@@ -0,0 +1,73 @@
+commit edea3631e2c1cd49c93f6fff883fea2affdfa2d1
+Author: Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>
+Date:   Wed May 10 15:52:09 2023 -0400
+
+    Update getDesc* functions due to 689715fx
+    
+    Change-Id: I0e8058ceb8a04550fe6c17d74babcf5fe0ee609d
+
+diff --git a/src/comgr-metadata.cpp b/src/comgr-metadata.cpp
+index a3375b4..72aeb01 100644
+--- a/src/comgr-metadata.cpp
++++ b/src/comgr-metadata.cpp
+@@ -223,7 +223,7 @@ static bool mergeNoteRecords(llvm::msgpack::DocNode &From,
+ template <class ELFT>
+ static bool processNote(const Elf_Note<ELFT> &Note, DataMeta *MetaP,
+                         llvm::msgpack::DocNode &Root) {
+-  auto DescString = Note.getDescAsStringRef();
++  auto DescString = Note.getDescAsStringRef(4);
+ 
+   if (Note.getName() == "AMD" && Note.getType() == ELF::NT_AMD_HSA_METADATA) {
+ 
+@@ -557,7 +557,7 @@ getElfIsaNameFromElfNotes(const ELFObjectFile<ELFT> *Obj,
+ 
+     switch (Note.getType()) {
+     case ELF::NT_AMD_HSA_CODE_OBJECT_VERSION: {
+-      if (Note.getDesc().size() <
++      if (Note.getDesc(4).size() <
+           sizeof(amdgpu_hsa_note_code_object_version_s)) {
+         IsError = true;
+         return true;
+@@ -565,7 +565,7 @@ getElfIsaNameFromElfNotes(const ELFObjectFile<ELFT> *Obj,
+ 
+       const auto *NoteCodeObjectVersion =
+           reinterpret_cast<const amdgpu_hsa_note_code_object_version_s *>(
+-              Note.getDesc().data());
++              Note.getDesc(4).data());
+ 
+       // Only code objects up to version 2 used note records.
+       if (NoteCodeObjectVersion->major_version > 2) {
+@@ -578,7 +578,7 @@ getElfIsaNameFromElfNotes(const ELFObjectFile<ELFT> *Obj,
+     }
+ 
+     case ELF::NT_AMD_HSA_HSAIL: {
+-      if (Note.getDesc().size() < sizeof(amdgpu_hsa_note_hsail_s)) {
++      if (Note.getDesc(4).size() < sizeof(amdgpu_hsa_note_hsail_s)) {
+         IsError = true;
+         return true;
+       }
+@@ -588,21 +588,21 @@ getElfIsaNameFromElfNotes(const ELFObjectFile<ELFT> *Obj,
+     }
+ 
+     case ELF::NT_AMD_HSA_ISA_VERSION: {
+-      if (Note.getDesc().size() <
++      if (Note.getDesc(4).size() <
+           offsetof(amdgpu_hsa_note_isa_s, vendor_and_architecture_name)) {
+         IsError = true;
+         return true;
+       }
+ 
+       const auto *NoteIsa = reinterpret_cast<const amdgpu_hsa_note_isa_s *>(
+-          Note.getDesc().data());
++          Note.getDesc(4).data());
+ 
+       if (!NoteIsa->vendor_name_size || !NoteIsa->architecture_name_size) {
+         IsError = true;
+         return true;
+       }
+ 
+-      if (Note.getDesc().size() <
++      if (Note.getDesc(4).size() <
+           offsetof(amdgpu_hsa_note_isa_s, vendor_and_architecture_name) +
+               NoteIsa->vendor_name_size + NoteIsa->architecture_name_size) {
+         IsError = true;

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-optional.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-optional.patch
new file mode 100644
index 000000000000..ed52186d98ae
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-optional.patch
@@ -0,0 +1,113 @@
+From 9417620c9802331c4abf0cf4c57f40ec4b38a5e7 Mon Sep 17 00:00:00 2001
+From: Ron Lieberman <ron.lieberman@amd.com>
+Date: Thu, 1 Jun 2023 13:19:28 -0500
+Subject: [PATCH] [llvm] change from Optional to std::optional in support of
+ pending llvm patch
+
+Change-Id: If8a03245dc88e7b7e4a628d7ce7e28c71c3268c6
+---
+ lib/comgr/src/comgr-env.cpp           | 2 +-
+ lib/comgr/src/comgr-env.h             | 3 +--
+ lib/comgr/src/comgr-objdump.cpp       | 5 ++---
+ lib/comgr/src/comgr.cpp               | 2 +-
+ lib/comgr/src/time-stat/time-stat.cpp | 3 +--
+ 5 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/src/comgr-env.cpp b/src/comgr-env.cpp
+index 6ab6f0f..7575394 100644
+--- a/src/comgr-env.cpp
++++ b/src/comgr-env.cpp
+@@ -50,7 +50,7 @@ bool shouldSaveTemps() {
+   return SaveTemps && StringRef(SaveTemps) != "0";
+ }
+ 
+-Optional<StringRef> getRedirectLogs() {
++std::optional<StringRef> getRedirectLogs() {
+   static char *RedirectLogs = getenv("AMD_COMGR_REDIRECT_LOGS");
+   if (!RedirectLogs || StringRef(RedirectLogs) == "0") {
+     return std::nullopt;
+diff --git a/src/comgr-env.h b/src/comgr-env.h
+index aef57b3..7ca644e 100644
+--- a/src/comgr-env.h
++++ b/src/comgr-env.h
+@@ -36,7 +36,6 @@
+ #ifndef COMGR_ENV_H
+ #define COMGR_ENV_H
+ 
+-#include "llvm/ADT/Optional.h"
+ #include "llvm/ADT/StringRef.h"
+ 
+ namespace COMGR {
+@@ -47,7 +46,7 @@ bool shouldSaveTemps();
+ 
+ /// If the environment requests logs be redirected, return the string identifier
+ /// of where to redirect. Otherwise return @p None.
+-llvm::Optional<llvm::StringRef> getRedirectLogs();
++std::optional<llvm::StringRef> getRedirectLogs();
+ 
+ /// Return whether the environment requests verbose logging.
+ bool shouldEmitVerboseLogs();
+diff --git a/src/comgr-objdump.cpp b/src/comgr-objdump.cpp
+index ff3f996..cae7aa3 100644
+--- a/src/comgr-objdump.cpp
++++ b/src/comgr-objdump.cpp
+@@ -39,7 +39,6 @@
+ #include "comgr-objdump.h"
+ #include "comgr.h"
+ #include "lld/Common/TargetOptionsCommandFlags.h"
+-#include "llvm/ADT/Optional.h"
+ #include "llvm/ADT/STLExtras.h"
+ #include "llvm/ADT/StringExtras.h"
+ #include "llvm/CodeGen/CommandFlags.h"
+@@ -2145,7 +2144,7 @@ void llvm::DisassemHelper::printRawClangAST(const ObjectFile *Obj) {
+     ClangASTSectionName = "clangast";
+   }
+ 
+-  Optional<object::SectionRef> ClangASTSection;
++  std::optional<object::SectionRef> ClangASTSection;
+   for (auto Sec : toolSectionFilter(*Obj)) {
+     StringRef Name;
+     auto NameOrErr = Sec.getName();
+@@ -2188,7 +2187,7 @@ void llvm::DisassemHelper::printFaultMaps(const ObjectFile *Obj) {
+     return;
+   }
+ 
+-  Optional<object::SectionRef> FaultMapSection;
++  std::optional<object::SectionRef> FaultMapSection;
+ 
+   for (auto Sec : toolSectionFilter(*Obj)) {
+     StringRef Name;
+diff --git a/src/comgr.cpp b/src/comgr.cpp
+index e421414..9e89dc2 100644
+--- a/src/comgr.cpp
++++ b/src/comgr.cpp
+@@ -1293,7 +1293,7 @@ amd_comgr_status_t AMD_COMGR_API
+     // Pointer to the currently selected log stream.
+     raw_ostream *LogP = &LogS;
+ 
+-    if (Optional<StringRef> RedirectLogs = env::getRedirectLogs()) {
++    if (std::optional<StringRef> RedirectLogs = env::getRedirectLogs()) {
+       StringRef RedirectLog = *RedirectLogs;
+       if (RedirectLog == "stdout") {
+         LogP = &outs();
+diff --git a/src/time-stat/time-stat.cpp b/src/time-stat/time-stat.cpp
+index 1df3f0e..9b24983 100644
+--- a/src/time-stat/time-stat.cpp
++++ b/src/time-stat/time-stat.cpp
+@@ -5,7 +5,6 @@
+ #include <system_error>
+ 
+ #include "comgr-env.h"
+-#include "llvm/ADT/Optional.h"
+ #include "llvm/ADT/StringRef.h"
+ #include "llvm/Support/Debug.h"
+ #include "llvm/Support/FileSystem.h"
+@@ -29,7 +28,7 @@ static std::unique_ptr<PerfStats> PS = nullptr;
+ static void dump() { PS->dumpPerfStats(); }
+ 
+ void GetLogFile(std::string &PerfLog) {
+-  if (Optional<StringRef> RedirectLogs = env::getRedirectLogs()) {
++  if (std::optional<StringRef> RedirectLogs = env::getRedirectLogs()) {
+     PerfLog = (*RedirectLogs).str();
+     return;
+   }

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-symbolizer.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-symbolizer.patch
new file mode 100644
index 000000000000..9c8079042bab
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.0-symbolizer.patch
@@ -0,0 +1,39 @@
+
+commit 13dfb8f01ded137f634b8b6aa8a5ce2bc3e65daf
+Author: Ron Lieberman <ron.lieberman@amd.com>
+Date:   Sun Apr 23 07:12:23 2023 -0500
+
+    [symbolizer] API evolution for ErrorHandler
+    
+    Change-Id: I438358dc79195444aed0658942b23869eda8117e
+
+diff --git a/src/comgr-symbolizer.cpp b/src/comgr-symbolizer.cpp
+index cfdeee8..36643cf 100644
+--- a/src/comgr-symbolizer.cpp
++++ b/src/comgr-symbolizer.cpp
+@@ -57,6 +57,16 @@ static llvm::symbolize::PrinterConfig getDefaultPrinterConfig() {
+   return Config;
+ }
+ 
++static llvm::symbolize::ErrorHandler symbolize_error_handler(
++    llvm::raw_string_ostream &OS) {
++  return
++      [&](const llvm::ErrorInfoBase &ErrorInfo, llvm::StringRef ErrorBanner) {
++        OS << ErrorBanner;
++        ErrorInfo.log(OS);
++        OS << '\n';
++      };
++}
++
+ Symbolizer::Symbolizer(std::unique_ptr<ObjectFile> &&CodeObject,
+                        PrintSymbolCallback PrintSymbol)
+     : CodeObject(std::move(CodeObject)), PrintSymbol(PrintSymbol) {}
+@@ -93,7 +103,7 @@ amd_comgr_status_t Symbolizer::symbolize(uint64_t Address, bool IsCode,
+   llvm::raw_string_ostream OS(Result);
+   llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
+   llvm::symbolize::Request Request{"", Address};
+-  auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
++  auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(OS, symbolize_error_handler(OS), Config);
+ 
+   if (IsCode) {
+     auto ResOrErr = SymbolizerImpl.symbolizeInlinedCode(

diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.0.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.0.ebuild
new file mode 100644
index 000000000000..28f2b5385c71
--- /dev/null
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.0.ebuild
@@ -0,0 +1,61 @@
+# 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=17
+
+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.7.0-optional.patch"
+	"${FILESDIR}/${PN}-5.7.0-lld.patch"
+	"${FILESDIR}/${PN}-5.7.0-disassembly.patch"
+	"${FILESDIR}/${PN}-5.7.0-metadata.patch"
+	"${FILESDIR}/${PN}-5.7.0-symbolizer.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] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/
@ 2023-11-01  9:28 Yixun Lan
  0 siblings, 0 replies; 11+ messages in thread
From: Yixun Lan @ 2023-11-01  9:28 UTC (permalink / raw
  To: gentoo-commits

commit:     73f080c60d16838845a962306c50a47a53afbda0
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Sat Oct 21 06:35:35 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Nov  1 09:27:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73f080c6

dev-libs/rocm-comgr: remove non-FHS license install

Closes: https://github.com/gentoo/gentoo/pull/33436
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../rocm-comgr-5.7.1-correct-license-install-dir.patch   | 16 ++++++++++++++++
 dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild              |  1 +
 2 files changed, 17 insertions(+)

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-correct-license-install-dir.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-correct-license-install-dir.patch
new file mode 100644
index 000000000000..8ec2c710d3ad
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-correct-license-install-dir.patch
@@ -0,0 +1,16 @@
+Do not install same license for -asan, which avoids QA warning
+Upstream issue: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/61
+===================================================================
+--- comgr.orig/CMakeLists.txt
++++ comgr/CMakeLists.txt
+@@ -281,10 +281,6 @@ install(FILES
+   "NOTICES.txt"
+   COMPONENT amd-comgr
+   DESTINATION ${CMAKE_INSTALL_DOCDIR})
+-install(FILES
+-  "LICENSE.txt"
+-  COMPONENT asan
+-  DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan)
+ 
+ # Generate the install-tree package.
+ set(AMD_COMGR_PREFIX_CODE "

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 dd4856872ff2..ff181f1b4615 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-5.7.0-metadata.patch"
 	"${FILESDIR}/${PN}-5.7.0-symbolizer.patch"
 	"${FILESDIR}/${PN}-5.7.1-fix-tests.patch"
+	"${FILESDIR}/${PN}-5.7.1-correct-license-install-dir.patch"
 )
 
 DESCRIPTION="Radeon Open Compute Code Object Manager"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-01  9:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-02 12:58 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-comgr/, dev-libs/rocm-comgr/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-11-01  9:28 Yixun Lan
2023-10-09 12:34 罗百科
2023-02-02 12:54 Sam James
2023-02-02 12:54 Sam James
2023-02-01  9:53 Andreas Sturmlechner
2022-12-19 14:00 Andreas Sturmlechner
2022-11-19 11:50 Benda XU
2022-03-22  4:09 Benda XU
2022-01-24 14:46 Benda XU
2019-09-30 15:23 Craig Andrews

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox