MAN toolchain-funcs.eclass 5

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the MAN series.
Purge this man page to update its contents
portage-manpages
Collection of administration scripts for Gentoo
Developer: Gentoo Foundation
Category: app-portage
License: GPL-2
Website: http://www.gentoo.org/
Table of contents

TOOLCHAIN-FUNCS.ECLASS

Section: portage (5)
Updated: Jun 2003  

NAME

toolchain-funcs.eclass - functions to get commonly needed info about the toolchain (binutils/gcc/glibc/etc...)  

DESCRIPTION

The toolchain-funcs eclass contains a suite of functions that are used to glean information about the toolchain that is used to compile. This allows developers to worry about gcc specs rather than figuring out how to find the specs in the first place.  

TOOL FUNCTIONS

tc-getAR
Returns the name of the binutils archiver. Usually 'ar'.
tc-getAS
Returns the name of the assembler. Usually 'as'.
tc-getBUILD_CC
Returns the name of the compiler for the build system. Useful only when you have to compile and run a utility while building the package.
tc-getCC
Returns the name of the C compiler binary. Usually 'gcc'.
tc-getCXX
Returns the name of the C++ compiler binary. Usually 'g++'.
tc-getF77
Returns the name of the fortran compiler.
tc-getGCJ
Returns the name of the java compiler. Usually 'gcj'.
tc-getLD
Returns the name of the linker. Usually 'ld'.
tc-getNM
Returns the name of the symbol/object thingy. Usually 'nm'.
tc-getRANLIB
Returns the name of the archiver indexer. Usually 'ranlib'.
 

MISC FUNCTIONS

tc-arch [TARGET]
Echo the portage $ARCH that the current toolchain represents. Basically this is a drop-in replacment for $ARCH usage. If no TARGET is specified, then CHOST will be used.
tc-arch-kernel [TARGET]
Echo the kernel $ARCH that the current toolchain represents. If no TARGET is specified, then CHOST will be used.
tc-endian [TARGET]
Echo 'little' or 'big' based upon what the current toolchain represents. If no TARGET is specified, then CHOST will be used.
tc-export <list of variables>
Quickly export list of variables to the environment. Much easier than exporting each idividual variable at a time.

For example: tc-export CC CXX AR RANLIB

tc-is-cross-compiler
Return shell true/false based upon whether the current building setup is for a cross compiler.
 

VERSION FUNCTIONS

gcc-fullversion
Returns the version as by `$CC -dumpversion`.
GCC 2.95.3 will return 2.95.3
GCC 3.2.1 will return 3.2.1
gcc-version
Returns the version, but only the <major>.<minor>.
GCC 2.95.3 will return 2.95
GCC 3.2.1 will return 3.2
gcc-major-version
Returns the Major version.
GCC 2.95.3 will return 2
GCC 3.2.1 will return 3
gcc-minor-version
Returns the Minor version.
GCC 2.95.3 will return 95
GCC 3.2.1 will return 2
gcc-micro-version
Returns the Micro version.
GCC 2.95.3 will return 3
GCC 3.2.1 will return 1
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

SEE ALSO

ebuild(5)  

FILES

/usr/portage/eclass/toolchain-funcs.eclass  

AUTHORS

Mike Frysinger <vapier@gentoo.org>


Updated Time:: 10:07:27 GMT, December 19, 2006
Personal tools