diff options
author | 2022-11-22 20:48:38 +0000 | |
---|---|---|
committer | 2022-11-22 20:51:38 +0000 | |
commit | 3313fb4c7829d383aa6596092c41c377905e711d (patch) | |
tree | 9efe5ca2796ef4c59086dea851592d569133b8b0 /eclass | |
parent | dev-util/nvidia-cuda-toolkit: allow new GCC paths for 10.x, 11.x (diff) | |
download | gentoo-3313fb4c7829d383aa6596092c41c377905e711d.tar.gz gentoo-3313fb4c7829d383aa6596092c41c377905e711d.tar.bz2 gentoo-3313fb4c7829d383aa6596092c41c377905e711d.zip |
cuda.eclass: adapt for newer GCC paths (major version only)
Bug: https://bugs.gentoo.org/865835
Closes: https://bugs.gentoo.org/880675
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cuda.eclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass index 3dc8299c275c..81c8c1f2fc59 100644 --- a/eclass/cuda.eclass +++ b/eclass/cuda.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 case "${EAPI:-0}" in @@ -87,7 +87,7 @@ cuda_gccdir() { # Try the current gcc version first ver=$(gcc-version) if [[ -n "${ver}" ]] && [[ ${vers} =~ ${ver} ]]; then - dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ ) + dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver%.*}*/ ) gcc_bindir="${dirs[${#dirs[@]}-1]}" fi @@ -96,14 +96,14 @@ cuda_gccdir() { ver=$(ver_cut 1-2 "${ver##*sys-devel/gcc-}") if [[ -n "${ver}" ]] && [[ ${vers} =~ ${ver} ]]; then - dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ ) + dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver%.*}*/ ) gcc_bindir="${dirs[${#dirs[@]}-1]}" fi fi for ver in ${vers}; do if has_version "=sys-devel/gcc-${ver}*"; then - dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}*/ ) + dirs=( ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver%.*}*/ ) gcc_bindir="${dirs[${#dirs[@]}-1]}" fi done |