/[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.75 Revision 1.78
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.75 2008/01/02 01:01:03 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.78 2008/07/03 05:26:47 dberkholz 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
74tc-getRANLIB() { tc-getPROG RANLIB ranlib "$@"; } 74tc-getRANLIB() { tc-getPROG RANLIB ranlib "$@"; }
75# @FUNCTION: tc-getF77 75# @FUNCTION: tc-getF77
76# @USAGE: [toolchain prefix] 76# @USAGE: [toolchain prefix]
77# @RETURN: name of the Fortran 77 compiler 77# @RETURN: name of the Fortran 77 compiler
78tc-getF77() { tc-getPROG F77 f77 "$@"; } 78tc-getF77() { tc-getPROG F77 f77 "$@"; }
79# @FUNCTION: tc-getF90 79# @FUNCTION: tc-getFC
80# @USAGE: [toolchain prefix] 80# @USAGE: [toolchain prefix]
81# @RETURN: name of the Fortran 90 compiler 81# @RETURN: name of the Fortran 90 compiler
82tc-getF90() { tc-getPROG F90 gfortran "$@"; } 82tc-getFC() { tc-getPROG FC gfortran "$@"; }
83# @FUNCTION: tc-getFORTRAN
84# @USAGE: [toolchain prefix]
85# @RETURN: name of the Fortran compiler
86tc-getFORTRAN() { tc-getPROG FORTRAN gfortran "$@"; }
87# @FUNCTION: tc-getGCJ 83# @FUNCTION: tc-getGCJ
88# @USAGE: [toolchain prefix] 84# @USAGE: [toolchain prefix]
89# @RETURN: name of the java compiler 85# @RETURN: name of the java compiler
90tc-getGCJ() { tc-getPROG GCJ gcj "$@"; } 86tc-getGCJ() { tc-getPROG GCJ gcj "$@"; }
91 87
171 cris*) echo cris;; 167 cris*) echo cris;;
172 hppa*) ninj parisc hppa;; 168 hppa*) ninj parisc hppa;;
173 i?86*) 169 i?86*)
174 # Starting with linux-2.6.24, the 'x86_64' and 'i386' 170 # Starting with linux-2.6.24, the 'x86_64' and 'i386'
175 # trees have been unified into 'x86'. 171 # trees have been unified into 'x86'.
172 # FreeBSD still uses i386
176 if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) ]] ; then 173 if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then
177 echo i386 174 echo i386
178 else 175 else
179 echo x86 176 echo x86
180 fi 177 fi
181 ;; 178 ;;
295} 292}
296 293
297# Returns the installation directory - internal toolchain 294# Returns the installation directory - internal toolchain
298# function for use by _gcc-specs-exists (for flag-o-matic). 295# function for use by _gcc-specs-exists (for flag-o-matic).
299_gcc-install-dir() { 296_gcc-install-dir() {
300 echo "$($(tc-getCC) -print-search-dirs 2> /dev/null |\ 297 echo "$(LC_ALL=C $(tc-getCC) -print-search-dirs 2> /dev/null |\
301 awk '$1=="install:" {print $2}')" 298 awk '$1=="install:" {print $2}')"
302} 299}
303# Returns true if the indicated specs file exists - internal toolchain 300# Returns true if the indicated specs file exists - internal toolchain
304# function for use by flag-o-matic. 301# function for use by flag-o-matic.
305_gcc-specs-exists() { 302_gcc-specs-exists() {

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.78

  ViewVC Help
Powered by ViewVC 1.1.20