mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-util/nvidia-cuda-toolkit: ebuild updates
Fix potential breakage from glibc-2.41 when using clang to compile cuda code. Use relative symlinks to link to host target. Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41967 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -12,6 +12,16 @@ of
|
||||
|
||||
extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true);
|
||||
|
||||
/opt/cuda-12.8.1/bin/../targets/x86_64-linux/include/crt/math_functions.hpp:2982:17: error: 'sinpi' is missing exception specification 'throw()'
|
||||
2982 | __func__(double sinpi(double a))
|
||||
| ^
|
||||
| throw()
|
||||
/opt/cuda-12.8.1/bin/../targets/x86_64-linux/include/crt/func_macro.h:37:16: note: expanded from macro '__func__'
|
||||
37 | inline decl
|
||||
| ^
|
||||
/opt/cuda-12.8.1/bin/../targets/x86_64-linux/include/crt/math_functions.h:6006:17: note: previous declaration is here
|
||||
6006 | __func__(double sinpi(double a));
|
||||
|
||||
See-Also: https://sourceware.org/git/?p=glibc.git;a=commit;h=0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3
|
||||
Signed-off-by: Paul Zander <negril.nx@gmail.com>
|
||||
|
||||
@@ -67,6 +77,43 @@ index d8201f9..a9b19d4 100644
|
||||
/**
|
||||
* \ingroup CUDA_MATH_DOUBLE
|
||||
* \brief Calculate the sine and cosine of the first input argument
|
||||
diff --git a/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.hpp b/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.hpp
|
||||
index cc09b91..11eec71 100644
|
||||
--- a/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.hpp
|
||||
+++ b/builds/cuda_nvcc/targets/x86_64-linux/include/crt/math_functions.hpp
|
||||
@@ -2979,7 +2979,7 @@ __func__(double rcbrt(const double a))
|
||||
return t;
|
||||
}
|
||||
|
||||
-__func__(double sinpi(double a))
|
||||
+__func__(double sinpi(double a)) throw()
|
||||
{
|
||||
int n;
|
||||
|
||||
@@ -3009,7 +3009,7 @@ __func__(double sinpi(double a))
|
||||
return a;
|
||||
}
|
||||
|
||||
-__func__(double cospi(double a))
|
||||
+__func__(double cospi(double a)) throw()
|
||||
{
|
||||
int n;
|
||||
|
||||
@@ -3340,12 +3340,12 @@ __func__(float rcbrtf(const float a))
|
||||
return static_cast<float>(rcbrt(static_cast<double>(a)));
|
||||
}
|
||||
|
||||
-__func__(float sinpif(const float a))
|
||||
+__func__(float sinpif(const float a)) throw()
|
||||
{
|
||||
return static_cast<float>(sinpi(static_cast<double>(a)));
|
||||
}
|
||||
|
||||
-__func__(float cospif(const float a))
|
||||
+__func__(float cospif(const float a)) throw()
|
||||
{
|
||||
return static_cast<float>(cospi(static_cast<double>(a)));
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ src_unpack() {
|
||||
"builds/nvidia_fs"
|
||||
)
|
||||
|
||||
edob -m "failed to extract ${A}" \
|
||||
edob -m "Extracting ${A}" \
|
||||
bash "${DISTDIR}/${A}" --tar xf -X <(printf "%s\n" "${exclude[@]}")
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ src_install() {
|
||||
fi
|
||||
|
||||
# Add include and lib symlinks
|
||||
dosym "targets/${narch}-linux/include" "${CUDA_PATH}/include"
|
||||
dosym "targets/${narch}-linux/lib" "${CUDA_PATH}/lib64"
|
||||
dosym -r "${CUDA_PATH}/targets/${narch}-linux/include" "${CUDA_PATH}/include"
|
||||
dosym -r "${CUDA_PATH}/targets/${narch}-linux/lib" "${CUDA_PATH}/lib64"
|
||||
|
||||
find "${ED}/${CUDA_PATH}" -empty -delete || die
|
||||
|
||||
@@ -321,7 +321,7 @@ src_install() {
|
||||
|
||||
# skip til cudnn has been changed #950207
|
||||
# if [[ "${SLOT}" != "${PV}" ]]; then
|
||||
# dosym "${CUDA_PATH}" "${CUDA_PATH%"-${PV}"}"
|
||||
# dosym -r "${CUDA_PATH}" "${CUDA_PATH%"-${PV}"}"
|
||||
# fi
|
||||
|
||||
fowners -R root:root "${CUDA_PATH}"
|
||||
|
||||
@@ -139,7 +139,7 @@ src_unpack() {
|
||||
"builds/nvidia_fs"
|
||||
)
|
||||
|
||||
edob -m "failed to extract ${A}" \
|
||||
edob -m "Extracting ${A}" \
|
||||
bash "${DISTDIR}/${A}" --tar xf -X <(printf "%s\n" "${exclude[@]}")
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ src_install() {
|
||||
fi
|
||||
|
||||
# Add include and lib symlinks
|
||||
dosym "targets/${narch}-linux/include" "${CUDA_PATH}/include"
|
||||
dosym "targets/${narch}-linux/lib" "${CUDA_PATH}/lib64"
|
||||
dosym -r "${CUDA_PATH}/targets/${narch}-linux/include" "${CUDA_PATH}/include"
|
||||
dosym -r "${CUDA_PATH}/targets/${narch}-linux/lib" "${CUDA_PATH}/lib64"
|
||||
|
||||
find "${ED}/${CUDA_PATH}" -empty -delete || die
|
||||
|
||||
@@ -321,7 +321,7 @@ src_install() {
|
||||
|
||||
# skip til cudnn has been changed #950207
|
||||
# if [[ "${SLOT}" != "${PV}" ]]; then
|
||||
# dosym "${CUDA_PATH}" "${CUDA_PATH%"-${PV}"}"
|
||||
# dosym -r "${CUDA_PATH}" "${CUDA_PATH%"-${PV}"}"
|
||||
# fi
|
||||
|
||||
fowners -R root:root "${CUDA_PATH}"
|
||||
|
||||
Reference in New Issue
Block a user