From 532c9ef5cedf319cf8266c9c252eeb5776e6911c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 19 Jul 2010 21:48:57 +0000 Subject: 2010-07-19 Joel Sherrill * build_tools: Add command line arguments and let you do individual parts of the build process. --- simple-build-script/ChangeLog | 5 ++ simple-build-script/build_tools | 186 ++++++++++++++++++++++++++++------------ 2 files changed, 138 insertions(+), 53 deletions(-) (limited to 'simple-build-script') diff --git a/simple-build-script/ChangeLog b/simple-build-script/ChangeLog index 8112689..a20ff1b 100644 --- a/simple-build-script/ChangeLog +++ b/simple-build-script/ChangeLog @@ -1,3 +1,8 @@ +2010-07-19 Joel Sherrill + + * build_tools: Add command line arguments and let you do individual + parts of the build process. + 2010-07-19 Joel Sherrill * README: Fix typo. diff --git a/simple-build-script/build_tools b/simple-build-script/build_tools index fa91071..21398af 100644 --- a/simple-build-script/build_tools +++ b/simple-build-script/build_tools @@ -1,30 +1,29 @@ #! /bin/sh # # This script is a simple script to build and install rtems toolset -# for the target you specify by editing TARGET below. It should be -# of the form -rtems. For example, sparc-rtems4.11 +# for the target you specify on the command line. It should be of +# the form -rtems. For example, sparc-rtems4.11 # # This can be used to build versions from CVS/SVN or released versions. # Please be sure to apply appropriate patches from # rtems/contrib/crossrpms/patches. # -# --Joel Sherrill (28 Match 2010) +# --Joel Sherrill (28 March 2010) # # $Id$ # ### EDIT THESE AS NEEDED -INSTALL=NOT_SET -TARGET=sparc-rtems4.10 -AUTOCONF=autoconf-2.65 +AUTOCONF=autoconf-2.66 AUTOMAKE=automake-1.11.1 BINUTILS=binutils-2.20.1 GDB=gdb-7.1 -GCC=gcc-4.4.3 +GCC=gcc-4.5.0 NEWLIB=newlib-1.18.0 LANGUAGES="c,c++" ### END OF EDIT THESE + BASE=`pwd` # log an error to stderr @@ -48,50 +47,143 @@ check_status() fi } -test $# -eq 1 -check_status $? "Useage: $0 install_point" +toggle() +{ + case $1 in + no) echo "yes" ;; + yes) echo "no" ;; + *) fatal "Unknown value to toggle ($1)" ;; + esac +} + +usage() +{ +cat <c.log 2>&1 check_status $? "failed to configure ${pkg}" @@ -109,15 +201,27 @@ do >c.log 2>&1 check_status $? "failed to configure ${pkg}" ;; + gcc*) + ../${GCC}/configure \ + --enable-threads=rtems --with-gnu-as --enable-multilib \ + --enable-newlib-mb --enable-newlib-iconv \ + --with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls \ + --enable-version-specific-runtime-libs \ + --enable-languages=${LANGUAGES} --target=${TARGET} --prefix=${INSTALL} \ + >c.log 2>&1 + check_status $? "failed to configure ${pkg}" + ;; *) prerr "UNKNOWN PACKAGE ${pkg}" exit 1 ;; esac + echo "Building ${pkg}..." make >b.log 2>&1 check_status $? "failed to make ${pkg}" + echo "Installing ${pkg}..." make install >i.log 2>&1 check_status $? "failed to install ${pkg}" @@ -125,28 +229,4 @@ do rm -rf b-${pkg} done -### GCC/NEWLIB -mkdir b-${GCC} -check_status $? "failed to make b-${GCC}" - -cd b-${GCC} -check_status $? "failed to cd b-${GCC}" - -../${GCC}/configure \ - --enable-threads=rtems --with-gnu-as --enable-multilib \ - --enable-newlib-mb --enable-newlib-iconv \ - --with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls \ - --enable-version-specific-runtime-libs \ - --enable-languages=${LANGUAGES} --target=${TARGET} --prefix=${INSTALL} \ - >c.log 2>&1 - -make >b.log 2>&1 -check_status $? "failed to make ${GCC}/newlib" - -make install >i.log 2>&1 -check_status $? "failed to install ${GCC}/newlib" - -cd .. -rm -rf b-${GCC} - exit 0 -- cgit v1.2.3