Home | History | Annotate | Line # | Download | only in bin
gcc-build-full revision 1.1.1.1.4.2
      1  1.1.1.1.4.2  yamt #! /bin/sh
      2  1.1.1.1.4.2  yamt 
      3  1.1.1.1.4.2  yamt # Perform a simple build of GCC for a particular language, using several
      4  1.1.1.1.4.2  yamt # environment variables defined by reghunt scripts and config files.
      5  1.1.1.1.4.2  yamt #
      6  1.1.1.1.4.2  yamt # Copyright (C) 2007 Free Software Foundation.
      7  1.1.1.1.4.2  yamt #
      8  1.1.1.1.4.2  yamt # This file is free software; you can redistribute it and/or modify
      9  1.1.1.1.4.2  yamt # it under the terms of the GNU General Public License as published by
     10  1.1.1.1.4.2  yamt # the Free Software Foundation; either version 3 of the License, or
     11  1.1.1.1.4.2  yamt # (at your option) any later version.
     12  1.1.1.1.4.2  yamt #
     13  1.1.1.1.4.2  yamt # This program is distributed in the hope that it will be useful,
     14  1.1.1.1.4.2  yamt # but WITHOUT ANY WARRANTY; without even the implied warranty of
     15  1.1.1.1.4.2  yamt # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16  1.1.1.1.4.2  yamt # GNU General Public License for more details.
     17  1.1.1.1.4.2  yamt #
     18  1.1.1.1.4.2  yamt # For a copy of the GNU General Public License, write the the
     19  1.1.1.1.4.2  yamt # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     20  1.1.1.1.4.2  yamt # Boston, MA 02111-1301, USA.
     21  1.1.1.1.4.2  yamt 
     22  1.1.1.1.4.2  yamt abort() {
     23  1.1.1.1.4.2  yamt   echo "`date`  $1"
     24  1.1.1.1.4.2  yamt   exit 1
     25  1.1.1.1.4.2  yamt }
     26  1.1.1.1.4.2  yamt 
     27  1.1.1.1.4.2  yamt ID=$1
     28  1.1.1.1.4.2  yamt LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
     29  1.1.1.1.4.2  yamt mkdir -p $LOGDIR
     30  1.1.1.1.4.2  yamt 
     31  1.1.1.1.4.2  yamt echo "`date`  building GCC ($REG_LANGS) for id ${ID}"
     32  1.1.1.1.4.2  yamt 
     33  1.1.1.1.4.2  yamt cd $REG_BUILDDIR
     34  1.1.1.1.4.2  yamt rm -rf obj
     35  1.1.1.1.4.2  yamt mkdir obj
     36  1.1.1.1.4.2  yamt cd obj
     37  1.1.1.1.4.2  yamt 
     38  1.1.1.1.4.2  yamt echo "REG_CONFOPTS = $REG_CONFOPTS" > ${LOGDIR}/configure.log
     39  1.1.1.1.4.2  yamt echo "REG_PREFIX   = $REG_PREFIX"  >> ${LOGDIR}/configure.log
     40  1.1.1.1.4.2  yamt echo "REG_LANGS    = $REG_LANGS"   >> ${LOGDIR}/configure.log
     41  1.1.1.1.4.2  yamt echo >> ${LOGDIR}/configure.log
     42  1.1.1.1.4.2  yamt 
     43  1.1.1.1.4.2  yamt ${REG_GCCSRC}/configure \
     44  1.1.1.1.4.2  yamt   --prefix=$REG_PREFIX \
     45  1.1.1.1.4.2  yamt   $REG_CONFOPTS \
     46  1.1.1.1.4.2  yamt   --enable-languages=$REG_LANGS \
     47  1.1.1.1.4.2  yamt   >> ${LOGDIR}/configure.log 2>&1 || abort "  configure failed"
     48  1.1.1.1.4.2  yamt     
     49  1.1.1.1.4.2  yamt make $REG_MAKE_J > ${LOGDIR}/make.log 2>&1 || abort "  make failed"
     50  1.1.1.1.4.2  yamt make install > ${LOGDIR}/make.install.log 2>&1 || abort "  make install failed"
     51  1.1.1.1.4.2  yamt 
     52  1.1.1.1.4.2  yamt exit 0
     53