/[gentoo-x86]/eclass/toolchain-funcs.eclass
Gentoo

Diff of /eclass/toolchain-funcs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.116 Revision 1.118
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.116 2012/09/13 05:06:34 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.118 2012/09/27 19:34:28 axs Exp $
4 4
5# @ECLASS: toolchain-funcs.eclass 5# @ECLASS: toolchain-funcs.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Toolchain Ninjas <toolchain@gentoo.org> 7# Toolchain Ninjas <toolchain@gentoo.org>
8# @BLURB: functions to query common info about the toolchain 8# @BLURB: functions to query common info about the toolchain
15 15
16if [[ ${___ECLASS_ONCE_TOOLCHAIN_FUNCS} != "recur -_+^+_- spank" ]] ; then 16if [[ ${___ECLASS_ONCE_TOOLCHAIN_FUNCS} != "recur -_+^+_- spank" ]] ; then
17___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank" 17___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank"
18 18
19inherit multilib 19inherit multilib
20
21DESCRIPTION="Based on the ${ECLASS} eclass"
22 20
23# tc-getPROG <VAR [search vars]> <default> [tuple] 21# tc-getPROG <VAR [search vars]> <default> [tuple]
24_tc-getPROG() { 22_tc-getPROG() {
25 local tuple=$1 23 local tuple=$1
26 local v var vars=$2 24 local v var vars=$2
356ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } 354ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
357 355
358 local type=$1 356 local type=$1
359 local host=$2 357 local host=$2
360 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} 358 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
359
360 local KV=${KV:-${KV_FULL}}
361 [[ -z ${KV} ]] && die "toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info"
361 362
362 case ${host} in 363 case ${host} in
363 aarch64*) ninj aarch64 arm;; 364 aarch64*) ninj aarch64 arm;;
364 alpha*) echo alpha;; 365 alpha*) echo alpha;;
365 arm*) echo arm;; 366 arm*) echo arm;;

Legend:
Removed from v.1.116  
changed lines
  Added in v.1.118

  ViewVC Help
Powered by ViewVC 1.1.20