/[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.106 Revision 1.107
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.106 2011/09/09 19:14:19 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.107 2011/09/12 21:42:08 vapier 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
39 [[ -n ${search} ]] && prog=${search##*/} 39 [[ -n ${search} ]] && prog=${search##*/}
40 40
41 export ${var}=${prog} 41 export ${var}=${prog}
42 echo "${!var}" 42 echo "${!var}"
43} 43}
44tc-getBUILD_PROG() { _tc-getPROG CBUILD "$@"; } 44tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
45tc-getPROG() { _tc-getPROG CHOST "$@"; } 45tc-getPROG() { _tc-getPROG CHOST "$@"; }
46 46
47# @FUNCTION: tc-getAR 47# @FUNCTION: tc-getAR
48# @USAGE: [toolchain prefix] 48# @USAGE: [toolchain prefix]
49# @RETURN: name of the archiver 49# @RETURN: name of the archiver
107# @FUNCTION: tc-getDLLWRAP 107# @FUNCTION: tc-getDLLWRAP
108# @USAGE: [toolchain prefix] 108# @USAGE: [toolchain prefix]
109# @RETURN: name of the Windows dllwrap utility 109# @RETURN: name of the Windows dllwrap utility
110tc-getDLLWRAP() { tc-getPROG DLLWRAP dllwrap "$@"; } 110tc-getDLLWRAP() { tc-getPROG DLLWRAP dllwrap "$@"; }
111 111
112# @FUNCTION: tc-getBUILD_AR
113# @USAGE: [toolchain prefix]
114# @RETURN: name of the archiver for building binaries to run on the build machine
115tc-getBUILD_AR() { tc-getBUILD_PROG AR ar "$@"; }
116# @FUNCTION: tc-getBUILD_AS
117# @USAGE: [toolchain prefix]
118# @RETURN: name of the assembler for building binaries to run on the build machine
119tc-getBUILD_AS() { tc-getBUILD_PROG AS as "$@"; }
112# @FUNCTION: tc-getBUILD_CC 120# @FUNCTION: tc-getBUILD_CC
113# @USAGE: [toolchain prefix] 121# @USAGE: [toolchain prefix]
114# @RETURN: name of the C compiler for building binaries to run on the build machine 122# @RETURN: name of the C compiler for building binaries to run on the build machine
115tc-getBUILD_CC() { tc-getBUILD_PROG "BUILD_CC CC_FOR_BUILD HOSTCC" gcc "$@"; } 123tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; }
116# @FUNCTION: tc-getBUILD_CPP 124# @FUNCTION: tc-getBUILD_CPP
117# @USAGE: [toolchain prefix] 125# @USAGE: [toolchain prefix]
118# @RETURN: name of the C preprocessor for building binaries to run on the build machine 126# @RETURN: name of the C preprocessor for building binaries to run on the build machine
119tc-getBUILD_CPP() { tc-getBUILD_PROG "BUILD_CPP CPP_FOR_BUILD HOSTCPP" cpp "$@"; } 127tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; }
120# @FUNCTION: tc-getBUILD_CXX 128# @FUNCTION: tc-getBUILD_CXX
121# @USAGE: [toolchain prefix] 129# @USAGE: [toolchain prefix]
122# @RETURN: name of the C++ compiler for building binaries to run on the build machine 130# @RETURN: name of the C++ compiler for building binaries to run on the build machine
123tc-getBUILD_CXX() { tc-getBUILD_PROG "BUILD_CXX CXX_FOR_BUILD HOSTCXX" g++ "$@"; } 131tc-getBUILD_CXX() { tc-getBUILD_PROG CXX g++ "$@"; }
132# @FUNCTION: tc-getBUILD_LD
133# @USAGE: [toolchain prefix]
134# @RETURN: name of the linker for building binaries to run on the build machine
135tc-getBUILD_LD() { tc-getBUILD_PROG LD ld "$@"; }
136# @FUNCTION: tc-getBUILD_STRIP
137# @USAGE: [toolchain prefix]
138# @RETURN: name of the strip program for building binaries to run on the build machine
139tc-getBUILD_STRIP() { tc-getBUILD_PROG STRIP strip "$@"; }
140# @FUNCTION: tc-getBUILD_NM
141# @USAGE: [toolchain prefix]
142# @RETURN: name of the symbol/object thingy for building binaries to run on the build machine
143tc-getBUILD_NM() { tc-getBUILD_PROG NM nm "$@"; }
144# @FUNCTION: tc-getBUILD_RANLIB
145# @USAGE: [toolchain prefix]
146# @RETURN: name of the archiver indexer for building binaries to run on the build machine
147tc-getBUILD_RANLIB() { tc-getBUILD_PROG RANLIB ranlib "$@"; }
148# @FUNCTION: tc-getBUILD_OBJCOPY
149# @USAGE: [toolchain prefix]
150# @RETURN: name of the object copier for building binaries to run on the build machine
151tc-getBUILD_OBJCOPY() { tc-getBUILD_PROG OBJCOPY objcopy "$@"; }
152# @FUNCTION: tc-getBUILD_PKG_CONFIG
153# @USAGE: [toolchain prefix]
154# @RETURN: name of the pkg-config tool for building binaries to run on the build machine
155tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; }
124 156
125# @FUNCTION: tc-export 157# @FUNCTION: tc-export
126# @USAGE: <list of toolchain variables> 158# @USAGE: <list of toolchain variables>
127# @DESCRIPTION: 159# @DESCRIPTION:
128# Quick way to export a bunch of compiler vars at once. 160# Quick way to export a bunch of compiler vars at once.

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107

  ViewVC Help
Powered by ViewVC 1.1.20