summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2023-11-20 17:50:17 +0800
committerSam James <sam@gentoo.org>2024-06-26 10:19:01 +0100
commit3583919cf29fa14402d1815ad7855fbe399fbb55 (patch)
tree8efd71f77c8a803856878841aee610db857434ca /dev-util
parentdev-util/hip: fix manifest and add extend-isa-compatibility-check patch for 6... (diff)
downloadgentoo-3583919cf29fa14402d1815ad7855fbe399fbb55.tar.gz
gentoo-3583919cf29fa14402d1815ad7855fbe399fbb55.tar.bz2
gentoo-3583919cf29fa14402d1815ad7855fbe399fbb55.zip
dev-util/hip: Fix compilation of hipMathFunctions
Clang-17 does not recognize -fallow-half-arguments-and-returns Upstream PR: https://github.com/ROCm/hip-tests/pull/443 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch28
-rw-r--r--dev-util/hip/hip-5.7.1-r2.ebuild7
-rw-r--r--dev-util/hip/hip-6.0.2.ebuild7
3 files changed, 38 insertions, 4 deletions
diff --git a/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch
new file mode 100644
index 000000000000..02aa12f1fe42
--- /dev/null
+++ b/dev-util/hip/files/hip-test-5.7.1-remove-incompatible-flag.patch
@@ -0,0 +1,28 @@
+https://github.com/ROCm/hip-tests/pull/443
+
+From cb0140843a162f69c454e91cd994524423b39b8c Mon Sep 17 00:00:00 2001
+From: Yiyang Wu <xgreenlandforwyy@gmail.com>
+Date: Sun, 10 Dec 2023 21:57:14 +0800
+Subject: [PATCH] -fallow-half-arguments-and-returns is not recognized by clang
+
+Reference: https://reviews.llvm.org/D145345
+Issue: https://github.com/ROCm/HIP/issues/3178
+Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
+---
+ catch/unit/deviceLib/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/catch/unit/deviceLib/CMakeLists.txt b/catch/unit/deviceLib/CMakeLists.txt
+index 0645def..3662cbd 100644
+--- catch/unit/deviceLib/CMakeLists.txt
++++ catch/unit/deviceLib/CMakeLists.txt
+@@ -171,7 +171,6 @@ if(${ARCH_CHECK} GREATER_EQUAL 0)
+ set_source_files_properties(unsafeAtomicAdd_NonCoherent_withunsafeflag.cc PROPERTIES COMPILE_OPTIONS "-munsafe-fp-atomics")
+ set_source_files_properties(unsafeAtomicAdd_Coherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics")
+ set_source_files_properties(unsafeAtomicAdd_NonCoherent_withnounsafeflag.cc PROPERTIES COMPILE_OPTIONS "-mno-unsafe-fp-atomics")
+- set_source_files_properties(hipMathFunctions.cc PROPERTIES COMPILE_FLAGS "-Xclang -fallow-half-arguments-and-returns")
+ file(GLOB AtomicAdd_files *AtomicAdd_*_*.cc)
+ set_property(SOURCE ${AtomicAdd_files} PROPERTY COMPILE_FLAGS --save-temps)
+ file(GLOB unsafeAtomicAdd_files *unsafeAtomicAdd_*_*.cc)
+--
+2.42.0
diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index 071f9253fb5c..d55e78d2afef 100644
--- a/dev-util/hip/hip-5.7.1-r2.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -76,8 +76,11 @@ src_prepare() {
cmake_src_prepare
if use test; then
- PATCHES=${FILESDIR}/hip-test-5.7.0-rocm_agent_enumerator-location.patch \
- hip_test_wrapper cmake_src_prepare
+ local PATCHES=(
+ "${FILESDIR}"/hip-test-5.7.0-rocm_agent_enumerator-location.patch \
+ "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch
+ )
+ hip_test_wrapper cmake_src_prepare
fi
}
diff --git a/dev-util/hip/hip-6.0.2.ebuild b/dev-util/hip/hip-6.0.2.ebuild
index 03a8b89a239c..6ca3d3117455 100644
--- a/dev-util/hip/hip-6.0.2.ebuild
+++ b/dev-util/hip/hip-6.0.2.ebuild
@@ -78,8 +78,11 @@ src_prepare() {
cmake_src_prepare
if use test; then
- PATCHES="${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch \
- hip_test_wrapper cmake_src_prepare
+ local PATCHES=(
+ "${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch \
+ "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch
+ )
+ hip_test_wrapper cmake_src_prepare
fi
}