From e745e1d281540da525df5eaae0904b62bc27852f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 29 Jun 2023 13:40:31 +0100 Subject: gentoo auto-resync : 29:06:2023 - 13:40:31 --- dev-util/Manifest.gz | Bin 68444 -> 68445 bytes dev-util/ccache/Manifest | 2 +- dev-util/ccache/ccache-4.8.2.ebuild | 1 - dev-util/nvidia-cuda-toolkit/Manifest | 6 +- .../nvidia-cuda-toolkit-11.8.0-r4.ebuild | 4 +- .../nvidia-cuda-toolkit-12.1.1-r1.ebuild | 4 +- .../nvidia-cuda-toolkit-12.2.0.ebuild | 317 +++++++++++++++++++++ 7 files changed, 326 insertions(+), 8 deletions(-) create mode 100644 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.2.0.ebuild (limited to 'dev-util') diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz index a601bf440f28..ae28c54381e2 100644 Binary files a/dev-util/Manifest.gz and b/dev-util/Manifest.gz differ diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index 8d056bfdf903..4d107e2bad75 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -8,5 +8,5 @@ DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa524 DIST ccache-4.8.2.tar.xz 560888 BLAKE2B ca907c16b353fabfb8e6479a076aa5cf791e6150f2b16eabf1817d4955d9b5f0200d4b12527ba0493ad9b2d7567adaaf8416bbff858a66fff5a5687328ab7395 SHA512 2edf8da79a9286eb4ed5b6dc2063b55fb97e22a40d1c501c6f17b2f0ce32dfc02e99754afbabbd24fed8312e13e5b8bfc20687d0b5c0cf19fbf64e3adc7bb25b DIST ccache-4.8.2.tar.xz.asc 833 BLAKE2B ea92ceaf9873a1a8373414bb7ad74f101873cbf3bae2ba1c6986d40018b8f37d2fd7cab8d0bcbdfb7cbd167edf0128edb2a6d61ecce2645018a01d450aae25a9 SHA512 6182b7a793d5142c1d9d627b6ea058ac524b6914a85d9628788f7eeea7b762c5422ef6007c404fe9b5d77841b69382289ffb6efbf931c9507940c10bee8ff95f EBUILD ccache-4.7.4.ebuild 2489 BLAKE2B c96ba952f7f90c54812fcc1ead1bc4adf7b036937b2d80a05c0bebc54cdf3cdaac456e8918b6f4905cb38c19aa98d9c912624d22bfd76c0ae35d32e8c7cea6dd SHA512 90802b6ff902bb7cced6947824d38ea90bf8da66b48dec9cc7f1584193f4fb3f4d50217685306e1504118a55a46c6680f27b6a59368c835058171ef33f772e4b -EBUILD ccache-4.8.2.ebuild 3740 BLAKE2B 9d5dee51b4b1aee985f9ef9fb05e6c0a71d8ec4bc8e5d2fb79cba5dfebd413d76e9f6540e95c5702e0808c20c880ec3515c40f4d958fcfd5cefa7a3d7faef177 SHA512 04494f1cb5ba84eed92fe1549d08b712694c66e0ed76f84ac1fee981080d28389e7af0d266a3f472b7d8ad4c700a9e694a43709f5f06dc9d6198ec7963095b34 +EBUILD ccache-4.8.2.ebuild 3647 BLAKE2B a5a42ed7f750b428eebb06b8eee91f8d91dd16db955dce16025fe4e7c85ead09eb3c77eaa22a20fe0f793ad622df911abda31451116b4fbf78b118ab206bd33f SHA512 70607a74fd3ba928862065a6790cec3802c4d8ddc0eec874169bd5ddd0c2561ccce341209465ad9a8ea903c72d55736f978e666c1894d5bfca434d224cf680ed MISC metadata.xml 710 BLAKE2B 0a93cf3dd4222eb2fd500c3cafdff3c01eacecc489a471270922fc5dd1daf58cd1398ddfb7ab4d271a6e84d5a3da5c3e7a341b1e7994af7b10fd432318de7c5e SHA512 dbfa6b8d8f435e25887b25ce25df65184a7f315986ee60a1c723d0e6592ca73bc7414b6650014812eb882e7e39bed953eaa21139a414043c50c018a7b780e6f1 diff --git a/dev-util/ccache/ccache-4.8.2.ebuild b/dev-util/ccache/ccache-4.8.2.ebuild index ddc3a66e3166..8c88659460ae 100644 --- a/dev-util/ccache/ccache-4.8.2.ebuild +++ b/dev-util/ccache/ccache-4.8.2.ebuild @@ -31,7 +31,6 @@ fi LICENSE="GPL-3 LGPL-3" SLOT="0" -# Unkeyworded for now because of failing tests: https://github.com/ccache/ccache/issues/1288 KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" # Enable 'static-c++' by default to make 'gcc' ebuild Just Work: bug #761220 IUSE="${MY_DOCS_USEFLAG} redis +static-c++ test" diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index c108768ef55d..c2b78fb48a5d 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -1,6 +1,8 @@ AUX cuda-config.in 407 BLAKE2B 5f7a0d50d774db58c180b767f00bead7c7dbf5f6b3b4a2f960dfc3b8450f7abf5c2b67c6620c5318f1331646dd2003d61c70a4c31359efd16ff418ecc9d0b446 SHA512 363903b999c43a47a48c52e8898c6044fadcc66d259338ee22863e859c2bc9873a2f1392aa83c9182486d3aa4eaeb5f164cf8ccf29cc74fd8ad56245f76a039a DIST cuda_11.8.0_520.61.05_linux.run 4336730777 BLAKE2B cfdb4a51c49ee504e56a4a95de4e477ef207b678527cbb633c1e83e667f1a62c0f67038befd0b10f7ae24cda9c8bc5c54293d06a05b2e45be6cf677e40f71f17 SHA512 e96e1389abed34b5093b3a1d4e6ae9f3d4f8406621b1475f378efae65868657efce22da03b5b4e0a548d9635e406b8690b18b17b186d03ecb3ca0703c5d5787a DIST cuda_12.1.1_530.30.02_linux.run 4317456991 BLAKE2B 562865cc63202906d0a5c2511387c3ded069c45576810b3076908730021125188017c96e88704b31f0401e29435f01dd87dfe33ca36fce8122683c27e1b928ea SHA512 2f5b07b6253a7268afa81345acc8be9fc3ab80f7f5c565d199f72ac74467d562eb83b72f87f33bafa90c88612b16366c3e209cbec1cb0b5907839e5823520323 -EBUILD nvidia-cuda-toolkit-11.8.0-r4.ebuild 7954 BLAKE2B 36c445919fa5e4473586238183d096d21c6a28fac216e8f787f8b8f65fd83bf14262aa4ea9df746271f0949add5915f5e5da30f3d6735374fe35a7878822f329 SHA512 77fd07e4e1b41abc445e768c27c728d5da497f8d1222e980b3d2deab5ec6acf6e5a753e002ca7e60d9ca4e253780eb32782d9e42aaa8fe8e70dfed5a70596291 -EBUILD nvidia-cuda-toolkit-12.1.1-r1.ebuild 9279 BLAKE2B edd0a07f5995a7ef15c58ff385e5c6e7046f6530f469a1650a39c8f2a3d5ebdb7c1b662b34f93f49f722a7fc93d9b5930b5ed5e9f2c1021a6990415a7e47a2e2 SHA512 f6326ab72edc7d3c0ad612018f0a112f7f70b46bc0b308b4928c552d35515ceacb7b79c85fca0f990f233008200ab5bd6e0a986bd60f1d7b7938ef8011351b20 +DIST cuda_12.2.0_535.54.03_linux.run 4315928767 BLAKE2B 99eb9e0fc81e65809cfcf7937f21ef0ec96c9f049cc988c936a5ee1e3d1f99131a97e1b71e3f4e38732cb309440d0fe96b933a0b9534874f790a31d27bd52809 SHA512 151827e0c1e9400597837c49dc07cf85bebb1c492306bf231b4a1ee00b48433f4ff3da24ed6235d70304fd6f5ee389bb43debbdf69958ef221deb7df0d7d7dae +EBUILD nvidia-cuda-toolkit-11.8.0-r4.ebuild 7972 BLAKE2B fbe811911b5b646f9a3ddb2bcd483f8ecdeb3f185e5d56ad1b4378276d3047d343efb20ac8f4fa186524254dc1917941161004811c131b17e90decaf31999b93 SHA512 a3f4511631efaaecbdf7489d04b4b8674db24ff6bf7ba61027dfb663da1eacd1db7f2bd2e21cb6b433f82f27f4f8900a9341d12371115c3e6d9f7ebcbd325fb2 +EBUILD nvidia-cuda-toolkit-12.1.1-r1.ebuild 9297 BLAKE2B fc99b6813203a0d38f887fd635be9e4bd948a8a07b83f03f99800bf0cc3d1f08c592e0ff8abfd710ae8bfd8001df7df1f3acbf86a963d29c7589842a751fc199 SHA512 c0d818d14eb9158fec6b0a8a5d4fb72180f4170727dc519f7cd179385d6963f2a0b23cf3ecb83035de8b6c37ecf4572c6468328bddbf3c4f2f98d3f6e4760d72 +EBUILD nvidia-cuda-toolkit-12.2.0.ebuild 9297 BLAKE2B 81a68b23744842792d3be7ef449686298f80465b21f5bfb8b1d010e42532f35da7229760cecfb78af9cfdb04b0c4dff5750754bac92c53963594c0977c733160 SHA512 dae8626bf12cdf0c109585046d80fb51786e743b45bdf92667c5ba2306fa371f80f7a42c40ff8d642c803cf1e5d0ea9725bfb9f7064a3ca7123cce84cf354917 MISC metadata.xml 761 BLAKE2B a6ae653c6206cbc05349297499b6dde91bce6d543e10bd5ea915cfe9729dfa6f1eb954ae09c2e4d3997f51315ae090b38606c21b5099e750596ea66fdd93e817 SHA512 9133517d805201d25b651e48abed90394c88ef33a2571ab20b3b19d365f85a90478486c7c087c9150d7d9f6e4026873c5236c64ed649fd3bfc8f9b81479dcc59 diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild index 81874e5dce5f..ac16815eb2cc 100644 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild @@ -198,8 +198,8 @@ src_install() { rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die + rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/lib{crypto,ssl}.so* || die + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/lib{crypto,ssl}.so* || die # unbundle libz rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libz.so* || die diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild index 3d56dff74f93..89752e0c6d16 100644 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild @@ -218,8 +218,8 @@ src_install() { rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die + rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/lib{crypto,ssl}.so* || die + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/lib{crypto,ssl}.so* || die # unbundle libpfm rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.2.0.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.2.0.ebuild new file mode 100644 index 000000000000..56e08afe36fc --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.2.0.ebuild @@ -0,0 +1,317 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs toolchain-funcs unpacker + +DRIVER_PV="535.54.03" + +DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" +HOMEPAGE="https://developer.nvidia.com/cuda-zone" +SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" +S="${WORKDIR}" + +LICENSE="NVIDIA-CUDA" +SLOT="0/${PV}" +KEYWORDS="-* ~amd64 ~amd64-linux" +IUSE="debugger examples nsight profiler rdma vis-profiler sanitizer" +RESTRICT="bindist mirror" + +# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the +# actual required minimum driver version are different. +RDEPEND=" + =x11-drivers/nvidia-drivers-525.60.13 + examples? ( + media-libs/freeglut + media-libs/glu + ) + nsight? ( + dev-libs/libpfm + dev-libs/wayland + dev-qt/qtwayland:6 + || ( + dev-libs/openssl-compat:1.1.1 + dev-libs/openssl:0/1.1 + ) + media-libs/tiff-compat:4 + sys-libs/zlib + ) + rdma? ( sys-cluster/rdma-core ) + vis-profiler? ( + >=virtual/jre-1.8:* + )" +BDEPEND="nsight? ( dev-util/patchelf )" + +QA_PREBUILT="opt/cuda/*" +CHECKREQS_DISK_BUILD="15000M" + +pkg_setup() { + check-reqs_pkg_setup +} + +src_prepare() { + # ATTENTION: change requires revbump, see link below for supported GCC # versions + # https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements + local cuda_supported_gcc="8.5 9.5 10 11 12" + + sed \ + -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ + "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die + + default +} + +src_install() { + local cudadir=/opt/cuda + local ecudadir="${EPREFIX}${cudadir}" + local pathextradirs ldpathextradirs + dodir ${cudadir} + into ${cudadir} + + # Install standard sub packages + local builddirs=( + builds/cuda_{cccl,cudart,cuobjdump,cuxxfilt,demo_suite,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,opencl} + builds/lib{cublas,cufft,cufile,curand,cusolver,cusparse,npp,nvjitlink,nvjpeg} + builds/nvidia_fs + $(usex profiler "builds/cuda_nvprof builds/cuda_cupti builds/cuda_profiler_api" "") + $(usex vis-profiler "builds/cuda_nvvp" "") + $(usex debugger "builds/cuda_gdb" "") + ) + + local d f + for d in "${builddirs[@]}"; do + ebegin "Installing ${d}" + [[ -d ${d} ]] || die "Directory does not exist: ${d}" + + if [[ -d ${d}/bin ]]; then + for f in ${d}/bin/*; do + if [[ -f ${f} ]]; then + dobin "${f}" + else + insinto ${cudadir}/bin + doins -r "${f}" + fi + done + fi + + insinto ${cudadir} + if [[ -d ${d}/targets ]]; then + doins -r "${d}"/targets + fi + if [[ -d ${d}/share ]]; then + doins -r "${d}"/share + fi + if [[ -d ${d}/extras ]]; then + doins -r "${d}"/extras + fi + eend $? + done + dobin "${T}"/cuda-config + + doins builds/EULA.txt + # nvml and nvvm need special handling + ebegin "Installing nvvm" + doins -r builds/cuda_nvcc/nvvm + fperms +x ${cudadir}/nvvm/bin/cicc + eend $? + + ebegin "Installing nvml" + doins -r builds/cuda_nvml_dev/nvml + eend $? + + if use sanitizer; then + ebegin "Installing sanitizer" + dobin builds/integration/Sanitizer/compute-sanitizer + doins -r builds/cuda_sanitizer_api/compute-sanitizer + # special handling for the executable + fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer + eend $? + fi + + use debugger && ldpathextradirs+=":${ecudadir}/extras/Debugger/lib64" + use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" + + if use vis-profiler; then + ebegin "Installing libnvvp" + doins -r builds/cuda_nvvp/libnvvp + # special handling for the executable + fperms +x ${cudadir}/libnvvp/nvvp + eend $? + pathextradirs+=":${ecudadir}/libnvvp" + fi + + if use nsight; then + local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) + ebegin "Installing ${ncu_dir}" + mv builds/nsight_compute builds/${ncu_dir} || die + doins -r builds/${ncu_dir} + + # check this list on every bump + local exes=( + ${ncu_dir}/ncu + ${ncu_dir}/ncu-ui + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/OpenGLVersionChecker + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/QdstrmImporter + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui + ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin + ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper + ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper + ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu + ) + + dobin builds/integration/nsight-compute/{ncu,ncu-ui} + eend $? + + # remove rdma libs (unless USE=rdma) + if ! use rdma; then + rm -r "${ED}"/${cudadir}/${ncu_dir}/host/target-linux-x64/CollectX || die + fi + + local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) + ebegin "Installing ${nsys_dir}" + mv builds/nsight_systems builds/${nsys_dir} || die + doins -r builds/${nsys_dir} + + # check this list on every bump + exes+=( + ${nsys_dir}/host-linux-x64/nsys-ui + ${nsys_dir}/host-linux-x64/nsys-ui.bin + ${nsys_dir}/host-linux-x64/ResolveSymbols + ${nsys_dir}/host-linux-x64/ImportNvtxt + ${nsys_dir}/host-linux-x64/CrashReporter + ${nsys_dir}/host-linux-x64/QdstrmImporter + ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess + ${nsys_dir}/target-linux-x64/nsys + ${nsys_dir}/target-linux-x64/launcher + ${nsys_dir}/target-linux-x64/nvgpucs + ${nsys_dir}/target-linux-x64/nsys-launcher + ${nsys_dir}/target-linux-x64/sqlite3 + ${nsys_dir}/target-linux-x64/python/bin/python + ) + + # remove rdma libs (unless USE=rdma) + if ! use rdma; then + rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-x64/CollectX || die + fi + + dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} + eend $? + + # nsight scripts and binaries need to have their executable bit set, #691284 + for f in "${exes[@]}"; do + fperms +x ${cudadir}/${f} + done + + # fix broken RPATHs + patchelf --set-rpath '$ORIGIN' "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libarrow.so || die + patchelf --set-rpath '$ORIGIN' "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libarrow.so || die + + # remove foreign archs (triggers SONAME warning, #749903) + rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die + rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die + + # unbundle libstdc++ + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die + + # unbundle openssl + rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/lib{crypto,ssl}.so* || die + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/lib{crypto,ssl}.so* || die + + # unbundle libpfm + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die + + # TODO: unbundle qt5 + # TODO: unbundle boost + # TODO: unbundle icu + # TODO: unbundle mesa + # TODO: unbundle libSshClient + # TODO: unbundle sqlite + fi + + if use examples; then + local exes=( + extras/demo_suite/bandwidthTest + extras/demo_suite/busGrind + extras/demo_suite/deviceQuery + extras/demo_suite/nbody + extras/demo_suite/oceanFFT + extras/demo_suite/randomFog + extras/demo_suite/vectorAdd + ) + + # set executable bit on demo_suite binaries + for f in "${exes[@]}"; do + fperms +x ${cudadir}/${f} + done + else + rm -r "${ED}"/${cudadir}/extras/demo_suite || die + fi + + # remove rdma libs (unless USE=rdma) + if ! use rdma; then + rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/libcufile_rdma* || die + fi + + # Add include and lib symlinks + dosym targets/x86_64-linux/include ${ecudadir}/include + dosym targets/x86_64-linux/lib ${ecudadir}/lib64 + + # Remove bad symlinks + rm "${ED}"/${cudadir}/targets/x86_64-linux/include/include || die + rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/lib64 || die + + newenvd - 99cuda <<-EOF + PATH=${ecudadir}/bin${pathextradirs} + ROOTPATH=${ecudadir}/bin + LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} + EOF + + # Cuda prepackages libraries, don't revdep-build on them + insinto /etc/revdep-rebuild + newins - 80${PN} <<-EOF + SEARCH_DIRS_MASK="${ecudadir}" + EOF +} + +pkg_postinst_check() { + local a="$("${EROOT}"/opt/cuda/bin/cuda-config -s)" + local b="0.0" + local v + for v in ${a}; do + ver_test "${v}" -gt "${b}" && b="${v}" + done + + # if gcc and if not gcc-version is at least greatest supported + if tc-is-gcc && \ + ver_test $(gcc-version) -gt "${b}"; then + ewarn + ewarn "gcc > ${b} will not work with CUDA" + ewarn "Make sure you set an earlier version of gcc with gcc-config" + ewarn "or append --compiler-bindir= pointing to a gcc bindir like" + ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" + ewarn "to the nvcc compiler flags" + ewarn + fi +} + +pkg_postinst() { + if [[ ${MERGE_TYPE} != binary ]]; then + pkg_postinst_check + fi + + if use profiler || use nsight; then + einfo + einfo "nvidia-drivers restrict access to performance counters." + einfo "You'll need to either run profiling tools (nvprof, nsight) " + einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " + einfo "a modprobe configuration file " + einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " + einfo + einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" + einfo + fi +} -- cgit v1.2.3