commit:     4f749acaea36d8ef66c2c4834c598247bb15ae41
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Wed Feb  1 09:45:56 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb  8 04:17:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f749aca

dev-util/roctracer: strip -Werror and fix a configure issue

hip-config.cmake run ${HIP_CXX_COMPILER} -print-resource-dir to
determine some paths. By default,
HIP_CXX_COMPILER=${CMAKE_CXX_COMPILER}=gcc, causing configuration
issues, so set HIP_CXX_COMPILER=hipcc.

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

 dev-util/roctracer/files/roctracer-5.3.3-Werror.patch | 15 +++++++++++++++
 dev-util/roctracer/roctracer-5.3.3.ebuild             |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dev-util/roctracer/files/roctracer-5.3.3-Werror.patch 
b/dev-util/roctracer/files/roctracer-5.3.3-Werror.patch
new file mode 100644
index 000000000000..b932bb5cb5d3
--- /dev/null
+++ b/dev-util/roctracer/files/roctracer-5.3.3-Werror.patch
@@ -0,0 +1,15 @@
+Should not use the aggressive -Werror flag.
+
+Index: roctracer-rocm-5.3.3/CMakeLists.txt
+===================================================================
+--- roctracer-rocm-5.3.3.orig/CMakeLists.txt
++++ roctracer-rocm-5.3.3/CMakeLists.txt
+@@ -37,7 +37,7 @@ endif()
+ 
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-add_compile_options(-Wall -Werror)
++add_compile_options(-Wall)
+ 
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ 

diff --git a/dev-util/roctracer/roctracer-5.3.3.ebuild 
b/dev-util/roctracer/roctracer-5.3.3.ebuild
index a053427379df..23e3d7e714e7 100644
--- a/dev-util/roctracer/roctracer-5.3.3.ebuild
+++ b/dev-util/roctracer/roctracer-5.3.3.ebuild
@@ -31,7 +31,8 @@ BDEPEND="
 "
 
 PATCHES=( "${FILESDIR}"/roctracer-5.3.3-flat-lib-layout.patch
-       "${FILESDIR}"/roctracer-5.3.3-do-not-install-test-files.patch )
+       "${FILESDIR}"/roctracer-5.3.3-do-not-install-test-files.patch
+       "${FILESDIR}"/roctracer-5.3.3-Werror.patch )
 
 python_check_deps() {
        python_has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]" \
@@ -51,6 +52,7 @@ src_configure() {
                -DCMAKE_MODULE_PATH="${EPREFIX}/usr/lib64/cmake/hip"
                -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
                -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+               -DHIP_CXX_COMPILER=hipcc
        )
 
        cmake_src_configure

Reply via email to