| 1 | # Copyright 1999-2012 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.117 2012/09/15 16:16:53 zmedico 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 |
| … | |
… | |
| 354 | ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } |
354 | ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; } |
| 355 | |
355 | |
| 356 | local type=$1 |
356 | local type=$1 |
| 357 | local host=$2 |
357 | local host=$2 |
| 358 | [[ -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" |
| 359 | |
362 | |
| 360 | case ${host} in |
363 | case ${host} in |
| 361 | aarch64*) ninj aarch64 arm;; |
364 | aarch64*) ninj aarch64 arm;; |
| 362 | alpha*) echo alpha;; |
365 | alpha*) echo alpha;; |
| 363 | arm*) echo arm;; |
366 | arm*) echo arm;; |