summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2024-05-02 23:12:19 +0800
committerSam James <sam@gentoo.org>2024-06-26 10:18:54 +0100
commit05679cda7e4ebd139590f8918af8b66ae502cb96 (patch)
treec8f4d6662639bd0e13dcf7885cae81bba66e4575 /dev-libs
parentdev-libs/rocm-device-libs: add 6.1.1 (diff)
downloadgentoo-05679cda7e4ebd139590f8918af8b66ae502cb96.tar.gz
gentoo-05679cda7e4ebd139590f8918af8b66ae502cb96.tar.bz2
gentoo-05679cda7e4ebd139590f8918af8b66ae502cb96.zip
dev-libs/rocm-device-libs: symlink bitcode to clang lib path
This is the default search path for clang, so we don't need to specify --rocm-device-lib-path or --hip-device-lib-path to other packages. Closes: https://bugs.gentoo.org/922227 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-5.7.1.ebuild9
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild7
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild7
3 files changed, 22 insertions, 1 deletions
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-5.7.1.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-5.7.1.ebuild
index 56af5a5be6b3..f86b432e076a 100644
--- a/dev-libs/rocm-device-libs/rocm-device-libs-5.7.1.ebuild
+++ b/dev-libs/rocm-device-libs/rocm-device-libs-5.7.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -47,3 +47,10 @@ src_configure() {
)
cmake_src_configure
}
+
+src_install() {
+ cmake_src_install
+ local CLANG_EXE="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/clang"
+ local bitcodedir="$("${CLANG_EXE}" -print-resource-dir)/$(get_libdir)/amdgcn/bitcode"
+ dosym -r "/usr/lib/amdgcn/bitcode" "${bitcodedir#${EPREFIX}}"
+}
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild
index f4371bae36c0..8724dec2d549 100644
--- a/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild
+++ b/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild
@@ -59,3 +59,10 @@ src_test() {
)
cmake_src_test
}
+
+src_install() {
+ cmake_src_install
+ local CLANG_EXE="$(get_llvm_prefix)/bin/clang"
+ local bitcodedir="$("${CLANG_EXE}" -print-resource-dir)/$(get_libdir)/amdgcn/bitcode"
+ dosym -r "/usr/lib/amdgcn/bitcode" "${bitcodedir#${EPREFIX}}"
+}
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild
index a4bd9f6a52e9..73ec778c950e 100644
--- a/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild
+++ b/dev-libs/rocm-device-libs/rocm-device-libs-6.1.1.ebuild
@@ -70,3 +70,10 @@ src_configure() {
)
cmake_src_configure
}
+
+src_install() {
+ cmake_src_install
+ local CLANG_EXE="$(get_llvm_prefix)/bin/clang"
+ local bitcodedir="$("${CLANG_EXE}" -print-resource-dir)/$(get_libdir)/amdgcn/bitcode"
+ dosym -r "/usr/lib/amdgcn/bitcode" "${bitcodedir#${EPREFIX}}"
+}