aboutsummaryrefslogtreecommitdiffstats
path: root/utils/crosstool/ARM
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2009-07-06 18:29:03 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2009-07-06 18:29:03 +0000
commite034393b15bc9257314b0c7adfb778e0c504bed7 (patch)
treea7bbd644bf3956fc2a45df1f4d432ecfef281d08 /utils/crosstool/ARM
parent53cf8298cfdb73d7747907bb686090bd44464250 (diff)
downloadexternal_llvm-e034393b15bc9257314b0c7adfb778e0c504bed7.zip
external_llvm-e034393b15bc9257314b0c7adfb778e0c504bed7.tar.gz
external_llvm-e034393b15bc9257314b0c7adfb778e0c504bed7.tar.bz2
* Allow skipping parts of the installation to be able to do it in parts if one
phase fails and the user wants to reinstall one of the components. * Fixed LLVM-GCC configuration flags: s/--with-gnu-{as,ld}/--with-{as,ld}/ The former is a boolean flag, the latter is a flag that takes a path. * Added a new flag CROSS_MARCH, defaults to armv6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/crosstool/ARM')
-rwxr-xr-xutils/crosstool/ARM/build-install-linux.sh27
1 files changed, 17 insertions, 10 deletions
diff --git a/utils/crosstool/ARM/build-install-linux.sh b/utils/crosstool/ARM/build-install-linux.sh
index 33833b5..9b33c8a 100755
--- a/utils/crosstool/ARM/build-install-linux.sh
+++ b/utils/crosstool/ARM/build-install-linux.sh
@@ -17,6 +17,7 @@ readonly OBJ_ROOT="${SCRATCH_ROOT}/obj"
readonly CROSS_HOST="x86_64-unknown-linux-gnu"
readonly CROSS_TARGET="arm-none-linux-gnueabi"
+readonly CROSS_MARCH="${CROSS_MARCH:-armv6}"
readonly CODE_SOURCERY="${INSTALL_ROOT}/codesourcery"
readonly CODE_SOURCERY_PKG_PATH="${CODE_SOURCERY_PKG_PATH:-${HOME}/codesourcery}"
@@ -104,12 +105,9 @@ runAndLog() {
}
installCodeSourcery() {
- # Create CodeSourcery dir, if necessary.
- verifyNotDir ${CODE_SOURCERY}
- sudoCreateDir ${CODE_SOURCERY}
-
- # Unpack the tarball.
+ # Unpack the tarball, creating the CodeSourcery dir, if necessary.
if [[ ! -d ${CODE_SOURCERY_ROOT} ]]; then
+ sudoCreateDir ${CODE_SOURCERY}
cd ${CODE_SOURCERY}
if [[ -e ${CODE_SOURCERY_PKG_PATH}/${CODE_SOURCERY_PKG} ]]; then
runCommand "Unpacking CodeSourcery in ${CODE_SOURCERY}" \
@@ -122,7 +120,7 @@ installCodeSourcery() {
exit
fi
else
- echo "CodeSourcery install dir already exists."
+ echo "CodeSourcery install dir already exists; skipping."
fi
# Verify our CodeSourcery toolchain installation.
@@ -141,7 +139,11 @@ installCodeSourcery() {
}
installLLVM() {
- verifyNotDir ${LLVM_INSTALL_DIR}
+ if [[ -d ${LLVM_INSTALL_DIR} ]]; then
+ echo "LLVM install dir ${LLVM_INSTALL_DIR} exists; skipping."
+ return
+ fi
+
sudoCreateDir ${LLVM_INSTALL_DIR}
# Unpack LLVM tarball; should create the directory "llvm".
@@ -165,7 +167,11 @@ installLLVM() {
}
installLLVMGCC() {
- verifyNotDir ${LLVMGCC_INSTALL_DIR}
+ if [[ -d ${LLVMGCC_INSTALL_DIR} ]]; then
+ echo "LLVM-GCC install dir ${LLVMGCC_INSTALL_DIR} exists; skipping."
+ return
+ fi
+
sudoCreateDir ${LLVMGCC_INSTALL_DIR}
# Unpack LLVM-GCC tarball; should create the directory "llvm-gcc-4.2".
@@ -182,8 +188,9 @@ installLLVMGCC() {
--prefix=${LLVMGCC_INSTALL_DIR} \
--program-prefix=llvm- \
--target=${CROSS_TARGET} \
- --with-gnu-as=${CROSS_TARGET_AS} \
- --with-gnu-ld=${CROSS_TARGET_LD} \
+ --with-arch=${CROSS_MARCH} \
+ --with-as=${CROSS_TARGET_AS} \
+ --with-ld=${CROSS_TARGET_LD} \
--with-sysroot=${SYSROOT}
runAndLog "Building LLVM-GCC" ${LLVMGCC_OBJ_DIR}/llvmgcc-build.log \
make