diff options
author | Benda Xu <heroxbd@gentoo.org> | 2022-08-06 21:47:56 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2022-08-06 22:22:32 +0800 |
commit | 8a64d9b3fa74ab7ee3ec9b4d85f813d63648a130 (patch) | |
tree | acdebaa3d4ece0c459fee566a739fc254df93510 /dev-util/rocm-clang-ocl | |
parent | dev-util/rocm_bandwidth_test: relax slot dependency. (diff) | |
download | gentoo-8a64d9b3fa74ab7ee3ec9b4d85f813d63648a130.tar.gz gentoo-8a64d9b3fa74ab7ee3ec9b4d85f813d63648a130.tar.bz2 gentoo-8a64d9b3fa74ab7ee3ec9b4d85f813d63648a130.zip |
dev-util/rocm-clang-ocl: use system clang.
Bug: https://bugs.gentoo.org/851702
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-util/rocm-clang-ocl')
-rw-r--r-- | dev-util/rocm-clang-ocl/files/rocm-clang-ocl-5.0.2-system-llvm.patch | 17 | ||||
-rw-r--r-- | dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2-r1.ebuild (renamed from dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2.ebuild) | 9 |
2 files changed, 22 insertions, 4 deletions
diff --git a/dev-util/rocm-clang-ocl/files/rocm-clang-ocl-5.0.2-system-llvm.patch b/dev-util/rocm-clang-ocl/files/rocm-clang-ocl-5.0.2-system-llvm.patch new file mode 100644 index 000000000000..5f052f4282e0 --- /dev/null +++ b/dev-util/rocm-clang-ocl/files/rocm-clang-ocl-5.0.2-system-llvm.patch @@ -0,0 +1,17 @@ +Use system clang. + +Forwarded: not yet. + +Index: clang-ocl-rocm-5.0.2/CMakeLists.txt +=================================================================== +--- clang-ocl-rocm-5.0.2.orig/CMakeLists.txt ++++ clang-ocl-rocm-5.0.2/CMakeLists.txt +@@ -20,7 +20,7 @@ if(hcc_FOUND) + set(CLANG_BIN "${hcc_LIB_INSTALL_DIR}/../bin" CACHE STRING "") + set(BITCODE_DIR "${hcc_LIB_INSTALL_DIR}" CACHE STRING "") + else() +- find_program(CLANG_EXE NAMES clang HINTS ${CXX_COMPILER_PATH}/bin PATHS /opt/rocm/llvm/bin) ++ find_program(CLANG_EXE NAMES clang) + get_filename_component(CLANG_EXE_DIR ${CLANG_EXE} DIRECTORY) + find_package(AMDDeviceLibs PATHS /opt/rocm) + set(CLANG_BIN "${CLANG_EXE_DIR}" CACHE STRING "") diff --git a/dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2.ebuild b/dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2-r1.ebuild index 202836d1adbe..40be9d9dd7df 100644 --- a/dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2.ebuild +++ b/dev-util/rocm-clang-ocl/rocm-clang-ocl-5.0.2-r1.ebuild @@ -20,12 +20,13 @@ DEPEND=" S="${WORKDIR}/clang-ocl-rocm-${PV}" +PATCHES=( "${FILESDIR}"/${PN}-5.0.2-system-llvm.patch ) + src_prepare() { - sed -e "s:HINTS \${CXX_COMPILER_PATH}/bin:NO_DEFAULT_PATH:" \ - -e "s:/opt/rocm/llvm/bin:${EPREFIX}/usr/lib/llvm/roc/bin:" \ + cmake_src_prepare + + sed \ -e "/AMDDeviceLibs PATHS/s:/opt/rocm:${EPREFIX}/usr/lib/cmake/AMDDeviceLibs:" \ -e "s:\${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" \ -i CMakeLists.txt || die - - cmake_src_prepare } |