From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5F2CE1384B7 for ; Tue, 15 Jan 2013 15:27:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E57F21C102; Tue, 15 Jan 2013 15:27:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C796721C102 for ; Tue, 15 Jan 2013 15:27:27 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3C9D33DAAB for ; Tue, 15 Jan 2013 15:27:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E8A65E408F for ; Tue, 15 Jan 2013 15:27:24 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1358263626.a81403c2f1c1604835d1f7e47c79f94ccc223f9e.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: eclass/ X-VCS-Repository: proj/sci X-VCS-Files: eclass/cuda.eclass X-VCS-Directories: eclass/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: a81403c2f1c1604835d1f7e47c79f94ccc223f9e X-VCS-Branch: master Date: Tue, 15 Jan 2013 15:27:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 821183bd-0cd3-4427-a8d0-db1a21d617ae X-Archives-Hash: 0a7b9f4d978bc5d6e5900805c0b5e185 commit: a81403c2f1c1604835d1f7e47c79f94ccc223f9e Author: Justin Lecher gentoo org> AuthorDate: Tue Jan 15 15:27:06 2013 +0000 Commit: Justin Lecher gentoo org> CommitDate: Tue Jan 15 15:27:06 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a81403c2 moved to tree Signed-off-by: Justin Lecher gentoo.org> --- eclass/cuda.eclass | 132 ---------------------------------------------------- 1 files changed, 0 insertions(+), 132 deletions(-) diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass deleted file mode 100644 index beac082..0000000 --- a/eclass/cuda.eclass +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit toolchain-funcs versionator - -# @ECLASS: cuda.eclass -# @MAINTAINER: -# Justin Lecher -# @BLURB: Common functions for cuda packages -# @DESCRIPTION: -# This eclass contains functions to be used with cuda package. Currently it is -# setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc. This is -# automatically done and exported in src_prepare() or manually by calling -# cuda_sanatize. -# @EXAMPLE: -# inherit cuda - -# @ECLASS-VARIABLE: NVCCFLAGS -# @DESCRIPTION: -# nvcc compiler flags (see nvcc --help), which should be used like -# CFLAGS for c compiler -: ${NVCCFLAGS:=-O2} - -# @ECLASS-VARIABLE: CUDA_VERBOSE -# @DESCRIPTION: -# Being verbose during compilation to see underlying commands -: ${CUDA_VERBOSE:=true} - -# @FUNCTION: cuda_gccdir -# @USAGE: [-f] -# @RETURN: gcc bindir compatible with current cuda, optionally (-f) prefixed with "--compiler-bindir=" -# @DESCRIPTION: -# Helper for determination of the latest gcc bindir supported by -# then current nvidia cuda toolkit. -# -# Example: -# @CODE -# cuda_gccdir -f -# -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3" -# @CODE -cuda_gccdir() { - local gcc_bindir ver args="" flag ret - - # Currently we only support the gnu compiler suite - if [[ $(tc-getCXX) != *g++* ]]; then - ewarn "Currently we only support the gnu compiler suite" - return 2 - fi - - while [ "$1" ]; do - case $1 in - -f) - flag="--compiler-bindir=" - ;; - *) - ;; - esac - shift - done - - if ! args=$(cuda-config -s); then - eerror "Could not execute cuda-config" - eerror "Make sure >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 is installed" - die "cuda-config not found" - else - args=$(version_sort ${args}) - if [[ -z ${args} ]]; then - die "Could not determine supported gcc versions from cuda-config" - fi - fi - - for ver in ${args}; do - has_version sys-devel/gcc:${ver} && \ - gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}* | tail -n 1)" - done - - if [[ -n ${gcc_bindir} ]]; then - if [[ -n ${flag} ]]; then - ret="${flag}\\\"${gcc_bindir}\\\"" - else - ret="${gcc_bindir}" - fi - echo ${ret} - return 0 - else - eerror "Only gcc version(s) ${args} are supported," - eerror "of which none is installed" - die "Only gcc version(s) ${args} are supported" - return 1 - fi -} - -# @FUNCTION: cuda_sanitize -# @DESCRIPTION: -# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and -# passing CXXFLAGS to underlying compiler without disturbing nvcc. -cuda_sanitize() { - # Be verbose if wanted - [[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v" - - # Tell nvcc where to find a compatible compiler - NVCCFLAGS+=" $(cuda_gccdir -f)" - - # Tell nvcc which flags should be used for underlying C compiler - NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\"" - - export NVCCFLAGS -} - -# @FUNCTION: cuda_pkg_setup -# @DESCRIPTION: -# Call cuda_src_prepare for EAPIs not supporting src_prepare -cuda_pkg_setup() { - cuda_src_prepare -} - -# @FUNCTION: cuda_src_prepare -# @DESCRIPTION: -# Sanitise and export NVCCFLAGS by default -cuda_src_prepare() { - cuda_sanitize -} - - -case "${EAPI:-0}" in - 0|1) - EXPORT_FUNCTIONS pkg_setup ;; - 2|3|4|5) - EXPORT_FUNCTIONS src_prepare ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac