| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 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.9 2004/11/17 22:13:07 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.10 2004/12/06 06:18:59 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...) |
| … | |
… | |
| 75 | else |
75 | else |
| 76 | echo "gcc" |
76 | echo "gcc" |
| 77 | fi |
77 | fi |
| 78 | } |
78 | } |
| 79 | |
79 | |
|
|
80 | # Quick way to export a bunch of vars at once |
|
|
81 | tc-export() { |
|
|
82 | local var |
|
|
83 | for var in "$@" ; do |
|
|
84 | eval tc-get${var} |
|
|
85 | done |
|
|
86 | } |
|
|
87 | |
| 80 | |
88 | |
| 81 | # Returns the version as by `$CC -dumpversion` |
89 | # Returns the version as by `$CC -dumpversion` |
| 82 | gcc-fullversion() { |
90 | gcc-fullversion() { |
| 83 | echo "$($(tc-getCC) -dumpversion)" |
91 | echo "$($(tc-getCC) -dumpversion)" |
| 84 | } |
92 | } |