X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=util%2Fcrossgcc%2Fbuildgcc;h=d13e65d161452bd529fcc9ee1bf17ea335d27b70;hb=c1a75b13c3153d053de30fd9bf8f271527b6783c;hp=748b9440cb00ce10cbe362383ef50d0d7274da74;hpb=643c9e892fab5f73dde566b9ffb73f2f0463d9a7;p=coreboot.git diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 748b9440c..d13e65d16 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -126,6 +126,7 @@ myhelp() printf " [-h|--help] print this help and exit\n" printf " [-c|--clean] remove temporary files before build\n" printf " [-t|--savetemps] don't remove temporary files after build\n" + printf " [-y|--ccache] Use ccache when building cross compiler\n" printf " [-j|--jobs ] run jobs in parallel in make\n" printf " [-p|--platform ] target platform to build cross compiler for\n" printf " (defaults to $TARGETARCH)\n" @@ -167,11 +168,11 @@ getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c getoptbrand="`getopt -V | sed -e '1!d' -e 's,^\(......\).*,\1,'`" if [ "${getoptbrand}" = "getopt" ]; then # Detected GNU getopt that supports long options. - args=`getopt -l version,help,clean,directory:,platform:,jobs:,destdir:,savetemps,skip-gdb Vhcd:p:j:D:tG -- "$@"` + args=`getopt -l version,help,clean,directory:,platform:,jobs:,destdir:,savetemps,skip-gdb,ccache Vhcd:p:j:D:tGy -- "$@"` eval set "$args" else # Detected non-GNU getopt - args=`getopt Vhcd:p:j:D:tG $*` + args=`getopt Vhcd:p:j:D:tGy $*` set -- $args fi @@ -192,6 +193,7 @@ while true ; do -j|--jobs) shift; JOBS="-j $1"; shift;; -G|--gdb) shift; SKIPGDB=0;; -S|--scripting) shift; SKIPPYTHON=0;; + -y|--ccache) shift; USECCACHE=1;; --) shift; break;; -*) printf "Invalid option\n\n"; myhelp; exit 1;; *) break;; @@ -211,7 +213,9 @@ if [ $SKIPGDB -eq 1 ]; then fi fi if [ $SKIPPYTHON -eq 1 ]; then + PYTHON_ARCHIVE="" PYTHON_PACKAGE="" + EXPAT_ARCHIVE="" EXPAT_PACKAGE="" fi @@ -323,6 +327,10 @@ if [ `uname` = "Darwin" ]; then fi fi +if [ "$USECCACHE" = 1 ]; then + CC="ccache $CC" +fi + mkdir -p build-gmp build-mpfr build-mpc build-libelf build-binutils \ build-gcc build-python build-expat if [ $SKIPGDB -eq 0 ]; then