/[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.1 Revision 1.2
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.1 2004/10/13 14:14:07 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.2 2004/10/13 14:15:16 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...)
61gcc-fullversion() { 61gcc-fullversion() {
62 echo "$($(tc-getCC) -dumpversion)" 62 echo "$($(tc-getCC) -dumpversion)"
63} 63}
64# Returns the version, but only the <major>.<minor> 64# Returns the version, but only the <major>.<minor>
65gcc-version() { 65gcc-version() {
66 echo "$(cc-fullversion | cut -f1,2 -d.)" 66 echo "$(gcc-fullversion | cut -f1,2 -d.)"
67} 67}
68# Returns the Major version 68# Returns the Major version
69gcc-major-version() { 69gcc-major-version() {
70 echo "$(cc-version | cut -f1 -d.)" 70 echo "$(gcc-version | cut -f1 -d.)"
71} 71}
72# Returns the Minor version 72# Returns the Minor version
73gcc-minor-version() { 73gcc-minor-version() {
74 echo "$(cc-version | cut -f2 -d.)" 74 echo "$(gcc-version | cut -f2 -d.)"
75} 75}
76# Returns the Micro version 76# Returns the Micro version
77gcc-micro-version() { 77gcc-micro-version() {
78 echo "$(cc-fullversion | cut -f3 -d.)" 78 echo "$(gcc-fullversion | cut -f3 -d.)"
79} 79}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20