mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user