Home | History | Annotate | Line # | Download | only in bin
gcc-build-simple revision 1.1.1.1.8.2
      1  1.1.1.1.8.2  tls #! /bin/sh
      2  1.1.1.1.8.2  tls 
      3  1.1.1.1.8.2  tls # Build a GCC compiler, using environment variables defined by several
      4  1.1.1.1.8.2  tls # reghunt scripts and config files.
      5  1.1.1.1.8.2  tls #
      6  1.1.1.1.8.2  tls # This doesn't work for sources earlier than about 2003-02-25.
      7  1.1.1.1.8.2  tls #
      8  1.1.1.1.8.2  tls # Copyright (C) 2007 Free Software Foundation.
      9  1.1.1.1.8.2  tls #
     10  1.1.1.1.8.2  tls # This file is free software; you can redistribute it and/or modify
     11  1.1.1.1.8.2  tls # it under the terms of the GNU General Public License as published by
     12  1.1.1.1.8.2  tls # the Free Software Foundation; either version 3 of the License, or
     13  1.1.1.1.8.2  tls # (at your option) any later version.
     14  1.1.1.1.8.2  tls #
     15  1.1.1.1.8.2  tls # This program is distributed in the hope that it will be useful,
     16  1.1.1.1.8.2  tls # but WITHOUT ANY WARRANTY; without even the implied warranty of
     17  1.1.1.1.8.2  tls # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18  1.1.1.1.8.2  tls # GNU General Public License for more details.
     19  1.1.1.1.8.2  tls #
     20  1.1.1.1.8.2  tls # For a copy of the GNU General Public License, write the the
     21  1.1.1.1.8.2  tls # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     22  1.1.1.1.8.2  tls # Boston, MA 02111-1301, USA.
     23  1.1.1.1.8.2  tls 
     24  1.1.1.1.8.2  tls ID="${1}"
     25  1.1.1.1.8.2  tls LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
     26  1.1.1.1.8.2  tls mkdir -p $LOGDIR
     27  1.1.1.1.8.2  tls 
     28  1.1.1.1.8.2  tls msg() {
     29  1.1.1.1.8.2  tls     echo "`date`  ${1}"
     30  1.1.1.1.8.2  tls }
     31  1.1.1.1.8.2  tls 
     32  1.1.1.1.8.2  tls abort() {
     33  1.1.1.1.8.2  tls     msg "${1}"
     34  1.1.1.1.8.2  tls     exit 1
     35  1.1.1.1.8.2  tls }
     36  1.1.1.1.8.2  tls 
     37  1.1.1.1.8.2  tls msg "building $REG_COMPILER for id $ID"
     38  1.1.1.1.8.2  tls 
     39  1.1.1.1.8.2  tls rm -rf $REG_OBJDIR
     40  1.1.1.1.8.2  tls mkdir $REG_OBJDIR
     41  1.1.1.1.8.2  tls cd $REG_OBJDIR
     42  1.1.1.1.8.2  tls 
     43  1.1.1.1.8.2  tls #msg "configure"
     44  1.1.1.1.8.2  tls ${REG_GCCSRC}/configure \
     45  1.1.1.1.8.2  tls     --prefix=$REG_PREFIX \
     46  1.1.1.1.8.2  tls     --enable-languages=$REG_LANGS \
     47  1.1.1.1.8.2  tls     $REG_CONFOPTS \
     48  1.1.1.1.8.2  tls   > configure.log 2>&1 || abort "  configure failed"
     49  1.1.1.1.8.2  tls 
     50  1.1.1.1.8.2  tls #msg "make libraries"
     51  1.1.1.1.8.2  tls make all-build-libiberty > ${LOGDIR}/make.all-build-libiberty.log 2>&1 || true
     52  1.1.1.1.8.2  tls make all-libcpp > ${LOGDIR}/make.all-libcpp.log 2>&1 || true
     53  1.1.1.1.8.2  tls make all-libdecnumber > ${LOGDIR}/make.all-libdecnumber.log 2>&1 || true
     54  1.1.1.1.8.2  tls make all-intl > ${LOGDIR}/make.all-intl.log 2>&1 || true
     55  1.1.1.1.8.2  tls make all-libbanshee > ${LOGDIR}/make.all-libbanshee.log 2>&1 || true
     56  1.1.1.1.8.2  tls make configure-gcc > ${LOGDIR}/make.configure-gcc.log  2>&1 || true
     57  1.1.1.1.8.2  tls 
     58  1.1.1.1.8.2  tls # hack for 3.3 branch
     59  1.1.1.1.8.2  tls if [ ! -f libiberty/libiberty.a ]; then
     60  1.1.1.1.8.2  tls   if [ -d libiberty ]; then
     61  1.1.1.1.8.2  tls     # another hack for 3.2!
     62  1.1.1.1.8.2  tls     cd libiberty
     63  1.1.1.1.8.2  tls     make > ${LOGDIR}/make.libiberty.log 2>&1 || true
     64  1.1.1.1.8.2  tls     cd ..
     65  1.1.1.1.8.2  tls   else
     66  1.1.1.1.8.2  tls     mkdir -p libiberty
     67  1.1.1.1.8.2  tls     cd libiberty
     68  1.1.1.1.8.2  tls     ln -s ../build-${REG_BLD}/libiberty/libiberty.a .
     69  1.1.1.1.8.2  tls     cd ..
     70  1.1.1.1.8.2  tls   fi
     71  1.1.1.1.8.2  tls fi
     72  1.1.1.1.8.2  tls 
     73  1.1.1.1.8.2  tls cd gcc
     74  1.1.1.1.8.2  tls # REG_COMPILER is cc1, cc1plus, or f951
     75  1.1.1.1.8.2  tls #msg "make $REG_COMPILER"
     76  1.1.1.1.8.2  tls make $REG_MAKE_J $REG_COMPILER > ${LOGDIR}/make.${REG_COMPILER}.log 2>&1 \
     77  1.1.1.1.8.2  tls   || abort "  make failed"
     78  1.1.1.1.8.2  tls msg "build completed"
     79  1.1.1.1.8.2  tls exit 0
     80