summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-08-11 16:20:23 +0000
committerJustin Lecher <jlec@gentoo.org>2013-08-11 16:20:23 +0000
commita93b5a497b3e67d5773517e1fbccc5d306813207 (patch)
tree97509372287df73030f9d6ed392270e76ee7ced6 /eclass
parentdev-util/nvidia-cuda-sdk: Version Bump, #479374 (diff)
downloadgentoo-2-a93b5a497b3e67d5773517e1fbccc5d306813207.tar.gz
gentoo-2-a93b5a497b3e67d5773517e1fbccc5d306813207.tar.bz2
gentoo-2-a93b5a497b3e67d5773517e1fbccc5d306813207.zip
Add compatibility to latest cuda compiler; respect LDFLAGS
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/cuda.eclass11
2 files changed, 11 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index f0a366d75093..38e9473a4717 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.921 2013/08/11 02:42:54 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.922 2013/08/11 16:20:23 jlec Exp $
+
+ 11 Aug 2013; Justin Lecher <jlec@gentoo.org> cuda.eclass:
+ Add compatibility to latest cuda compiler; respect LDFLAGS
11 Aug 2013; Mike Gilbert <floppym@gentoo.org> chromium.eclass:
Don't call EXPORT_FUNCTONS if CHROMIUM_EXPORT_PHASES is set to 'no'.
diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 5c49dd34e7a3..b3b80b26ef73 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,8 +1,8 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cuda.eclass,v 1.2 2013/06/22 12:37:28 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cuda.eclass,v 1.3 2013/08/11 16:20:23 jlec Exp $
-inherit toolchain-funcs versionator
+inherit flag-o-matic toolchain-funcs versionator
# @ECLASS: cuda.eclass
# @MAINTAINER:
@@ -96,14 +96,17 @@ cuda_gccdir() {
# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
# passing CXXFLAGS to underlying compiler without disturbing nvcc.
cuda_sanitize() {
+ local rawldflags=$(raw-ldflags)
# Be verbose if wanted
[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
# Tell nvcc where to find a compatible compiler
- NVCCFLAGS+=" $(cuda_gccdir -f)"
+ if has_version \<=dev-util/nvidia-cuda-toolkit-5.5; then
+ NVCCFLAGS+=" $(cuda_gccdir -f)"
+ fi
# Tell nvcc which flags should be used for underlying C compiler
- NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\""
+ NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\" --linker-options=\"${rawldflags// /,}\""
debug-print "Using ${NVCCFLAGS} for cuda"
export NVCCFLAGS