| 1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 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.44 2005/09/16 01:44:42 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.45 2005/10/06 01:52:51 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Toolchain Ninjas <ninjas@gentoo.org> |
5 | # Author: Toolchain Ninjas <ninjas@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass contains (or should) functions to get common info |
7 | # This eclass contains (or should) functions to get common info |
| 8 | # about the toolchain (libc/compiler/binutils/etc...) |
8 | # about the toolchain (libc/compiler/binutils/etc...) |
| … | |
… | |
| 62 | |
62 | |
| 63 | local search= |
63 | local search= |
| 64 | if [[ -n ${CBUILD} ]] ; then |
64 | if [[ -n ${CBUILD} ]] ; then |
| 65 | search=$(type -p ${CBUILD}-gcc) |
65 | search=$(type -p ${CBUILD}-gcc) |
| 66 | search=${search##*/} |
66 | search=${search##*/} |
| 67 | else |
|
|
| 68 | search=gcc |
|
|
| 69 | fi |
67 | fi |
|
|
68 | search=${search:-gcc} |
| 70 | |
69 | |
| 71 | export BUILD_CC=${search} |
70 | export BUILD_CC=${search} |
| 72 | echo "${search}" |
71 | echo "${search}" |
| 73 | } |
72 | } |
| 74 | |
73 | |