summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-08-26 20:33:53 +0200
committerSam James <sam@gentoo.org>2024-09-07 15:26:34 +0100
commit5a76747ea313441e2eefffcd1badc7ac59e75ae6 (patch)
tree6b5f1d9df1a2fbd0f2afbde364efb9cbdb65ec04 /dev-build/cmake
parentdev-build/cmake: add 3.30.3 (diff)
downloadgentoo-5a76747ea313441e2eefffcd1badc7ac59e75ae6.tar.gz
gentoo-5a76747ea313441e2eefffcd1badc7ac59e75ae6.tar.bz2
gentoo-5a76747ea313441e2eefffcd1badc7ac59e75ae6.zip
dev-build/cmake: allow override CMAKE_CUDA_HOST_LINK_LAUNCHER
This should fix "undefined reference to `__cxa_call_terminate'" because we can then use CXX to link cuda binaries. [sam: No revbump needed as we only just added 3.30.3.] Bug: https://bugs.gentoo.org/928605 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-build/cmake')
-rw-r--r--dev-build/cmake/cmake-3.30.3.ebuild2
-rw-r--r--dev-build/cmake/cmake-9999.ebuild2
-rw-r--r--dev-build/cmake/files/cmake-3.30.3-cudahostld.patch23
3 files changed, 27 insertions, 0 deletions
diff --git a/dev-build/cmake/cmake-3.30.3.ebuild b/dev-build/cmake/cmake-3.30.3.ebuild
index 7957c7bb58b2..1da4eb19984c 100644
--- a/dev-build/cmake/cmake-3.30.3.ebuild
+++ b/dev-build/cmake/cmake-3.30.3.ebuild
@@ -101,6 +101,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.27.0_rc1-0003-Prefer-pkgconfig-in-FindBLAS.patch
"${FILESDIR}"/${PN}-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch
"${FILESDIR}"/${PN}-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch
+ # Cuda
+ "${FILESDIR}/${PN}-3.30.3-cudahostld.patch"
# Upstream fixes (can usually be removed with a version bump)
)
diff --git a/dev-build/cmake/cmake-9999.ebuild b/dev-build/cmake/cmake-9999.ebuild
index fc1618ceab45..5c33c621e047 100644
--- a/dev-build/cmake/cmake-9999.ebuild
+++ b/dev-build/cmake/cmake-9999.ebuild
@@ -102,6 +102,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch
"${FILESDIR}"/${PN}-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch
"${FILESDIR}"/${PN}-3.27.0_rc1-0006-Filter-out-distcc-warnings-to-avoid-confusing-CMake.patch
+ # Cuda
+ "${FILESDIR}/${PN}-3.30.3-cudahostld.patch"
# Upstream fixes (can usually be removed with a version bump)
)
diff --git a/dev-build/cmake/files/cmake-3.30.3-cudahostld.patch b/dev-build/cmake/files/cmake-3.30.3-cudahostld.patch
new file mode 100644
index 000000000000..f8b29730ea9f
--- /dev/null
+++ b/dev-build/cmake/files/cmake-3.30.3-cudahostld.patch
@@ -0,0 +1,23 @@
+From 0648f8f75c5f7044cca0f96d26e3ef6ed9440b3d Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Mon, 26 Aug 2024 17:04:04 +0200
+Subject: [PATCH] allow custom CMAKE_CUDA_LINK_LAUNCHER
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/Modules/Internal/CMakeNVCCParseImplicitInfo.cmake b/Modules/Internal/CMakeNVCCParseImplicitInfo.cmake
+index 3aa10a2..a58c3ec 100644
+--- a/Modules/Internal/CMakeNVCCParseImplicitInfo.cmake
++++ b/Modules/Internal/CMakeNVCCParseImplicitInfo.cmake
+@@ -77,6 +77,11 @@ macro(cmake_nvcc_parse_implicit_info lang lang_var_)
+ if(_nvcc_link_line)
+ if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
+ set(CMAKE_${lang}_HOST_LINK_LAUNCHER "${CMAKE_LINKER}")
++ elseif(DEFINED ENV{CUDAHOSTLD})
++ set(CMAKE_${lang}_HOST_LINK_LAUNCHER "$ENV{CUDAHOSTLD}")
++ string(APPEND _nvcc_log " env link launcher name: [${CMAKE_${lang}_HOST_LINK_LAUNCHER}]\n")
++ elseif(DEFINED CMAKE_CUDA_HOST_LINK_LAUNCHER)
++ string(APPEND _nvcc_log " set link launcher name: [${CMAKE_${lang}_HOST_LINK_LAUNCHER}]\n")
+ else()
+ #extract the compiler that is being used for linking
+ separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}")