TRANSLATE_ARCH="sed -e s/ppc/powerpc/ -e s/i386/i686/ -e s/armv6/arm/"
OMIT_X86_64="sed -e s/x86_64//"
HOSTS=`echo $1 | $TRANSLATE_ARCH `
TARGETS=`echo $2 | $TRANSLATE_ARCH | $OMIT_X86_64 | sed -e s,\\',,g`
# The GNU makefile target ('bootstrap' by default).
BOOTSTRAP=${BOOTSTRAP-bootstrap}
if [ "$BOOTSTRAP" != bootstrap ]; then
bootstrap=--disable-bootstrap
# Language front-ends to build. This also affects
# whether the C++ driver and driver-driver are installed
LANGUAGES=${LANGUAGES-c,objc,c++,obj-c++}
# The B&I build script (~rc/bin/buildit) accepts an '-othercflags'
# command-line flag, and captures the argument to that flag in
# $RC_NONARCH_CFLAGS (and mysteriously prepends '-pipe' thereto).
# We will allow this to override the default $CFLAGS and $CXXFLAGS.
if [ "x$LLVM_DEBUG" == "x" ]; then
CFLAGS="-g -O2 ${RC_NONARCH_CFLAGS/-pipe/}"
# This isn't a parameter; it is the architecture of the current machine.
BUILD=`arch | $TRANSLATE_ARCH`
# The third parameter is the path to the compiler sources. There should
# be a shell script named 'configure' in this directory. This script
# The fourth parameter is the location where the compiler will be installed,
# normally "/usr". You can move it once it's built, so this mostly controls
# the layout of $DEST_DIR.
# The fifth parameter is the place where the compiler will be copied once
# The sixth parameter is a directory in which to place information (like
# unstripped executables and generated source files) helpful in debugging
# the resulting compiler.
# The seventh parameter is a yes/no that indicates whether libLTO.dylib
# should be installed from LLVMCORE_PATH.
# The eighth parameter is a yes/no that indicates whether assertions should be
# enabled in the LLVM libs/tools.
# The nineth parameter indicates llvmCore location.
# The tenth parameter is the version number of the submission, e.g. 1007.
LLVM_SUBMIT_VERSION="${10}"
# The eleventh parameter is the subversion number of the submission, e.g. 03.
LLVM_SUBMIT_SUBVERSION="${11}"