/[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.3 Revision 1.4
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.3 2004/10/13 23:44:35 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.4 2004/10/15 20:10:45 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...)
53# Returns the name of the symbol/object thingy 53# Returns the name of the symbol/object thingy
54tc-getNM() { tc-getPROG NM nm; } 54tc-getNM() { tc-getPROG NM nm; }
55# Returns the name of the archiver indexer 55# Returns the name of the archiver indexer
56tc-getRANLIB() { tc-getPROG RANLIB ranlib; } 56tc-getRANLIB() { tc-getPROG RANLIB ranlib; }
57 57
58# Returns the name of the C compiler for build
59tc-getBUILD_CC() {
60 if [ -n "${CC_FOR_BUILD}" ] ; then
61 echo "${CC_FOR_BUILD}"
62 return 0
63 fi
64
65 if [ -n "${CBUILD}" ] ; then
66 local cc="$(type -p "${CBUILD}-gcc")"
67 if [ -n "${cc}" ] ; then
68 echo "${cc}"
69 fi
70 fi
71
72 echo "gcc"
73}
58 74
59 75
60# Returns the version as by `$CC -dumpversion` 76# Returns the version as by `$CC -dumpversion`
61gcc-fullversion() { 77gcc-fullversion() {
62 echo "$($(tc-getCC) -dumpversion)" 78 echo "$($(tc-getCC) -dumpversion)"

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20