[llvm-commits] [llvm-gcc-4.2] r118744 - in /llvm-gcc-4.2/trunk/extras: build-x-4-armeabi-hardfloat build-x-4-armeabi-softfloat
Galina Kistanova
gkistanova at gmail.com
Wed Nov 10 16:07:07 PST 2010
Author: gkistanova
Date: Wed Nov 10 18:07:07 2010
New Revision: 118744
URL: http://llvm.org/viewvc/llvm-project?rev=118744&view=rev
Log:
Added script for new arm-softfloat-eabi builder. Fixed existing arm-eabi script.
Added:
llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat (with props)
Modified:
llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-hardfloat
Modified: llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-hardfloat
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-hardfloat?rev=118744&r1=118743&r2=118744&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-hardfloat (original)
+++ llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-hardfloat Wed Nov 10 18:07:07 2010
@@ -185,7 +185,6 @@
--target=arm-eabi \
--enable-languages=c,c++ \
--disable-nls \
- --prefix=/opt/cross-tools \
--program-prefix=llvm- \
--with-newlib \
--with-headers=yes \
Added: llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat?rev=118744&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat (added)
+++ llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat Wed Nov 10 18:07:07 2010
@@ -0,0 +1,219 @@
+#!/bin/bash
+
+set -e # Terminate script at the first line that fails.
+set -o pipefail # Return the first non-zero pipe command error.
+set -x # Print commands as they are executed
+
+# This script performs an automated build on i686-pc-linux-gnu of
+# cross llvm-gcc for arm-eabi-soft-float. It assumes the valid native
+# compiler for i686-pc-linux-gnu is in place and available as well as
+# cross libraries and headers for arm-softfloat-eabi.
+
+# --build=i686-pc-linux-gnu
+# --host=i686-pc-linux-gnu
+# --target=arm-softfloat-eabi
+#
+
+# The usage:
+# Run this build from the build from the build root directory as
+# build-x-4-armeabi-softfloat [<step>] [<extra args>]
+
+# Expected project tree structure:
+# <build root>
+# +-- ${LLVM_src}
+# +-- ${LLVM_GCC_src}
+# +-- ${LLVM_obj}
+# +-- ${LLVM_GCC_obj}
+# +-- ${INSTALL}
+
+LLVM_src=llvm.src # The LLVM source code root directory name.
+LLVM_GCC_src=llvm-gcc.src # The LLVM-GCC source code root directory name.
+LLVM_obj=llvm.obj # The LLVM build root directory name.
+LLVM_GCC_obj=llvm-gcc.obj # The LLVM-GCC build root directory name.
+INSTALL=install # Where the result will be installed.
+
+BUILD_ROOT=$PWD # Where build happens.
+PRIVATE_INSTALL=${BUILD_ROOT}/${INSTALL} # Where the result will be installed.
+
+#------------------------------------------------------------------------------
+# Define build steps, parse and validate input parameters
+#------------------------------------------------------------------------------
+
+# This script supports the following steps:
+do_clean=no # Clean up the build directory.
+do_copy_cross_tools=no # Copy cross-tools.
+do_configure_llvm=no # Configure LLVM.
+do_make_llvm=no # Make LLVM.
+do_install_llvm=no # Install LLVM-GCC.
+do_test_llvm=no # Test LLVM.
+do_configure_llvmgcc=no # Configure LLVM-GCC.
+do_make_llvmgcc=no # Make LLVM-GCC.
+do_install_llvmgcc=no # Install LLVM-GCC.
+do_all=no # Runs all steps at once when requested.
+
+# Set step parameter
+if (( $# == 0 )) ; then
+ do_all=yes
+fi
+# else
+if (( ! $# == 0 )) ; then
+ # First check that the parameter actually defines a step.
+ case $1 in
+ clean | \
+ copy_cross_tools | \
+ configure_llvm | \
+ make_llvm | \
+ install_llvm | \
+ test_llvm | \
+ configure_llvmgcc | \
+ make_llvmgcc | \
+ install_llvmgcc | \
+ all)
+ eval do_$1=yes # Set the flag for the requested step .
+ shift # Remove it since is is ours and already precessed.
+ ;;
+
+ *)
+ # Not our parameter. Pass it as is.
+ esac
+fi
+
+# Set all steps if do_all requested
+if [ "$do_all" == "yes" ] ; then
+ # Set all steps to yes
+ do_clean=yes
+ do_copy_cross_tools=yes
+ do_configure_llvm=yes
+ do_make_llvm=yes
+ do_install_llvm=yes
+ do_test_llvm=yes
+ do_configure_llvmgcc=yes
+ do_make_llvmgcc=yes
+ do_install_llvmgcc=yes
+fi
+
+#------------------------------------------------------------------------------
+# Step: Clean up.
+#------------------------------------------------------------------------------
+if [ "$do_clean" == "yes" ] ; then
+
+ # Remove everything from where we will be installing the result.
+ rm -rf ${PRIVATE_INSTALL}
+ mkdir -p ${PRIVATE_INSTALL}
+ chmod a+rx ${PRIVATE_INSTALL}
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Copy cross-tools and newlib
+#------------------------------------------------------------------------------
+if [ "$do_copy_cross_tools" == "yes" ] ; then
+
+ # We need a local copy of binutils, system libraries and headers,
+ # since we will be installing there.
+ cp -Ru /opt/cross-tools/* ${PRIVATE_INSTALL}
+ cp -Ru /opt/newlib-src/newlib/ ${BUILD_ROOT}/${LLVM_GCC_src}
+ cp -Ru /opt/newlib-src/libgloss/ ${BUILD_ROOT}/${LLVM_GCC_src}
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Configure LLVM.
+#------------------------------------------------------------------------------
+if [ "$do_configure_llvm" == "yes" ] ; then
+
+ # Remove previously build files if any.
+ rm -rf ${BUILD_ROOT}/${LLVM_obj}
+ mkdir -p ${BUILD_ROOT}/${LLVM_obj}
+ chmod a+rx ${BUILD_ROOT}/${LLVM_obj}
+ cd ${BUILD_ROOT}/${LLVM_obj}
+
+ ../${LLVM_src}/configure --prefix=${PRIVATE_INSTALL} \
+ --enable-optimized \
+ --enable-targets=cbe,arm \
+ $@ # Extra args if any
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Make LLVM.
+#------------------------------------------------------------------------------
+if [ "$do_make_llvm" == "yes" ] ; then
+
+ cd ${BUILD_ROOT}/${LLVM_obj}
+ # NOTE: Do not build with ENABLE_OPTIMIZED=1 - some test fail after it.
+ nice -n 20 make VERBOSE=1 \
+ $@ # Extra args if any, like -j16 for example.
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Install LLVM.
+#------------------------------------------------------------------------------
+if [ "$do_install_llvm" == "yes" ] ; then
+
+ cd ${BUILD_ROOT}/${LLVM_obj}
+ # NOTE: Do not build with ENABLE_OPTIMIZED=1 - some test fail after it.
+ nice -n 20 make install VERBOSE=1 \
+ $@ # Extra args if any, like -j16 for example.
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Test LLVM.
+#------------------------------------------------------------------------------
+if [ "$do_test_llvm" == "yes" ] ; then
+
+ cd ${BUILD_ROOT}/${LLVM_obj}
+ make check-lit VERBOSE=1 \
+ $@ # Extra args if any, like -j16 for example.
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Configure LLVM-GCC.
+#------------------------------------------------------------------------------
+if [ "$do_configure_llvmgcc" == "yes" ] ; then
+
+ # Remove previously build files if any.
+ rm -rf ${BUILD_ROOT}/${LLVM_GCC_obj}
+ mkdir -p ${BUILD_ROOT}/${LLVM_GCC_obj}
+ chmod a+rx ${BUILD_ROOT}/${LLVM_GCC_obj}
+ cd ${BUILD_ROOT}/${LLVM_GCC_obj}
+
+ ../${LLVM_GCC_src}/configure --prefix=${PRIVATE_INSTALL} \
+ --target=arm-softfloat-eabi \
+ --enable-languages=c,c++ \
+ --disable-nls \
+ --program-prefix=llvm- \
+ --with-newlib \
+ --with-headers=yes \
+ --enable-llvm=${BUILD_ROOT}/${LLVM_obj} \
+ --with-cpu=cortex-a8 \
+ --with-fpu=neon \
+ --with-float=soft \
+ --with-abi=aapcs \
+ $@ # Extra args if any
+fi
+
+#------------------------------------------------------------------------------
+# Step: Make LLVM-GCC.
+#------------------------------------------------------------------------------
+if [ "$do_make_llvmgcc" == "yes" ] ; then
+
+ cd ${BUILD_ROOT}/${LLVM_GCC_obj}
+ nice -n 20 make \
+ $@ # Extra args if any
+
+fi
+
+#------------------------------------------------------------------------------
+# Step: Install LLVM-GCC.
+#------------------------------------------------------------------------------
+if [ "$do_install_llvmgcc" == "yes" ] ; then
+
+ cd ${BUILD_ROOT}/${LLVM_GCC_obj}
+ nice -n 20 make install \
+ $@ # Extra args if any
+
+fi
Propchange: llvm-gcc-4.2/trunk/extras/build-x-4-armeabi-softfloat
------------------------------------------------------------------------------
svn:executable = *
More information about the llvm-commits
mailing list