.TH "ucfront" "1" "June 2005" "" "" .SH "NAME" ucfront \- a compiler front end for building uClinux .SH "SYNOPSIS" .PP ucfront [OPTION] .PP ucfront [COMPILER OPTIONS] .PP .SH "DESCRIPTION" .PP ucfront is a gcc compiler front end for building the front compiler cache\&. It is designed to simplify using a cross compiler with a specific libc (uC-libc, uClibc or glibc) which is different from the libc which as used when building the compiler\&. .PP .SH "OPTIONS" .PP These options only apply when you invoke ucfront as "ucfront"\&. When invoked as a compiler none of these options apply\&. In that case your normal compiler options apply and you should refer to your compilers documentation\&. .PP .IP "\fB-h\fP" Print a options summary page .IP .IP "\fB-V\fP" Print the ucfront version number .PP .SH "INSTALLATION" .PP ucfront is located in $ROOTDIR/tools/ucfront and is compiled and use automatically during builds as long as the following entries exist in your vendors/config//config\&.arch\&. .PP .nf CC = ucfront-gcc $(CROSS_COMPILE)gcc $(CPUFLAGS) CXX = ucfront-g++ $(CROSS_COMPILE)g++ $(CPUFLAGS) .fi .PP Both ucfront-gcc and ucfront-g++ are symlinks to tools/ucfront/ucfront and they invoke the given compiler with arguments which are modified depending upon the currently selected libc\&. .PP .SH "EXTRA OPTIONS" .PP When run as a compiler front end ucfront usually just takes the same command line options as the compiler you are using\&. The only exception to this is the option \&'--ucfront-skip\&'\&. That option can be used to tell ucfront that the next option is definitely not a input filename, and should be passed along to the compiler as-is\&. .PP The reason this can be important is that ucfront does need to parse the command line and determine what is an input filename and what is a compiler option, as it needs the input filename to determine the name of the resulting object file (among other things)\&. The heuristic ucfront uses in this parse is that any string on the command line that exists as a file is treated as an input file name (usually a C file)\&. By using --ucfront-skip you can force an option to not be treated as an input file name and instead be passed along to the compiler as a command line option\&. .PP .SH "ENVIRONMENT VARIABLES" .PP ucfront uses a number of environment variables to control operation\&. In most cases you won\&'t need any of these as the defaults will be fine\&. .PP The first set of environment variables may be set manually to control the operation of ucfront\&. .PP .IP .IP "\fBUCFRONT_LOGFILE\fP" If you set the UCFRONT_LOGFILE environment variable then ucfront will write some log information in that file\&. This is useful for tracking down problems\&. .IP .IP "\fBUCFRONT_DEBUG\fP" This option causes ucfront to print the full command which is executed after modifying arguments\&. .IP .IP "\fBUCFRONT_PATH\fP" You can optionally set UCFRONT_PATH to a colon separated path where ucfront will look for the real compilers\&. If you don\&'t do this then ucfront will look for the first executable matching the compiler name in the normal PATH that isn\&'t a symbolic link to ucfront itself\&. .IP .IP "\fBUCFRONT_CC\fP" You can optionally set UCFRONT_CC to force the name of the compiler to use\&. If you don\&'t do this then ucfront works it out from the command line\&. .IP .IP "\fBUCFRONT_PREFIX\fP" This option adds a prefix to the command line that ucfront runs when invoking the compiler\&. This may be useful to invoke ccache or distcc\&. .IP .PP The next set of environment variables are normally set by the build environment and are used to determine the lib configuration\&. .PP .IP .IP "\fBROOTDIR\fP" Specifies the top of the build tree\&. If this is not set, it is inferred from the path to ucfront\&. .IP .IP "\fBCONFIG_LIBCDIR\fP" Specifies the path to the libc in use\&. .IP .IP "\fBCONFIG_DEFAULTS_LIBC_\&.\&.\&.\fP" Specifies the libc in use\&. .IP .PP If the \fBCONFIG_\&.\&.\&.\fP environment variables are not set, they are read from the file $ROOTDIR/\&.config .PP This is useful when invoking ucfront manually\&. .PP .SH "HOW IT WORKS" .PP The basic idea is to detect the location and type of libc and also whether the current operation is a compile or a link and then add some or all of the following to the compiler command line: .PP .IP o -I $ROOTDIR/include .IP o -I libc include directory .IP o -L $ROOTDIR/lib .IP o -L libc lib directory .IP o appropriate start files (e\&.g\&. crt1\&.o, crtbeginS\&.o, crtn\&.o) based on the library and compiler combination .PP .SH "HISTORY" .PP ucfront was inspired by a combination of ccache written by Andrew Tridgell http://samba\&.org/~tridge/ and the m68knommu ld front end wrapper\&. .PP It borrows heavily from the ccache source code\&. .PP .SH "AUTHOR" .PP ucfront was written by Steve Bennett .PP ucfront is released under the GNU General Public License version 2 or later\&.